feat: springdoc 代码生成适配

pull/2/head
xingyu 2023-01-17 21:18:10 +08:00
parent 0ebba2eb81
commit e314a63ee9
9 changed files with 10 additions and 9 deletions

View File

@ -5,7 +5,9 @@ import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
#if ($sceneEnum.scene == 1)import org.springframework.security.access.prepost.PreAuthorize;#end
import io.swagger.annotations.*;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;

View File

@ -1,5 +1,6 @@
package ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePackage}.${table.businessName}.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
#foreach ($column in $columns)
@ -10,7 +11,6 @@ import java.math.BigDecimal;
import java.time.LocalDateTime;
#end
#end
import io.swagger.annotations.*;
import javax.validation.constraints.*;
## 处理 Date 字段的引入
#foreach ($column in $columns)

View File

@ -2,7 +2,7 @@ package ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePac
import lombok.*;
import java.util.*;
import io.swagger.annotations.*;
import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.*;
## 处理 Date 字段的引入
#foreach ($column in $columns)

View File

@ -1,5 +1,6 @@
package ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePackage}.${table.businessName}.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
#foreach ($column in $columns)
@ -10,7 +11,6 @@ import java.math.BigDecimal;
import java.time.LocalDateTime;
#end
#end
import io.swagger.annotations.*;
import com.alibaba.excel.annotation.ExcelProperty;
#foreach ($column in $columns)

View File

@ -2,7 +2,7 @@ package ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePac
import lombok.*;
import java.util.*;
import io.swagger.annotations.*;
import io.swagger.v3.oas.annotations.media.Schema;
import ${PageParamClassName};
## 处理 Date 字段的引入
#foreach ($column in $columns)

View File

@ -2,7 +2,7 @@ package ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePac
import lombok.*;
import java.util.*;
import io.swagger.annotations.*;
import io.swagger.v3.oas.annotations.media.Schema;
import ${PageParamClassName};
## 处理 Date 字段的引入
#foreach ($column in $columns)

View File

@ -1,5 +1,6 @@
package ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePackage}.${table.businessName}.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
#foreach ($column in $columns)
#if (${column.javaType} == "LocalDateTime")
@ -7,7 +8,6 @@ import java.time.LocalDateTime;
#break
#end
#end
import io.swagger.annotations.*;
@Schema(description = "${sceneEnum.name} - ${table.classComment} Response VO")
@Data

View File

@ -1,8 +1,8 @@
package ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePackage}.${table.businessName}.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import io.swagger.annotations.*;
import javax.validation.constraints.*;
## 处理 Date 字段的引入
#foreach ($column in $columns)

View File

@ -11,7 +11,6 @@ import cn.iocoder.yudao.module.system.service.notice.NoticeService;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;