Mandatory property is missing

Issue ID: v3-validation-property-required

Description

Your API is missing one or more properties that are mandatory. Either the OpenAPI Specification (OAS) defines them as required, or defining them is mandatory for 42Crunch Platform to be able to properly use your API definition.

The names of objects and properties are case-sensitive, so make sure that you have spelled them correctly.

The following objects and properties are the bare minimum that the OAS requires from an OpenAPI definition and must always be defined:

  • openapi
  • info
    • title
    • version
  • paths

The following objects themselves are optional, but if defined in the API definition, must have the following properties defined:

Object Required properties
Operation responses
Parameter
  • name
  • in
Security Scheme type

For more details, see the OpenAPI Specification.

Example

The following is an example of how this issue could look in your API definition. The info object of this sample API is missing the field version, which is defined as a required property in the OAS:

{
    "info": {
        "title": "My Sample API",
        "description": "This is a sample API."
    }
}

Remediation

Make sure that your API has all the properties that the OAS requires.

{
    "info": {
        "version": "1.0.0",
        "title": "My Sample API",
        "description": "This is a sample API."
    }
}