release goctl swagger (#4829)

This commit is contained in:
kesonan
2025-05-04 14:05:41 +08:00
committed by GitHub
parent 493f3bad0f
commit c3820a95c1
5 changed files with 10 additions and 11 deletions

View File

@@ -5,7 +5,7 @@ import (
apiSpec "github.com/zeromicro/go-zero/tools/goctl/api/spec"
)
func jsonResponseFromType(info apiSpec.Info, tp apiSpec.Type) *spec.Responses {
func jsonResponseFromType(info apiSpec.Info, atDoc apiSpec.AtDoc, tp apiSpec.Type) *spec.Responses {
p, _ := propertiesFromType(tp)
props := spec.SchemaProps{
Type: typeFromGoType(tp),
@@ -19,7 +19,7 @@ func jsonResponseFromType(info apiSpec.Info, tp apiSpec.Type) *spec.Responses {
Default: &spec.Response{
ResponseProps: spec.ResponseProps{
Schema: &spec.Schema{
SchemaProps: wrapCodeMsgProps(props, info),
SchemaProps: wrapCodeMsgProps(props, info, atDoc),
},
},
},