Skip to content

Commit

Permalink
requestBody: fix requestBody (getkin#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
rikkkky authored and fenollp committed Jul 2, 2018
1 parent 5918480 commit 98b2d88
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion openapi2conv/openapi2_conv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const exampleV3 = `
"name": "x"
}
],
"body": {
"requestBody": {
"content": {
"application/json": {
"schema": {}
Expand Down
2 changes: 1 addition & 1 deletion openapi3/operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type Operation struct {
Parameters Parameters `json:"parameters,omitempty"`

// Optional body parameter.
RequestBody *RequestBodyRef `json:"body,omitempty"`
RequestBody *RequestBodyRef `json:"requestBody,omitempty"`

// Optional responses.
Responses Responses `json:"responses,omitempty"`
Expand Down
4 changes: 2 additions & 2 deletions openapi3/swagger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ paths:
post:
parameters:
- "$ref": "#/components/parameters/someParameter"
body:
requestBody:
"$ref": "#/components/requestBodies/someRequestBody"
responses:
'200':
Expand Down Expand Up @@ -161,7 +161,7 @@ var specJSON = []byte(`
"$ref": "#/components/parameters/someParameter"
}
],
"body": {
"requestBody": {
"$ref": "#/components/requestBodies/someRequestBody"
},
"responses": {
Expand Down

0 comments on commit 98b2d88

Please sign in to comment.