修复生成的结构体 tag 字段错误以及其它注释和尾部空格问题 (#1968)

* 修复生成的结构体 tag 字段错误

* 移除字段注释多余尾部空格

* 文件模板注释 `@accept` 保持规范
This commit is contained in:
Feng.YJ
2024-12-20 16:50:45 +08:00
committed by GitHub
parent 93c0525ea5
commit 532d282509
8 changed files with 60 additions and 60 deletions

View File

@@ -3,7 +3,7 @@ import service from '@/utils/request'
// @Tags {{.StructName}}
// @Summary 创建{{.Description}}
// @Security ApiKeyAuth
// @accept application/json
// @Accept application/json
// @Produce application/json
// @Param data body model.{{.StructName}} true "创建{{.Description}}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
@@ -19,7 +19,7 @@ export const create{{.StructName}} = (data) => {
// @Tags {{.StructName}}
// @Summary 删除{{.Description}}
// @Security ApiKeyAuth
// @accept application/json
// @Accept application/json
// @Produce application/json
// @Param data body model.{{.StructName}} true "删除{{.Description}}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
@@ -35,7 +35,7 @@ export const delete{{.StructName}} = (params) => {
// @Tags {{.StructName}}
// @Summary 批量删除{{.Description}}
// @Security ApiKeyAuth
// @accept application/json
// @Accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除{{.Description}}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
@@ -51,7 +51,7 @@ export const delete{{.StructName}}ByIds = (params) => {
// @Tags {{.StructName}}
// @Summary 更新{{.Description}}
// @Security ApiKeyAuth
// @accept application/json
// @Accept application/json
// @Produce application/json
// @Param data body model.{{.StructName}} true "更新{{.Description}}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
@@ -67,7 +67,7 @@ export const update{{.StructName}} = (data) => {
// @Tags {{.StructName}}
// @Summary 用id查询{{.Description}}
// @Security ApiKeyAuth
// @accept application/json
// @Accept application/json
// @Produce application/json
// @Param data query model.{{.StructName}} true "用id查询{{.Description}}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
@@ -83,7 +83,7 @@ export const find{{.StructName}} = (params) => {
// @Tags {{.StructName}}
// @Summary 分页获取{{.Description}}列表
// @Security ApiKeyAuth
// @accept application/json
// @Accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取{{.Description}}列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
@@ -100,7 +100,7 @@ export const get{{.StructName}}List = (params) => {
// @Tags {{.StructName}}
// @Summary 获取数据源
// @Security ApiKeyAuth
// @accept application/json
// @Accept application/json
// @Produce application/json
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /{{.Abbreviation}}/find{{.StructName}}DataSource [get]
@@ -114,7 +114,7 @@ export const get{{.StructName}}DataSource = () => {
{{- end}}
// @Tags {{.StructName}}
// @Summary 不需要鉴权的{{.Description}}接口
// @accept application/json
// @Accept application/json
// @Produce application/json
// @Param data query request.{{.StructName}}Search true "分页获取{{.Description}}列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
@@ -124,4 +124,4 @@ export const get{{.StructName}}Public = () => {
url: '/{{.Abbreviation}}/get{{.StructName}}Public',
method: 'get',
})
}
}