Skip to content

Commit

Permalink
fix(core): make body required if set
Browse files Browse the repository at this point in the history
  • Loading branch information
Nightapes committed Sep 8, 2021
1 parent 71d83e6 commit 522073b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/openapi/openapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ func (a *API) toPath(desc PathDesc, pathBuilder *PathBuilder) (*Operation, *Hand
a.OpenAPI.Components.Schemas[s] = t
}
ops.RequestBody = &RequestBody{
Required: true,
Content: map[string]*MediaType{
"application/json": {Schema: &SchemaRef{Ref: body.Ref}, Example: desc.GetRequestBody()},
},
Expand Down

0 comments on commit 522073b

Please sign in to comment.