feat: 修复分组、标签、描述不现实问题

This commit is contained in:
2026-01-06 21:59:41 +08:00
parent d45d6e7890
commit d1b5e16d35

View File

@@ -237,7 +237,7 @@ func (g *Generate) initApiConfig(apiMeta define.UriConfig) (*openapi3.Operation,
Origin: nil,
Ref: "",
Summary: apiMeta.Desc,
Description: "",
Description: apiMeta.Desc,
Connect: nil,
Delete: nil,
Get: nil,
@@ -254,6 +254,10 @@ func (g *Generate) initApiConfig(apiMeta define.UriConfig) (*openapi3.Operation,
newOperate := openapi3.NewOperation()
newOperate.Parameters = make(openapi3.Parameters, 0)
newOperate.Responses = openapi3.NewResponses()
newOperate.Summary = apiMeta.Desc
newOperate.Description = apiMeta.Desc
newOperate.Tags = apiMeta.TagList
newOperate.OperationID = fmt.Sprintf("%v_%v", apiMeta.RequestMethod, apiMeta.Path)
isRead := false
switch apiMeta.RequestMethod {
case http.MethodGet: