Skip to content

Commit

Permalink
fix the range parser bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hao.pi committed Nov 26, 2024
1 parent 80a696b commit 468350f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions generate/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ func renderStruct(member spec.Member) swaggerParameterObject {
ftype = tempKind.String()
format = "UNKNOWN"
}
sp := swaggerParameterObject{In: "query", Type: ftype, Format: format}
sp := swaggerParameterObject{In: "query", Type: ftype, Format: format, Schema: &swaggerSchemaObject{}}

for _, tag := range member.Tags() {
if tag.Key == validateKey {
Expand Down Expand Up @@ -708,7 +708,7 @@ func parseHeader(m spec.Member, parameters []swaggerParameterObject) []swaggerPa
ftype = tempKind.String()
format = "UNKNOWN"
}
sp := swaggerParameterObject{In: "header", Type: ftype, Format: format}
sp := swaggerParameterObject{In: "header", Type: ftype, Format: format, Schema: &swaggerSchemaObject{}}

for _, tag := range m.Tags() {
sp.Name = tag.Name
Expand Down

0 comments on commit 468350f

Please sign in to comment.