You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RequestBody looses parameter name when type is array #378
When OpenApiV2Deserializer creates RequestBody, the parameter's name when the type is "array".
"put": {
"tags": [
"Users"
],
"summary": "Updates a user's list of groups.",
"description": "Updates the unordered list of group IDs for the specified user.",
"parameters": [
{
"name": "id",
"in": "path",
"description": "The ID of the user.",
"required": true,
"type": "string"
},
{
"name": "groupIds", // <--------- nowhere to be found
"in": "body",
"description": "The unordered list of groups for the specified user.",
"required": true,
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
],
"responses": { ... }
}
Yes. This is an unfortunate side effect of the changes made in OpenAPI v3. There is no place for that name in V3. It was dropped because there is no logical place in HTTP for naming a request body. I have discussed this with some folks and we have debated inserting a x-name property in the request body when translating from V2 to V3.
Activity
darrelmiller commentedon Feb 2, 2019
Yes. This is an unfortunate side effect of the changes made in OpenAPI v3. There is no place for that name in V3. It was dropped because there is no logical place in HTTP for naming a request body. I have discussed this with some folks and we have debated inserting a
x-nameproperty in the request body when translating from V2 to V3.darrelmiller commentedon Mar 15, 2021
Fixed in #511