oas3-schema
This rule validates the document against the OpenAPI 3.0, 3.1 or 3.2 schema built into libopenapi.
What is this rule checking for?
Required fields, permitted properties, value types and combinations of fields.
Invalid combinations include:
- Both
exampleandexampleson the same 3.1 Parameter or Media Type Object. encodingwithprefixEncodingoritemEncodingin 3.2, including nested encodings.- XML
nodeTypewithattributeorwrappedin 3.2, even when set tofalse. - Invalid header names and prohibited
allowReservedfields in 3.2. descriptionon a 3.2 Media Type Object.
Null operations such as get: null fail schema validation. Use an Operation Object with the required fields.
Link fields
A Link Object can include server. Use requestBody for its request-body value. body is not a permitted field.
components:
links:
next:
operationId: listPets
server:
url: https://api.example.com
The document relationships rule checks that listPets exists.
Why did this violation appear?
A field, value or combination of fields does not match the document’s OpenAPI version.
How do I fix this violation?
Correct the reported field. Use the diagnostic’s file, line and path to find it.