Skip to content

Commit aebc301

Browse files
committed
feature: swagger自动化模板优化
1 parent 3b93a07 commit aebc301

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

server/resource/package/server/api/api.go.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func ({{.Abbreviation}}Api *{{.StructName}}Api) Update{{.StructName}}(c *gin.Con
122122
// @accept application/json
123123
// @Produce application/json
124124
// @Param data query {{.Package}}.{{.StructName}} true "用id查询{{.Description}}"
125-
// @Success 200 {object} response.Response{data=object{re{{.Abbreviation}}={{.Package}}.{{.StructName}}},msg=string} "查询成功"
125+
// @Success 200 {object} response.Response{data={{.Package}}.{{.StructName}}},msg=string} "查询成功"
126126
// @Router /{{.Abbreviation}}/find{{.StructName}} [get]
127127
func ({{.Abbreviation}}Api *{{.StructName}}Api) Find{{.StructName}}(c *gin.Context) {
128128
{{.PrimaryField.FieldJson}} := c.Query("{{.PrimaryField.FieldJson}}")

server/resource/plugin/server/api/api.go.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func (a *{{.Abbreviation}}) Update{{.StructName}}(c *gin.Context) {
124124
// @accept application/json
125125
// @Produce application/json
126126
// @Param data query model.{{.StructName}} true "用id查询{{.Description}}"
127-
// @Success 200 {object} response.Response{data=object{model.{{.StructName}}},msg=string} "查询成功"
127+
// @Success 200 {object} response.Response{data=model.{{.StructName}},msg=string} "查询成功"
128128
// @Router /{{.Abbreviation}}/find{{.StructName}} [get]
129129
func (a *{{.Abbreviation}}) Find{{.StructName}}(c *gin.Context) {
130130
{{.PrimaryField.FieldJson}} := c.Query("{{.PrimaryField.FieldJson}}")

0 commit comments

Comments
 (0)