Define & Validate APIsValidation RulesetsOpenAPI Rulesets

OpenAPI v3 Standard Validation

Validation checks performed on provided OpenAPI v3 file to check its conformance to rules set by the OpenAPI v3 official standards document.

PropertyValue
Ruleset IDopenapi-v3-standards-validation
Code prefixOPENAPI3STANDARDS_V
TypeValidation
Default severityError
Rule systemSemantic
Rules155

Rules marked (disabled) are turned off by default, so they don't report issues.

OpenAPI Root Information

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V001required-openapi-versionBlockingThe OpenAPI specification's root object must specify the openapi property to indicate the version of the OpenAPI standard document you are using to define your specification.
OPENAPI3STANDARDS_V002valid-openapi-versionErrorYour OpenAPI specification's root object must specify a valid OpenAPI standard document version using the openapi property. The value must be a valid semantic version number of the OpenAPI standard document in the 3.0.n or 3.1.n range e.g. 3.0.3, 3.1.0, etc.
OPENAPI3STANDARDS_V003required-api-infoErrorThe OpenAPI root object must specify metadata about the API using the info property.
OPENAPI3STANDARDS_V004required-pathsErrorThe OpenAPI root object in an OpenAPI v3.0.x document must specify the available paths and operations for the API using the paths property.
OPENAPI3STANDARDS_V005required-paths-or-components-or-webhooksErrorThe OpenAPI root object in an OpenAPI v3.1.x document must specify at least one of the following: available paths and operations for the API using the paths property OR reusable components using the components property OR information about incoming webhooks using the webhooks property.
OPENAPI3STANDARDS_V006unique-webhooks-keyErrorThe key name assigned to the entries in the OpenAPI Object webhooks map must be a unique string to refer to each webhook.

Info

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V010required-info-titleErrorThe Info Object must specify a title of the API using the title property.
OPENAPI3STANDARDS_V011required-info-versionErrorThe Info Object must specify a version number for the current API specification document using the version property.

License

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V020required-license-nameErrorThe License Object must specify name of the license (used for the API) using the name property.
OPENAPI3STANDARDS_V021license-identifier-and-url-are-mutually-exclusiveWarningThe properties identifier and url in License Object are mutually exclusive. This means that in a License Object instance, only one of these properties must be present at a time but not both.

Servers

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V025required-server-urlErrorThe Server Object must specify a URL for the target API host using the url property.

Server Variables

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V030required-server-variable-default-valueErrorThe Server Variable Object must specify a default value for the variable using the 'default' property that can be substituted in the server URL in case no other value is supplied at the time of making the request. If the default value is not provided, a dummy value will be assigned automatically during import/transformations in APIMatic.
OPENAPI3STANDARDS_V031at-least-one-item-in-server-variable-enum-listErrorIf an enumeration list is declared using the enum property it must contain at least one string-valued entry which can be used for substitution i.e. the enumeration array must not be empty.
OPENAPI3STANDARDS_V032valid-server-variable-default-value-for-enumErrorIf a default value is provided for the server variable and an enumeration list is also defined using the enum property, the default value must exist in this list.

Paths

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V035unique-pathErrorPath keys are patterned fields that must have unique values within the Paths Object.
OPENAPI3STANDARDS_V036pre-defined-path-parameter-for-path-url-template-expressionErrorA path parameter referenced in the path URL must be defined within every Operation Object associated with the Path Item Object, or defined once globally in the Path Item Object parameters. An exception is if the path item is empty, for example due to ACL constraints, matching path parameters are not required.
OPENAPI3STANDARDS_V037non-identical-templated-pathsErrorWhen matching URLs, concrete (non-templated) paths are matched before their templated counterparts. Templated paths with the same hierarchy but different templated names must not exist as they are considered identical.

Path Items

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V045path-item-reference-is-a-path-item-objectErrorWhen $ref is used within a Path Item Object, it must point to a valid Path Item Object defined elsewhere and which will replace the current Path Item Object with its contents. The $ref must eventually resolve into a Path Item Object (and no other type of object). The resolved object should not contain $ref as a property i.e. the references must not form an endless loop.
OPENAPI3STANDARDS_V046unique-path-item-parameterErrorThe parameters list provided using the parameters property in the Path Item Object must not include any duplicate parameter definitions. A unique parameter is defined by a combination of its name and location.

Operations

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V050required-operation-responsesErrorThe Operation Object in an OpenAPI v3.0.x document must specify list of possible responses that can be returned from executing this operation, using the responses property.
OPENAPI3STANDARDS_V051unique-operation-idErrorThe id specified in the Operation Object using the operationId property must be unique among all operations described in the current API specification document.
OPENAPI3STANDARDS_V052unique-operation-parameterErrorThe parameters list provided using the parameters property in the Operation Object must not include any duplicate parameter definitions. A unique parameter is defined by a combination of its name and location.
OPENAPI3STANDARDS_V053get-operation-cannot-have-request-bodyWarningHTTP methods like GET, DELETE, HEAD are not allowed to have a request body since a payload for these methods do not have any defined semantics. If request body is defined for non-body HTTP verbs, it will get ignored automatically during import/transformations in APIMatic. Therefore, in OpenAPI as well, the GET Operation Object must not set the requestBody property.
OPENAPI3STANDARDS_V054delete-operation-cannot-have-request-bodyWarningHTTP methods like GET, DELETE, HEAD are not allowed to have a request body since a payload for these methods do not have any defined semantics. If request body is defined for non-body HTTP verbs, it will get ignored. Therefore, in OpenAPI as well, the DELETE Operation Object must not set the requestBody property.
OPENAPI3STANDARDS_V055head-operation-cannot-have-request-bodyWarningHTTP methods like GET, DELETE, HEAD are not allowed to have a request body since a payload for these methods do not have any defined semantics. If request body is defined for non-body HTTP verbs, it will get ignored. Therefore, in OpenAPI as well, the HEAD Operation Object must not set the requestBody property.
OPENAPI3STANDARDS_V056unique-operation-callback-keyErrorThe key of the Operation Object level callbacks map must be a unique identifier for the Callback Object.

External Documentation

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V070required-external-documentation-urlErrorThe External Documentation Object must specify the URL for the target documentation using the url property.

Parameters

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V075required-parameter-nameErrorThe Parameter Object must specify a name for the parameter using the name property. The name is API/service defined and must not be null or empty.
OPENAPI3STANDARDS_V076required-parameter-locationErrorThe Parameter Object must specify a location for the parameter using the in property. The location identifies where the parameter needs to be sent in the request and must not be null or empty. Possible values are 'query', 'header', 'path' or 'cookie'.
OPENAPI3STANDARDS_V077required-parameter-schema-or-contentErrorThe Parameter Object must define the type schema for the parameter using either the schema or content property. The former is used more commonly while the latter is recommended for more complex scenarios involving media types. However, at one time, only one of these properties must be present and not both.
OPENAPI3STANDARDS_V078parameter-schema-and-content-are-mutually-exclusiveErrorThe properties schema and content in Parameter Object are mutually exclusive. This means that in a Parameter Object instance, only one of these properties must be present at a time but not both.
OPENAPI3STANDARDS_V079valid-parameter-locationErrorLocation of a parameter specified using the in property in the Parameter Object must have one of the following possible values only: query, header, path or cookie. All other values will be treated as invalid.
OPENAPI3STANDARDS_V080path-parameter-exists-in-path-url-templateErrorIf a parameter is defined in the parameters list with location set as path, a corresponding URL segment in the path URL must exist for that parameter. A path URL can use curly braces ({}) to mark a section of a URL path as replaceable with a path parameter value. The name specified within these braces must match exactly with the name of the path parameter defined in the parameters list.
OPENAPI3STANDARDS_V081required-path-parameter-required-attributeErrorIf the Parameter Object location is set to path it must specify the property required with value set to true.
OPENAPI3STANDARDS_V082path-parameter-cannot-be-optionalErrorIf the location is set as path, the parameter must be set as required using the property required of the Parameter Object. The value of this property must be set to true.
OPENAPI3STANDARDS_V083no-accept-header-parameter-definitionWarningThe parameters list must not contain an explicit definition for the Accept header parameter. If a definition is added, it will be ignored.
OPENAPI3STANDARDS_V084no-content-type-header-parameter-definitionWarningThe parameters list must not contain an explicit definition for the Content-Type header parameter. If a definition is added, it will be ignored.
OPENAPI3STANDARDS_V085no-authorization-header-parameter-definitionWarningThe parameters list must not contain an explicit definition for the Authorization header parameter. If a definition is added, it will be ignored.
OPENAPI3STANDARDS_V086valid-parameter-styleErrorThe property style in a Parameter Object can have only one of the following possible values: matrix, label, form, simple, spaceDelimited, pipeDelimited or deepObject. All other values will be treated as invalid.
OPENAPI3STANDARDS_V087valid-query-parameter-styleErrorFor query parameters, only the following styles are applicable: form, spaceDelimited, pipeDelimited or deepObject. Rest will be treated as invalid.
OPENAPI3STANDARDS_V088valid-path-parameter-styleErrorFor path parameters, only the following styles are applicable: matrix, label, or simple. Rest will be treated as invalid.
OPENAPI3STANDARDS_V089valid-header-parameter-styleErrorFor header parameters, only the simple style is applicable and rest will be treated as invalid.
OPENAPI3STANDARDS_V090valid-cookie-parameter-styleErrorFor cookie parameters, only the form style is applicable and rest will be treated as invalid.
OPENAPI3STANDARDS_V091parameter-simple-style-only-for-array-typeErrorThe simple style can only be used when the type of the parameter is set as array i.e. it cannot be used for primitive or object types.
OPENAPI3STANDARDS_V092parameter-space-delimited-style-only-for-array-typeErrorIn an OpenAPI v3.0.x document, the spaceDelimited style can only be used when the type of the parameter is set as array i.e. it cannot be used for primitive or object types.
OPENAPI3STANDARDS_V093parameter-pipe-delimited-style-only-for-array-typeErrorIn an OpenAPI v3.0.x document, the pipeDelimited style can only be used when the type of the parameter is set as array i.e. it cannot be used for primitive or object types.
OPENAPI3STANDARDS_V094parameter-deep-object-style-only-for-object-typeErrorThe deepObject style can only be used when the type of the parameter is set as object i.e. it cannot be used for primitive or array types.
OPENAPI3STANDARDS_V095no-allow-empty-value-for-simple-style-parameterWarningEmpty valued parameters cannot be serialized when using the simple style type. Therefore, for such cases, the value of allowEmptyValue will be ignored.
OPENAPI3STANDARDS_V096no-allow-empty-value-for-space-delimited-style-parameterWarningEmpty valued parameters cannot be serialized when using the spaceDelimited style type. Therefore, for such cases, the value of allowEmptyValue will be ignored.
OPENAPI3STANDARDS_V097no-allow-empty-value-for-pipe-delimited-style-parameterWarningEmpty valued parameters cannot be serialized when using the pipeDelimited style type. Therefore, for such cases, the value of allowEmptyValue will be ignored.
OPENAPI3STANDARDS_V098no-allow-empty-value-for-deep-object-style-parameterWarningEmpty valued parameters cannot be serialized when using the deepObject style type. Therefore, for such cases, the value of allowEmptyValue will be ignored.
OPENAPI3STANDARDS_V099parameter-example-and-examples-are-mutually-exclusiveWarningThe properties example and examples in Parameter Object are mutually exclusive. This means that in a Parameter Object instance, only one of these properties must be present at a time but not both.
OPENAPI3STANDARDS_V100parameter-example-overrides-schema-exampleInformationAn example for a parameter can be provided in multiple ways: either directly in the Parameter Object using the examples/example property or within the parameter level schema definition using the example property. If an example is provided at both levels, the Parameter Object level example will override the Schema Object level example.
OPENAPI3STANDARDS_V101parameter-examples-override-schema-exampleInformationAn example for a parameter can be provided in multiple ways: either directly in the Parameter Object using the examples/example property or within the parameter level schema definition using the example property. If an example is provided at both levels, the Parameter Object level examples will override the Schema Object level example.
OPENAPI3STANDARDS_V102single-entry-parameter-content-mapErrorThe content property of the Parameter Object is a map that contains representations of the parameter such that the key represents the media type while the value describes the parameter schema. This content map must contain only one entry.
OPENAPI3STANDARDS_V103parameter-space-delimited-style-only-for-array-or-object-typesErrorIn an OpenAPI v3.1.x document, the spaceDelimited style can only be used when the type of the parameter is set as array or object i.e. it cannot be used for primitive types.
OPENAPI3STANDARDS_V104parameter-pipe-delimited-style-only-for-array-or-object-typesErrorIn an OpenAPI v3.1.x document, the pipeDelimited style can only be used when the type of the parameter is set as array or object i.e. it cannot be used for primitive types.

Request Body

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V120required-request-body-contentErrorThe Request Body Object must define the request body content using the content property.
OPENAPI3STANDARDS_V121multipart-media-type-for-multi-file-request-bodyErrorTo upload multiple files, a multipart media type must be used in the request body definition.

Media Types

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V130required-media-type-schema-for-multipart-request-bodyErrorThe request body multipart media type definition must contain a schema property to define the input parameters to the operation.
OPENAPI3STANDARDS_V131media-type-example-and-examples-are-mutually-exclusiveWarningThe properties example and examples in Media Type Object are mutually exclusive. This means that in a Media Type Object instance, only one of these properties must be present at a time but not both.
OPENAPI3STANDARDS_V132media-type-example-overrides-media-schema-exampleInformationAn example for a media type can be provided in two ways: either directly in the Media Type Object using the example property or in the Schema Object definition when specifying the media type level schema property. If an example is provided at both levels, the Media Type Object level example will override the Schema Object level example.
OPENAPI3STANDARDS_V133media-type-examples-override-media-schema-exampleInformationAn example for a media type can be provided in two ways: either directly in the Media Type Object using the examples property or in the Schema Object definition when specifying the media type level schema property. If an example is provided at both levels, the Media Type Object level examples will override the Schema Object level example.
OPENAPI3STANDARDS_V134media-type-encoding-property-exists-in-schemaErrorIf encoding information is provided for a Media Type Object, the encoding key must indicate name of the property which needs to be encoded. The property indicated this way must be pre-defined in the definition of the property schema of the Media Type Object.
OPENAPI3STANDARDS_V135request-body-encoding-only-for-form-media-typesWarningA Request Body Object can only define encoding information for its content if the media type of the content is specified as multipart or application/x-www-form-urlencoded.
OPENAPI3STANDARDS_V136no-schema-content-media-type-for-pre-defined-file-media-type-valueWarningThe media type for a file upload can be specified in several ways e.g. by using the content key when defining the Media Type Object, the contentType property in the Media Type Object's encoding information, or the contentMediaType property in the Media Type Object's schema definition. When the media type is already specified using the Media Type Object's key, or by the contentType field of an Encoding Object, the contentMediaType keyword will be ignored if present.

Encoding

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V145no-content-type-header-in-encoding-headersWarningThe Content-Type header must not be explicitly defined in the Encoding Object headers section as it is described separately in the contentType section of the Encoding Object. If a definition is found, it will be ignored.
OPENAPI3STANDARDS_V146request-body-encoding-headers-only-for-multipart-media-typeWarningThe Encoding Object referenced by a Request Body Object content definition must define headers only if the content has a multipart media type e.g. multipart/form-data. If headers are defined for a different request body media type, their definition will be ignored.
OPENAPI3STANDARDS_V147valid-encoding-styleErrorThe encoding style behavior follows the same values as those allowed for query parameters, including default values. Therefore, the property style in an Encoding Object can have only one of the following possible values: form, spaceDelimited, pipeDelimited or deepObject. All other values will be treated as invalid.
OPENAPI3STANDARDS_V148encoding-space-delimited-style-only-for-array-typeErrorIn an OpenAPI v3.0.x document, the spaceDelimited style can only be used when the type of the encoding property is set as array i.e. it cannot be used for primitive or object types.
OPENAPI3STANDARDS_V149encoding-pipe-delimited-style-only-for-array-typeErrorIn an OpenAPI v3.0.x document, the pipeDelimited style can only be used when the type of the encoding property is set as array i.e. it cannot be used for primitive or object types.
OPENAPI3STANDARDS_V150encoding-deep-object-style-only-for-object-typeErrorThe deepObject style can only be used when the type of the property is set as object i.e. it cannot be used for primitive or array types.
OPENAPI3STANDARDS_V151request-body-encoding-style-only-for-form-url-encoded-media-typeWarningIn an OpenAPI v3.0.x document, the Encoding Object referenced by a Request Body Object content definition must define style only if the content media type is set as application/x-www-form-urlencoded. If style is defined for a different request body media type, it will be ignored.
OPENAPI3STANDARDS_V152request-body-encoding-explode-only-for-form-url-encoded-media-typeWarningIn an OpenAPI v3.0.x document, the Encoding Object referenced by a Request Body Object content definition must configure explode only if the content media type is set as application/x-www-form-urlencoded. If explode is defined for a different request body media type, it will be ignored.
OPENAPI3STANDARDS_V153request-body-encoding-allow-reserved-only-for-form-url-encoded-media-typeWarningIn an OpenAPI v3.0.x document, the Encoding Object referenced by a Request Body Object content definition must configure allowReserved only if the content media type is set as application/x-www-form-urlencoded. If allowReserved is defined for a different request body media type, it will be ignored.
OPENAPI3STANDARDS_V154no-content-type-with-encoding-styleWarningIf the encoding style value is explicitly defined using the Encoding Object's style property, then the value of property contentType (implicit or explicit) will be ignored.
OPENAPI3STANDARDS_V155no-content-type-with-encoding-explodeWarningIf the encoding explode value is explicitly defined using the Encoding Object's explode property, then the value of property contentType (implicit or explicit) will be ignored.
OPENAPI3STANDARDS_V156no-content-type-with-encoding-allow-reservedWarningIf the encoding configuration allows for reserved characters using the Encoding Object's allowReserved property, then the value of property contentType (implicit or explicit) will be ignored.
OPENAPI3STANDARDS_V157encoding-space-delimited-style-only-for-array-or-object-typesErrorIn an OpenAPI v3.1.x document, the spaceDelimited style can only be used when the type of the encoding property is set as array or object i.e. it cannot be used for primitive types.
OPENAPI3STANDARDS_V158encoding-pipe-delimited-style-only-for-array-or-object-typesErrorIn an OpenAPI v3.1.x document, the pipeDelimited style can only be used when the type of the encoding property is set as array or object i.e. it cannot be used for primitive types.
OPENAPI3STANDARDS_V159request-body-encoding-style-only-for-form-media-typesWarningIn an OpenAPI v3.1.x document, the Encoding Object referenced by a Request Body Object content definition must define style only if the content media type is set as application/x-www-form-urlencoded or multipart/form-data. If style is defined for a different request body media type, it will be ignored.
OPENAPI3STANDARDS_V160request-body-encoding-explode-only-for-form-media-typesWarningIn an OpenAPI v3.1.x document, the Encoding Object referenced by a Request Body Object content definition must configure explode only if the content media type is set as application/x-www-form-urlencoded or multipart/form-data. If explode is defined for a different request body media type, it will be ignored.
OPENAPI3STANDARDS_V161request-body-encoding-allow-reserved-only-for-form-media-typesWarningIn an OpenAPI v3.1.x document, the Encoding Object referenced by a Request Body Object content definition must configure allowReserved only if the content media type is set as application/x-www-form-urlencoded or multipart/form-data. If allowReserved is defined for a different request body media type, it will be ignored.

Responses

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V195unique-response-http-status-codeErrorResponse keys are patterned fields that must have unique values within the Responses Object. The keys represent the HTTP status code/range for each response.
OPENAPI3STANDARDS_V196at-least-one-response-code-in-responsesErrorThe Responses Object must contain at least one response code which is recommended to be the response for a successful operation call.
OPENAPI3STANDARDS_V197required-response-descriptionErrorThe Response Object must define a short user-friendly description of the response using the description property. The description may provide details of what the response means, why the particular response was returned etc. e.g. if the corresponding response status is an error code, the description can provide users more details about why the error occurred.
OPENAPI3STANDARDS_V198no-content-type-response-header-definitionWarningThe Content-Type header must not be explicitly defined in the Response Object headers section as the content section is dedicated for adding this information. If a definition is found, it will be ignored.

Callbacks

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V215unique-callback-expressionErrorCallback Object keys are patterned fields that must have unique values. The keys represent the expression which is evaluated at runtime to identify a URL to use for the callback operation.
OPENAPI3STANDARDS_V216valid-callback-url-expressionErrorCallback Object keys must be valid runtime expressions as defined by the OpenAPI specification. The expression is evaluated at runtime to determine the URL for the callback request. The expression must conform to the runtime expression ABNF grammar defined in the specification.

Examples

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V225example-value-and-external-value-are-mutually-exclusiveWarningThe properties value and externalValue in Example Object are mutually exclusive. This means that in a Example Object instance, only one of these properties must be present at a time but not both.
CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V235required-link-operation-ref-or-idErrorThe Link Object must identify the location of an Operation Object that it targets, using either the operationRef or operationId property. However, at one time, only one of these properties must be present and not both.
OPENAPI3STANDARDS_V236link-operation-id-and-ref-are-mutually-exclusiveWarningThe properties operationId and operationRef in Link Object are mutually exclusive. This means that in a Link Object instance, only one of these properties must be present at a time but not both.
OPENAPI3STANDARDS_V237link-operation-ref-points-to-an-operation-objectErrorThe operationRef is a relative or absolute URI reference that must point to an OAS Operation Object.
OPENAPI3STANDARDS_V238pre-defined-operation-for-link-operation-idErrorThe property operationId in the Link Object must refer uniquely to a pre-existing Operation Object in the current API document.

Headers

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V245no-header-name-propertyErrorAn explicit name property must not be set in the Header Object since that is specified already when defining the headers map.
OPENAPI3STANDARDS_V246no-header-location-propertyErrorAn explicit in property must not be specified in the Header Object to indicate location since the type of object already implicitly implies it to be header.
OPENAPI3STANDARDS_V247valid-header-styleErrorFor headers, only the simple style is applicable and rest will be treated as invalid.
OPENAPI3STANDARDS_V248header-simple-style-only-for-array-typeErrorThe simple style can only be used when the type of the header is set as array i.e. it cannot be used for primitive or object types.
OPENAPI3STANDARDS_V249required-header-schema-or-contentErrorThe Header Object must define the type schema for the header using either the schema or content property. The former is used more commonly while the latter is recommended for more complex scenarios involving media types. However, at one time, only one of these properties must be present and not both.
OPENAPI3STANDARDS_V250header-schema-and-content-are-mutually-exclusiveErrorThe properties schema and content in Header Object are mutually exclusive. This means that in a Header Object instance, only one of these properties must be present at a time but not both.
OPENAPI3STANDARDS_V251header-example-and-examples-are-mutually-exclusiveWarningThe properties example and examples in Header Object are mutually exclusive. This means that in a Header Object instance, only one of these properties must be present at a time but not both.
OPENAPI3STANDARDS_V252header-example-overrides-schema-exampleInformationAn example for a header can be provided in two ways: either directly in the Header Object using the example/examples property or in the Schema Object definition when specifying the header level schema property. If an example is provided at both levels, the Header Object level example will override the Schema Object level example.
OPENAPI3STANDARDS_V253header-examples-override-schema-exampleInformationAn example for a header can be provided in two ways: either directly in the Header Object using the example/examples property or in the Schema Object definition when specifying the header level schema property. If an example is provided at both levels, the Header Object level examples will override the Schema Object level example.
OPENAPI3STANDARDS_V254single-entry-header-content-mapErrorThe content property of the Header Object is a map that contains representations of the header such that the key represents the media type while the value describes the header schema. This content map must contain only one entry.

Tags

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V300required-tag-nameErrorThe Tag Object must specify a user-friendly name for the tag using the name property.
OPENAPI3STANDARDS_V301unique-tag-nameErrorThe list of root OpenAPI Object level tags must have a unique name assigned to them in the Tag Object definition using the name property.

References

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V310object-can-be-a-referenceErrorAn OpenAPI object can be replaced by a Reference Object if the OpenAPI v3 Specification explicitly states that the value may be a reference. You can therefore, not use $ref in objects that do not allow replacement by a Reference Object.
OPENAPI3STANDARDS_V311no-dollar-ref-sibling-propertiesWarningThe Reference Object can only contain the property $ref and any sibling properties are not allowed. If specified, the additional properties will be ignored.
OPENAPI3STANDARDS_V312valid-referenced-objectInformation (disabled)If Reference Object is used for referencing a component located elsewhere, then the type of the referenced component must match with the type of the object in place of which the Reference Object is used. The referenced component must also be valid in accordance with the rules set for the type of the object that uses the Reference Object e.g. if a Reference Object is used for referencing a Parameter Object the rules that apply on the Parameter Object will apply on the referenced component.

Schemas

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V325valid-openapi-schema-typeErrorThe property type in a Schema Object can have only of the following values: array, object, boolean, integer, number, string. Type null can also be used but only for OpenAPI 3.1.x documents. Other types are not allowed.
OPENAPI3STANDARDS_V326schema-multiple-of-greater-than-zeroErrorThe numeric validation keyword multipleOf must have a value that is strictly greater than zero (0).
OPENAPI3STANDARDS_V327schema-non-negative-max-lengthErrorThe numeric validation keyword maxLength must have a non-negative integer value i.e. the value must be greater than or equal to 0.
OPENAPI3STANDARDS_V328schema-non-negative-min-lengthErrorThe numeric validation keyword minLength must have a non-negative integer value i.e. the value must be greater than or equal to 0.
OPENAPI3STANDARDS_V329required-array-schema-itemsErrorThe Schema Object of an OpenAPI 3.0.x document must define the array items using the items property if the schema type is set as array.
OPENAPI3STANDARDS_V330schema-non-negative-max-itemsErrorThe numeric validation keyword maxItems must have a non-negative integer value i.e. the value must be greater than or equal to 0.
OPENAPI3STANDARDS_V331schema-non-negative-min-itemsErrorThe numeric validation keyword minItems must have a non-negative integer value i.e. the value must be greater than or equal to 0.
OPENAPI3STANDARDS_V332schema-non-negative-max-propertiesErrorThe numeric validation keyword maxProperties must have a non-negative integer value i.e. the value must be greater than or equal to 0.
OPENAPI3STANDARDS_V333schema-non-negative-min-propertiesErrorThe numeric validation keyword minProperties must have a non-negative integer value i.e. the value must be greater than or equal to 0.
OPENAPI3STANDARDS_V334at-least-one-property-in-schema-required-listErrorIf property required is specified in the Schema Object of an OpenAPI 3.0.x document, it must be a list containing at least one schema property name that needs to be marked as mandatory.
OPENAPI3STANDARDS_V335unique-properties-in-schema-required-listErrorA property can only be marked as required once in the list of required properties, specified using property required of the Schema Object i.e. the items in this list must be unique.
OPENAPI3STANDARDS_V336schema-property-read-only-or-write-only-but-not-bothErrorA Schema Object property defined in an OpenAPI 3.0.x document under the properties property, cannot be marked as both read-only as well as write-only i.e. the property definition must not set both readOnly and writeOnly as true.
OPENAPI3STANDARDS_V337discriminator-field-must-be-a-required-fieldErrorThe discriminator is the name of the property that decides which schema definition validates the structure of the model. This field must be marked as a required schema field.
OPENAPI3STANDARDS_V338valid-default-value-typeErrorDefault value must conform to the defined type for the Schema Object defined at the same level in an OpenAPI 3.0.x document.
OPENAPI3STANDARDS_V339schema-valid-against-meta-schemaErrorThe Schema Object or the JSON schema resource must be valid against the meta-schema identified by the URI in its $schema property.
OPENAPI3STANDARDS_V340dollar-schema-only-for-root-schema-of-external-schema-resourceErrorIf a schema definition is placed in an external/bare schema resource document (i.e. not an OpenAPI document), the $schema property must only be used in the root schema of that document as it applies to the lexical scope of the entire schema resource. It must not appear in non-resource root schema objects.
OPENAPI3STANDARDS_V341unique-schema-typesErrorIf multiple types are listed in the Schema Object using the type property, each type name in this array/list must be unique.
OPENAPI3STANDARDS_V342valid-schema-content-encodingWarningInformation about how a string value is encoded is provided using the Schema Object contentEncoding property which must be a valid encoding value from RFC 4648 or RFC 2045: base64url, base64, base32, base32hex, base16, hex, 7bit, 8bit, binary, quoted-printable, ietf-token, x-token. These values are compared in a case-insensitive manner.
OPENAPI3STANDARDS_V343at-least-one-item-in-schema-all-of-listErrorThe allOf property in a Schema Object is a logical operator that helps infer data validity based on results of its subschemas. Therefore, if declared, it must contain at least one subschema in its list i.e. the allOf array must not be empty.
OPENAPI3STANDARDS_V344at-least-one-item-in-schema-any-of-listErrorThe anyOf property in a Schema Object is a logical operator that helps infer data validity based on results of its subschemas. Therefore, if declared, it must contain at least one subschema in its list i.e. the anyOf array must not be empty.
OPENAPI3STANDARDS_V345at-least-one-item-in-schema-one-of-listErrorThe oneOf property in a Schema Object is a logical operator that helps infer data validity based on results of its subschemas. Therefore, if declared, it must contain at least one subschema in its list i.e. the oneOf array must not be empty.
OPENAPI3STANDARDS_V346schema-then-only-with-if-clauseErrorProperty then can be used in a Schema Object along with the if clause to apply subschemas conditionally. When if is not present, the then property will be entirely ignored.
OPENAPI3STANDARDS_V347schema-else-only-with-if-clauseErrorProperty else can be used in a Schema Object along with the if clause to apply subschemas conditionally. When if is not present, the else property will be entirely ignored.
OPENAPI3STANDARDS_V348at-least-one-item-in-schema-prefix-items-listErrorThe prefixItems property in a Schema Object helps validate each data instance against a subschema based on its position in the list. Therefore, if declared, it must contain at least one subschema in its list i.e. the prefixItems array must not be empty.
OPENAPI3STANDARDS_V349schema-non-negative-max-containsErrorThe numeric validation keyword maxContains must have a non-negative integer value i.e. the value must be greater than or equal to 0.
OPENAPI3STANDARDS_V350schema-non-negative-min-containsErrorThe numeric validation keyword minContains must have a non-negative integer value i.e. the value must be greater than or equal to 0.
OPENAPI3STANDARDS_V351unique-schema-dependent-required-propertiesErrorEach property in a Schema Object dependentRequired definition must consist of a list of properties that are dependent on it to be considered as required. The items in this list must be unique.

Discriminators

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V400required-discriminator-property-nameErrorThe Discriminator Object must specify the name of the property in the payload that will hold the discriminator value, using the propertyName property.
OPENAPI3STANDARDS_V401no-additional-property-in-discriminator-objectWarningIn OpenAPI v3.0.x, the Discriminator Object cannot be extended with additional properties with or without the use of specification extensions (i.e. properties with names beginning with x-). Only the properties listed explicitly in the specification document for this object can be used and any other properties cannot be added. This rule does not apply to OpenAPI 3.1.x documents.

Security Schemes

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V410required-security-scheme-typeErrorThe Security Scheme Object must specify the type of the security scheme using the type property.
OPENAPI3STANDARDS_V411valid-security-scheme-typeErrorThe type of the security scheme specified using property type of the Security Scheme Object must have only one of the following values: apiKey, http, oauth2, openIdConnect. Type mutualTLS can also be used but only for OpenAPI v3.1.x documents. Other types are not supported or allowed.
OPENAPI3STANDARDS_V412required-api-key-security-scheme-parameter-nameErrorIf the security scheme type is API Key (i.e. type is set to apiKey), the Security Scheme Object must specify a name for the API Key parameter using the name property.
OPENAPI3STANDARDS_V413required-api-key-security-scheme-parameter-locationErrorIf the security scheme type is API Key (i.e. type is set to apiKey), the Security Scheme Object must specify a location for the API Key parameter using the in property. Valid values for location include query, header and cookie.
OPENAPI3STANDARDS_V414valid-api-key-security-scheme-parameter-locationErrorThe location of the API key specified using property in of the Security Scheme Object must have only one of the following values: query, header, cookie. Other types are not supported nor allowed.
OPENAPI3STANDARDS_V415required-scheme-of-http-security-schemeErrorIf the security scheme type is HTTP (i.e. type is set to http), the Security Scheme Object must specify a name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235, using the scheme property. The value of the scheme used should be registered in the IANA Authentication Scheme registry.
OPENAPI3STANDARDS_V416required-oauth2-security-scheme-flowsErrorIf the security scheme type is OAuth 2.0 (i.e. type is set to oauth2), the Security Scheme Object must specify an object containing configuration information for the flow types supported, using the flows property.
OPENAPI3STANDARDS_V417required-open-id-connect-security-scheme-urlErrorIf the security scheme type is OpenId Connect (i.e. type is set to openIdConnect), the Security Scheme Object must specify the OpenId Connect URL to discover OAuth2 configuration values, using the openIdConnectUrl property.

OAuth 2.0 Flows

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V440required-oauth2-flow-authorization-urlErrorIf the flow type is set as implicit or authorizationCode in the OAuth Flows Object, then the OAuth Flow Object must specify the authorization URL to be used for this flow, using the authorizationUrl property.
OPENAPI3STANDARDS_V441required-oauth2-flow-token-urlErrorIf the flow type is set as password, clientCredentials or authorizationCode in the OAuth Flows Object, then the OAuth Flow Object must specify the token URL to be used for this flow, using the tokenUrl property.
OPENAPI3STANDARDS_V442required-oauth2-flow-scopesErrorFor all flow types, the OAuth Flow Object must specify the available scopes for the OAuth2 security scheme token URL, using the scopes property.
OPENAPI3STANDARDS_V443required-revoke-token-urlErrorWhen the x-revoke-token extension is used in an OAuth Flow Object, it must include the Url property that defines the endpoint for revoking tokens.

Security Requirements

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V450unique-security-requirement-scheme-nameErrorThe security requirement keys are patterned fields that must have unique values within the Security Requirement Object. The keys represent the names of the security schemes that need to be applied on an operation.
OPENAPI3STANDARDS_V451empty-security-requirement-property-array-for-non-oauth2-non-open-id-connect-schemesErrorIn an OpenAPI v3.0.x document, the Security Requirement Object property value allows specifying scope values for OAuth 2.0 and OpenId Connect security schemes. For all other security scheme types (i.e. for type not set as oauth2 or openIdConnect), the property value must be set as an empty array.
OPENAPI3STANDARDS_V452pre-defined-security-scheme-for-applying-securityErrorThe name specified for the security scheme in the Security Requirement Object must correspond with a Security Scheme definition in the global security schemes defined under the Components Object.

Specification Extensions

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V460unique-specification-extension-nameErrorSpecification extensions are patterned fields that must have unique values within the object they are extending. The keys represent the names assigned to the vendor extensions that must be prefixed by 'x-'.

Runtime Expressions

CodeRuleSeverityWhat it checks
OPENAPI3STANDARDS_V465pre-defined-operation-parameters-for-expression-request-parameter-sourceErrorIn runtime expression when using the request parameter source location, request parameters must be declared in the parameters section of the parent operation or they cannot be evaluated. This includes request headers.

Learn more

On this page