Required property is missing
Issue ID: v3-semantic-property-required
Description
Your API is missing one or more properties that the OpenAPI Specification (OAS) defines as required. If you do not define all required properties, your API definition does not fully conform to the OAS.
The names of objects and properties are case-sensitive, so make sure that you have spelled them correctly.
The following objects themselves are optional, but if defined in the API definition, must have the following properties defined:
Object | Required properties |
---|---|
External Documentation | url
|
Discriminator | propertyName
|
License | name
|
Request Body | content
|
Response | description
|
Server Variable | default
|
Tag | name
|
For more details, see the OpenAPI Specification.
Example
The following is an example of how this issue could look in your API definition. The license
object of this sample API is missing the field name
, which is defined as a required property in the OAS:
{
"license": {
"description": "This is a sample license."
}
}
Remediation
Make sure that your API has all the properties that the OAS requires.
{
"license": {
"name": "My Sample License",
"description": "This is a sample license."
}
}