When parsing and converting a OAS 2 doc to OAS 3, I find that the requestBody field is not being created if the original doc has its Parameters defined as a list of $refs like so:
OAS 2:
post:
consumes:
- application/json
- application/x-www-form-urlencoded
description: ''
operationId: createBlock
parameters:
- $ref: '#/parameters/UsernamePath'
- $ref: '#/parameters/Block'
- $ref: '#/parameters/DashboardIDPath'
responses: ...
OAS3:
"post" : {
"tags" : [ "Blocks" ],
"summary" : "Create a new Block",
"operationId" : "createBlock",
"parameters" : [ {
"$ref" : "#/components/parameters/UsernamePath",
"extensions" : { }
}, {
"$ref" : "#/components/requestBodies/Block",
"extensions" : { }
}, {
"$ref" : "#/components/parameters/DashboardIDPath",
"extensions" : { }
} ],
"responses" : { ...
The references are correctly resolved to rightful locations, but the field for requestBody is absent. Furthermore, the parameter that should now be included in requestBody is still under parameters.
Doc in question:
https://api.apis.guru/v2/specs/adafruit.com/2.0.0/swagger.yaml
When parsing and converting a OAS 2 doc to OAS 3, I find that the
requestBodyfield is not being created if the original doc has its Parameters defined as a list of $refs like so:OAS 2:
OAS3:
The references are correctly resolved to rightful locations, but the field for
requestBodyis absent. Furthermore, the parameter that should now be included inrequestBodyis still underparameters.Doc in question:
https://api.apis.guru/v2/specs/adafruit.com/2.0.0/swagger.yaml