Skip to content

Commit

Permalink
feat(swagger): default tag in param also mean optional (#421)
Browse files Browse the repository at this point in the history
Co-authored-by: Pengfei Xue <[email protected]>
  • Loading branch information
caicloud-bot and Pengfei Xue authored Dec 18, 2020
1 parent 1a88b7d commit 7973a4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/generators/swagger/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ func (g *Generator) enum(typ *api.Type) []spec.Parameter {
Description: g.escapeNewline(field.Comments),
Type: field.Type,
Default: defaultValue,
Optional: optional,
Optional: optional || defaultExist,
})
}
} else {
Expand Down

0 comments on commit 7973a4f

Please sign in to comment.