Body parameter must have the 'schema' property defined
Issue ID: validation-parameter-body-required
Description
The body parameter in question is missing the schema property. Body parameters must 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:
{
"post": {
"description": "Creates a new pet in the store",
"operationId": "addPet",
"parameters": [
{
"name": "pet",
"in": "body",
"description": "pet to add to the system",
"required": true
}
]
}
}Remediation
Make sure that all body parameters have the schema property defined.
{
"post": {
"description": "Creates a new pet in the store",
"operationId": "addPet",
"parameters": [
{
"name": "pet",
"in": "body",
"description": "pet to add to the system",
"required": true,
"schema": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
// ...
}
}
}
]
}
}