Define & Validate APIsValidation RulesetsOpenAPI Rulesets

OpenAPI v3 Linting for APIMatic Portal Generation

Linting checks performed by APIMatic on provided OpenAPI v3 file to check its conformance to recommended practices for a more user-friendly API documentation.

PropertyValue
Ruleset IDopenapi-v3-docsgen-linting
Code prefixOPENAPI3DOCSGEN_L
TypeLinting
Default severityWarning
Rule systemSemantic
Rules32

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

OpenAPI Info

CodeRuleSeverityWhat it checks
OPENAPI3DOCSGEN_L050info-description-existsInformationThe Info Object must specify details about the API using the description property. The value of the description must be non-null and non-empty.
OPENAPI3DOCSGEN_L053required-info-contactWarningThe Info Object must specify contact information using the contact property. This information helps users who may be stuck using your API e.g. you can include contact details of your support team that your API consumers can reach out to.

OpenAPI Servers

CodeRuleSeverityWhat it checks
OPENAPI3DOCSGEN_L150environment-description-existsInformationThe description provides additional details or context about the environment. The environment object within the server configuration object should include a description.
OPENAPI3DOCSGEN_L151server-description-existsInformationThe description property in the Server object provides a description of the server. It should not be missing or empty. The description helps API users understand the purpose and context of the server. Providing a description is an essential part of API documentation and helps to communicate the server's functionality to developers. A missing or empty description property can lead to confusion and ambiguity in the API documentation, making it difficult for developers to understand the API's intended purpose.
OPENAPI3DOCSGEN_L152server-variable-description-existsInformationIn an OpenAPI specification, the Server Variable Object describes the value of an individual variable within a specific Server Object. This rule ensures that the Server Variable Object includes a non-empty description property, which is essential to describe the purpose of the variable.
OPENAPI3DOCSGEN_L153server-parameter-description-existsInformationThe description provides additional details or context about the parameter used in the Server configuration. The Server Parameter should include a description.

OpenAPI Path Items

CodeRuleSeverityWhat it checks
OPENAPI3DOCSGEN_L240path-item-summary-or-description-existsInformation (disabled)The OpenAPI specification requires that every Path Item object includes a summary and/or description property. These properties provide a brief overview of the operations defined by the path.

OpenAPI Operations

CodeRuleSeverityWhat it checks
OPENAPI3DOCSGEN_L300operation-summary-or-description-existsInformationThe Operation Object must specify details about the operation using either the summary or the description property. The value of the summary/description must be non-null and non-empty.

OpenAPI Parameters

CodeRuleSeverityWhat it checks
OPENAPI3DOCSGEN_L380parameter-description-existsInformationThe Parameter Object must specify details about the parameter using the description property. The value of the description must be non-null and non-empty.
OPENAPI3DOCSGEN_L381parameter-example-or-examples-existInformationParameter Object must specify a non-null, non-empty example value using either the example or examples property.
OPENAPI3DOCSGEN_L382valid-parameter-exampleWarningThe example value specified for the Parameter Object using either the example property or examples must be valid for the schema definition provided for that parameter.
OPENAPI3DOCSGEN_L385non-empty-parameter-examples-keyWarningThe example name/key in the parameter level examples object is used to uniquely define an example value. Therefore, it should not be empty.

OpenAPI Request Body

CodeRuleSeverityWhat it checks
OPENAPI3DOCSGEN_L430request-body-description-existsInformationIn an OpenAPI specification, the requestBody object defines the body of an HTTP request that an API client sends to the server. This rule ensures that the requestBody object must contain a description property that provides a clear and concise description of the request body.

OpenAPI Media Types

CodeRuleSeverityWhat it checks
OPENAPI3DOCSGEN_L460mediaType-example-or-examples-existInformationMedia Type Object must specify a non-null, non-empty example value using either the example or examples property.
OPENAPI3DOCSGEN_L461valid-media-type-exampleWarningThe example value specified for a Media Type Object using either the example property or examples must be valid for the given schema definition.
OPENAPI3DOCSGEN_L463non-empty-media-type-examples-keyWarningThe example name/key in media type level examples object is used to uniquely define an example value. Therefore, it should not be empty.

OpenAPI Responses

CodeRuleSeverityWhat it checks
OPENAPI3DOCSGEN_L520response-description-existsInformationThe Response Object must specify details about the response using the description property. The value of the description must be non-null and non-empty.

OpenAPI Examples

CodeRuleSeverityWhat it checks
OPENAPI3DOCSGEN_L590example-summary-or-description-existsInformationExample Object must have a non-null and non-empty description or summary.
OPENAPI3DOCSGEN_L592example-value-or-external-value-presentWarningExample Value represents the actual example value, while External Value is used to reference an external file or URL containing the example. Each example object should include either an Example Value or an External Value.
OPENAPI3DOCSGEN_L593valid-example-valueWarningExamples within parameters or request body media types should not contain any properties marked as readOnly. Similarly, when providing examples for response object media types, it is important to avoid including any properties marked as writeOnly.

OpenAPI Headers

CodeRuleSeverityWhat it checks
OPENAPI3DOCSGEN_L660header-description-existsInformationEvery header object in an OpenAPI specification must include a description property that provides a brief explanation of the header's purpose.
OPENAPI3DOCSGEN_L661header-example-or-examples-existInformationThe examples or example property must be present in a header object to provide sample values for the header. It can be used to provide one or more examples, depending on the type of the header. The absence of examples or example property in a header object can make it difficult for API consumers to understand the intended use of the header.
OPENAPI3DOCSGEN_L662valid-header-exampleWarningExample value provided for the header object should conform to the header schema.
OPENAPI3DOCSGEN_L664non-empty-header-examples-keyWarningThe example name/key in header object level examples object is used to uniquely define an example value. Therefore, it should not be empty.

OpenAPI Tags

CodeRuleSeverityWhat it checks
OPENAPI3DOCSGEN_L710tag-description-existsInformationTag Object must have a non-null non-empty description.

OpenAPI Schemas

CodeRuleSeverityWhat it checks
OPENAPI3DOCSGEN_L750schema-description-existsInformationThe Schema Object must specify details about the schema or the type of data it represents, using the description property. The value of the description must be non-null and non-empty.
OPENAPI3DOCSGEN_L753schema-example-or-default-value-existsInformationSchema Object must specify a non-null, non-empty example value using the example property or a default value using the default property if applicable.
OPENAPI3DOCSGEN_L755valid-schema-exampleWarningThe example value specified for the Schema Object using the example property must be valid for the type definition of that schema.
OPENAPI3DOCSGEN_L757schema-example-equal-to-default-is-redundantWarning (disabled)Don't need to define an example if it’s exactly the same as your default value.

OpenAPI Security Schemes

CodeRuleSeverityWhat it checks
OPENAPI3DOCSGEN_L840security-scheme-description-existsInformationSecurity Scheme Object should have a non-null and non-empty description.
OPENAPI3DOCSGEN_L841additional-header-description-existsInformationAdditional header should have a non-null and non-empty description.

OpenAPI OAuth 2.0 Flows

CodeRuleSeverityWhat it checks
OPENAPI3DOCSGEN_L870non-empty-oauth-flow-scope-descriptionInformationOAuthFlow object should have a non-null and non-empty scope vaule.

Learn more

On this page