feat: 数据响应使用ref引用方式
This commit is contained in:
@@ -247,23 +247,12 @@ func (g *Generate) AddApiDoc(docFlag string, apiMeta define.UriConfig, request a
|
||||
Origin: nil,
|
||||
Ref: "",
|
||||
Value: &openapi3.Response{
|
||||
Extensions: nil,
|
||||
Origin: nil,
|
||||
Description: &desc,
|
||||
Headers: nil,
|
||||
Content: map[string]*openapi3.MediaType{
|
||||
consts.MimeTypeJson: {
|
||||
Extensions: nil,
|
||||
Origin: nil,
|
||||
Schema: &openapi3.SchemaRef{
|
||||
Extensions: nil,
|
||||
Origin: nil,
|
||||
Ref: "#/components/schemas/" + strings.TrimLeft(responseTypeStr, "*"),
|
||||
Value: nil,
|
||||
Ref: "#/components/schemas/" + strings.TrimLeft(responseTypeStr, "*"),
|
||||
},
|
||||
Example: nil,
|
||||
Examples: nil,
|
||||
Encoding: nil,
|
||||
},
|
||||
},
|
||||
Links: nil,
|
||||
|
||||
Reference in New Issue
Block a user