Required property missing from an OpenAPI 3.0 object

Include the required properties for each OpenAPI object.

Description

In OpenAPI 3.0, info must contain title and version, and each Response Object needs a description.

Potential impact

Missing fields can stop documentation or client generation.

Remediation

Check the root openapi, info and paths fields, then the required fields of each nested object. Fill them with the API’s actual details and validate the complete document.

Examples

The example has a version but omits info.title.

Before

json
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "contact": {
      "name": "contact",
      "url": "/",
      "email": "user@gmail.com"
    }
  },
  "paths": {}
}

After

json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Simple API Overview",
    "version": "1.0.0",
    "contact": {
      "name": "contact",
      "url": "/",
      "email": "user@gmail.com"
    }
  },
  "paths": {}
}

An empty paths object is valid here. It declares no operations.

References