Multiple entries in the 'content' property of a parameter
Issue ID: v3-validation-content-length
Description
You have defined more than one entry in the content
property of the parameter
object in question. The content
property cannot contain more than one entry.
For more details, see the OpenAPI Specification.
Example
The following is an example of how this issue could look in your API definition:
{
"parameters": [
{
"name": "foo",
"in": "header",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SchemaOne"
}
},
"text/xml": {
"schema": {
"$ref": "#/components/schemas/SchemaTwo"
}
}
}
}
]
}
Remediation
Make sure that you have defined only one entry in the content
property of a parameter
object.
{
"parameters": [
{
"name": "foo",
"in": "header",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SchemaOne"
}
}
}
}
]
}