Skip to content

Commit

Permalink
fix(request): handle enums in request struct
Browse files Browse the repository at this point in the history
  • Loading branch information
Nightapes committed Jan 20, 2022
1 parent 522073b commit 52eecab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/openapi/openapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ func (a *API) toPath(desc PathDesc, pathBuilder *PathBuilder) (*Operation, *Hand
if desc.GetRequestBody() != nil {
body := a.jsonschemaRefl.Reflect(desc.GetRequestBody())
for s, t := range body.Definitions {
a.handleEnumInProperties(t)
a.handleEnumInArrays(t)
a.OpenAPI.Components.Schemas[s] = t
}
ops.RequestBody = &RequestBody{
Expand Down

0 comments on commit 52eecab

Please sign in to comment.