Body parameter is missing schema (OpenAPI 2.0)

The schema describing the request body is missing

Description

An OpenAPI 2.0 in: body parameter requires a schema defining the request body’s type and structure. Without it, the body format is not clearly specified.

Potential impact

Clients may send an incorrect body, or code generation and specification validation may fail.

Remediation

Add a schema matching the actual request body. Define its type and necessary fields; a shared model can reference a reusable definition.

Examples

These parameter examples add a schema for an integer request body.

Before

json
{
  "name": "limit",
  "in": "body",
  "description": "max records to return",
  "required": true
}

After

json
{
  "name": "limit",
  "in": "body",
  "description": "max records to return",
  "required": true,
  "schema": {
    "type": "integer"
  }
}

References