Non-body parameter must not define the 'schema' property
Issue ID: validation-parameter-notbody-schema
Description
The parameter in question is not a body parameter, but it has the schema
property defined. Non-body parameters must not have the schema
property defined.
For more details, see the OpenAPI Specification.
Example
The following is an example of how this issue could look in your API definition:
{
"name": "IDs",
"in": "query",
"description": "IDs to fetch",
"required": false,
"schema": {
"type": "object",
"required": [
"IDlist"
],
"properties": {
"IDlist": {
"type": "array",
"items": {
"type": "integer"
// ...
},
"collectionFormat": "multi"
}
}
}
}
Remediation
Make sure that non-body parameters do not have the schema
property defined.
{
"name": "IDs",
"in": "query",
"description": "IDs to fetch",
"required": false,
"type": "array",
"items": {
"type": "integer"
// ...
},
"collectionFormat": "multi"
}