Description
desc is not a recognized field on an OpenAPI 2.0 body parameter.
Potential impact
Tools may ignore the field or reject the definition.
Remediation
Put explanatory text in description and the body’s type in schema. Give custom extensions an x- prefix and check that your tools support them.
Examples
The revision removes desc from limit and changes its body type from string to integer to represent a record count.
Before
json
{
"name": "limit",
"in": "body",
"description": "max records to return",
"required": true,
"schema": {
"type": "string"
},
"desc": {
"type": "string"
}
}
After
json
{
"name": "limit",
"in": "body",
"description": "max records to return",
"required": true,
"schema": {
"type": "integer"
}
}