Define & Validate APIsValidation RulesetsOpenAPI Rulesets

OpenAPI v3 APIMatic Linting

Linting checks performed by APIMatic on provided OpenAPI v3 file to check its conformance to recommended practices for better API consumption.

PropertyValue
Ruleset IDopenapi-v3-apimatic-linting
Code prefixOPENAPI3APIMATIC_L
TypeLinting
Default severityWarning
Rule systemSemantic
Rules194

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

OpenAPI Root Information

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L001unique-role-idErrorRole IDs specified in the API role definitions must be unique.

OpenAPI Info

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L040non-empty-info-titleErrorThe title of the application in the info object must be non-empty and non-null.
OPENAPI3APIMATIC_L041non-empty-info-versionErrorIn the OpenAPI 3.0 specification, the info version is a required property. The info object must contain non-null, non-empty and valid version property.

OpenAPI Licenses

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L080non-empty-license-nameError (disabled)In the OpenAPI 3.0 specification, the license name is a required property. The license object must contain a non-null, non-empty and valid name property.

OpenAPI Servers

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L100server-configuration-extension-usedWarning (disabled)In OpenAPI v3.0.x, the Info Object can be extended with additional properties through the use of specification extensions (i.e., properties that begin with x-). One such vendor extension is x-server-configuration, which allows users to define API server configurations in more detail. It is essential to include the x-server-configuration extension in the Info Object, as it should not be missing.
OPENAPI3APIMATIC_L101pre-defined-environment-for-default-environmentErrorThe default environment specified in the server configuration extension must have a corresponding definition in the server configuration environments.
OPENAPI3APIMATIC_L102pre-defined-server-for-default-serverErrorThe default server specified in the server configuration of the API must have a corresponding definition in all of the server configuration environment servers.
OPENAPI3APIMATIC_L103unique-environmentErrorThe environments defined in the server configuration of the API must have unique names.
OPENAPI3APIMATIC_L104required-environment-nameErrorA non-null, non-empty, user-friendly name or identifier must be provided for the environment name.
OPENAPI3APIMATIC_L105same-server-setsErrorThe server sets of environments in the server configuration of the API must be the same i.e. the total number of servers and their names in each environment must be the same.
OPENAPI3APIMATIC_L106unique-serverErrorThe servers defined for an environment in the server configuration of the API must have unique names.
OPENAPI3APIMATIC_L107required-server-nameErrorA non-null, non-empty, user-friendly name or identifier must be provided for the server name.
OPENAPI3APIMATIC_L108required-server-urlErrorA server object defined for the environment must specify a non-empty, non-null and absolute URL path.
OPENAPI3APIMATIC_L109unique-server-urlErrorThere are two or more server objects defined in the same environment that have the same URL. This can cause confusion for clients that are trying to connect to the API and can result in unexpected behavior. Therefore, it is important to ensure that each server in the environment has a unique URL.
OPENAPI3APIMATIC_L110server-url-uses-httpsWarning (disabled)You must only use HTTPS for the server transport protocol.
OPENAPI3APIMATIC_L111pre-defined-server-variable-for-server-url-template-expressionErrorVariable substitutions can be made when a variable is named within {brackets} in a server URL. Each variable declared this way must be defined explicitly in the variables property of the Server Object.
OPENAPI3APIMATIC_L112pre-defined-server-parameter-for-server-url-template-expressionErrorA parameter referenced by a server (a path or template parameter) must have a corresponding definition in the server configuration for server url template expression.
OPENAPI3APIMATIC_L113unique-server-variables-keyErrorThe server variables key defined in the server of the API must have unique names.
OPENAPI3APIMATIC_L114unique-server-parametersErrorThe server parameters defined in the server configuration of the API must have unique names.
OPENAPI3APIMATIC_L115server-variable-exists-in-server-url-templateWarningServer variables defined in the server's variables object must be referenced in the server URL.
OPENAPI3APIMATIC_L116server-parameter-exists-in-server-url-templateWarningTemplate parameters defined in the server configuration must be referenced by at least one or more server URLs.
OPENAPI3APIMATIC_L117non-empty-server-variables-keyErrorVariable key in the server object of the API must specify a non-empty non-null name.
OPENAPI3APIMATIC_L118required-server-parameter-nameErrorServer parameter definition in the server configuration of the API must specify a non-empty non-null name.
OPENAPI3APIMATIC_L119required-server-parameter-typeErrorServer parameter definition in the server configuration of the API must specify a type.
OPENAPI3APIMATIC_L120valid-server-parameter-typeErrorValid types for a server parameter include: String, Number and a String/Number enumeration. No other types must be used.
OPENAPI3APIMATIC_L121server-parameter-cannot-be-arrayErrorServer URL parameters cannot be declared as arrays. Only primitive types like string, number or string/number enumeration types are allowed.
OPENAPI3APIMATIC_L122server-parameter-cannot-be-mapErrorServer URL parameters cannot be declared as maps. Only primitive types like string, number or string/number enumeration types are allowed.
OPENAPI3APIMATIC_L123server-parameter-cannot-be-constantErrorA server URL template with a parameter allows the user to substitute a value into the URL at runtime, such as for different environments. Declaring a parameter as a constant would make it impossible to substitute different values into the URL. Hence, server URL parameter cannot be declared as constant.
OPENAPI3APIMATIC_L124non-empty-server-variable-defaultErrorThe default value for a server variable object must be specified and should not be null or empty. The default value is used to resolve the server URL. Not defining a default value can result in unexpected behavior when resolving the URL for the API.
OPENAPI3APIMATIC_L125required-server-parameter-schema-defaultErrorServer parameter definition in the server configuration of the API must specify a non-empty, non-null default value in schema object.
OPENAPI3APIMATIC_L126valid-server-parameter-schema-defaultErrorThe schema default value specified in the server parameter definition must be valid according to the type definition of this parameter.

OpenAPI Components

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L150at-least-one-component-referenceWarningA component that is defined globally using the 'components' root object property must be referenced at least once by any other object in the API specification document. Referencing is performed using $ref.
OPENAPI3APIMATIC_L151non-empty-schema-component-keyErrorThe unique key specified for the schema in the components object must be non-empty.
OPENAPI3APIMATIC_L152unique-schema-component-keyErrorEach schema component must have a unique name, duplicate names are not allowed as they can lead to confusion and potential conflicts.
OPENAPI3APIMATIC_L153non-empty-security-scheme-component-keyErrorWhen a security scheme is defined in the components object, the key specified for it must be non-empty.

OpenAPI Paths

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L180non-empty-paths-keyErrorAn empty path key in OpenAPI is discouraged as it may lead to confusion and ambiguity in identifying the targeted resource in the server. Therefore, it is recommended to use non-empty path keys that accurately point to the intended resource in the server. This improves the clarity, readability, and maintainability of the API documentation, and ensures that the server responds appropriately to client requests.
OPENAPI3APIMATIC_L181no-query-string-in-pathWarningThe path key cannot contain a query string for specifying parameter values.

OpenAPI Operations

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L230operation-id-existsErrorThe Operation Object must specify a unique identifier for the operation in the API document using the operationId property. This id is used by the code generation engine to generate relevant components tied to an endpoint.
OPENAPI3APIMATIC_L231at-least-one-operation-tagWarningThe Operation Object must specify one or more tags using the tags property. Tags are used for logical grouping of operations. This facilitates their discovery and consequently eases API consumption.
OPENAPI3APIMATIC_L232non-empty-operation-tagErrorTags list defined inside operation object must contain non-null and non-empty tags.
OPENAPI3APIMATIC_L233unique-operation-tagErrorAvoid duplicate operation tags in OpenAPI to prevent confusion and inconsistencies in the API documentation. Use distinct tags for each set of related operations to improve the API's quality and usability.
OPENAPI3APIMATIC_L234alphabetical-operation-tagsWarning (disabled)Tags defined within the operation object must be in alphabetical order.
OPENAPI3APIMATIC_L235pre-defined-operation-tag-in-global-tagsWarningEach tag used in the API must be defined in the root level tags list of the API specification. This ensures that all tags used in the API are properly defined, which helps with documentation generation and other tooling. Please check the root level tags list and ensure that all tags used in the API are properly defined.
OPENAPI3APIMATIC_L236pre-defined-operation-server-in-server-configurationErrorOperation must use a pre-defined server from the API specification's server configuration.
OPENAPI3APIMATIC_L237required-request-body-for-post-operationWarning (disabled)A request body is required for HTTP POST method. Please ensure that the operation with the POST method has a properly defined request body. Check the schema and properties of the request body to ensure that they are correctly defined. If the operation does not require a request body, consider using a different HTTP method such as GET, PUT or DELETE instead.
OPENAPI3APIMATIC_L238no-dynamic-form-parameters-in-get-operationErrorHTTP Methods like GET do not support dynamic form parameters therefore, the allowDynamicFormParameters flag must be disabled for all GET methods.
OPENAPI3APIMATIC_L239no-dynamic-form-parameters-in-delete-operationErrorHTTP Methods like DELETE do not support dynamic form parameters therefore, the allowDynamicFormParameters flag must be disabled for all DELETE methods.
OPENAPI3APIMATIC_L240no-dynamic-form-parameters-in-head-operationErrorHTTP Methods like HEAD do not support dynamic form parameters therefore, the allowDynamicFormParameters flag must be disabled for all HEAD methods.

OpenAPI Parameters

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L330non-empty-parameter-nameErrorParameter must contain non-null and non-empty name.
OPENAPI3APIMATIC_L331unique-parameter-nameErrorOperation level parameter names and requestBody schema property names should be unique. You can use parameter-level x-unique-name to provide unique display name to conflicting parameter.

OpenAPI Request Body

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L370at-least-one-entry-in-request-body-contentErrorThe content property is required for a request body object. Hence, it must not be missing or empty and it must contain at least one entry.

OpenAPI Media Types

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L400required-media-type-schemaErrorEach media type object must have an associated schema defined. The schema defines the structure and data format for the content of the media type.

OpenAPI Responses

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L460unique-responses-keyErrorEach response must have a unique http status code to clearly identify its purpose and differentiate it from other responses.
OPENAPI3APIMATIC_L461sorted-responses-keysWarningResponse codes must be sorted in an ascending/increasing order.
OPENAPI3APIMATIC_L462at-least-one-operation-4XX-responseWarning (disabled)An operation should have at least one 4XX response defined to indicate that an error may be returned by the API. Please check the responses section of the operation and ensure that at least one 4XX response is properly defined. It is recommended to provide a detailed description of the error in the response message to help clients understand the issue.
OPENAPI3APIMATIC_L463no-response-content-implies-reponse-with-no-bodyInformationIf a response does not contain a content object, it implies that there is no response body expected.
OPENAPI3APIMATIC_L464required-2XX-response-content-for-get-operationWarning (disabled)GET operations are generally expected to return some form of data for a successful call. Therefore, for GET operations, a response definition with a status code belonging to the 2XX range (except 204) should have a non-empty content mapping defined using the content property.
OPENAPI3APIMATIC_L465non-empty-response-content-keyErrorEach media type within the content object of a response object must have a non-empty media type key. The media type key represents the content type of the response.

OpenAPI Callbacks

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L500callback-only-post-method-allowedErrorAPI callbacks are server-initiated notifications sent to a client-specified URL. Only the POST HTTP method is allowed for callback operations. Using any other method is not supported.
OPENAPI3APIMATIC_L501callback-discriminator-property-pointer-missing-request-body-contentErrorThe callback discriminator property pointer cannot be resolved because the request body does not have any content defined. Ensure the request body contains valid media type content definitions.
OPENAPI3APIMATIC_L502callback-valid-keyErrorCallback keys must follow valid naming conventions so they can be reliably referenced and processed.
OPENAPI3APIMATIC_L503callback-no-group-assigned-warningWarningIt is recommended that callbacks are assigned to a callback group using the APIMatic callback group extension. Unassigned callbacks may not be properly categorized in the generated documentation or SDKs.
OPENAPI3APIMATIC_L505callback-discriminator-property-pointer-requiredErrorWhen an event discriminator is defined for a callback group, the propertyPointer field must be specified. This pointer identifies the field in the request body used to differentiate between event types.
OPENAPI3APIMATIC_L506callback-discriminator-property-pointer-invalid-formatErrorThe property pointer in the event discriminator must follow a valid JSON pointer format starting with $request.body. An invalid format will prevent the discriminator from correctly identifying the event type field.
OPENAPI3APIMATIC_L507callback-discriminator-property-pointer-invalid-locationErrorThe property pointer in the event discriminator must reference a location within the request body. Pointers that reference other locations are not supported for callback event discrimination.
OPENAPI3APIMATIC_L508callback-discriminator-property-pointer-empty-pathErrorThe property pointer in the event discriminator must contain a non-empty path after the location prefix $request.body#/. An empty path cannot identify a specific field in the request body.
OPENAPI3APIMATIC_L509callback-discriminator-property-pointer-missing-request-bodyErrorThe property pointer in the event discriminator references a field in the request body, but the callback operation does not have a request body defined. A request body is required for the discriminator to function.
OPENAPI3APIMATIC_L510callback-discriminator-property-pointer-points-to-valid-propertyErrorThe property pointer in the event discriminator must reference an existing property in the request body schema. If the pointer does not resolve to a valid property, the event discrimination will fail.
OPENAPI3APIMATIC_L511callback-discriminator-property-pointer-references-string-typeErrorThe property referenced by the event discriminator pointer must be of type string. Non-string types cannot be used as discriminator values for identifying different event types.
OPENAPI3APIMATIC_L512callback-discriminator-mapping-value-references-existing-definitionErrorEach value in the event discriminator mapping must reference an existing callback definition. Mapping values that reference non-existent callbacks will prevent proper event type resolution.
OPENAPI3APIMATIC_L513callback-payload-verification-algorithm-requiredErrorWhen payload verification is defined for a callback group, the algorithm field must be specified. This defines the hashing algorithm used to verify the integrity of the callback payload.
OPENAPI3APIMATIC_L514callback-payload-verification-invalid-algorithmErrorThe payload verification algorithm must be one of the supported algorithms. Invalid algorithms will prevent the callback payload verification from being properly configured.
OPENAPI3APIMATIC_L515callback-payload-verification-signature-header-requiredErrorWhen payload verification is defined for a callback group, the signatureHeader field must be specified. This identifies the HTTP header that contains the signature for payload verification.
OPENAPI3APIMATIC_L517callback-payload-verification-valid-digest-encodingErrorThe payload verification digest encoding must be one of the supported encoding formats. Invalid encoding values will prevent proper payload verification configuration.
OPENAPI3APIMATIC_L518callback-payload-verification-digest-encoding-requires-hmac-algorithmErrorThe digestEncoding property in payload verification is only applicable when using HMAC-based algorithms. Using digest encoding with non-HMAC algorithms is not supported.
OPENAPI3APIMATIC_L519callback-payload-verification-valid-message-templateErrorThe message template in payload verification must only contain supported placeholders. Invalid placeholders will prevent the message from being properly constructed for signature verification.
OPENAPI3APIMATIC_L520callback-payload-verification-valid-signature-value-templateErrorThe signature value template in payload verification must follow the expected format with supported placeholders. Invalid templates will prevent proper signature extraction and verification.
OPENAPI3APIMATIC_L521callback-extension-group-must-exist-when-referencedErrorWhen a callback operation references a callback group name, that group must be defined in the x-callback-groups extension at the root level. Referencing a non-existent group will result in an invalid configuration.
OPENAPI3APIMATIC_L522callback-valid-placeholder-delimiterErrorPlaceholders in the payload verification message template must use valid delimiters. Invalid delimiters will prevent proper parsing of the message template.
OPENAPI3APIMATIC_L523callback-discriminator-mapping-value-emptyErrorEach entry in the discriminator mapping must reference a valid callback ID. Mapping values that are empty or missing will prevent proper event discrimination.
OPENAPI3APIMATIC_L524callback-group-non-empty-descriptionWarningWhen a description is provided for a callback group, it must contain a non-empty value. An empty description provides no useful information and should either be removed or populated with meaningful content.

OpenAPI Tags

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L600unique-tagErrorDuplicate tag names have been found, which can lead to ambiguity and confusion in documentation and tooling. Each tag must have a unique name.
OPENAPI3APIMATIC_L601alphabetical-global-tagsWarning (disabled)Tags defined globally must be in alphabetical order.
OPENAPI3APIMATIC_L602at-least-one-tag-referenceWarningEach tag should be referenced by one or more operations.
OPENAPI3APIMATIC_L603non-empty-tag-nameErrorA tag object must be assigned a valid non-null and non-empty name.

OpenAPI References

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L630non-empty-dollar-ref-pathErrorPath assigned to a $ref must be non-null, non-empty and valid reference path that must be defined within the specification.

OpenAPI Schemas

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L660no-equivalent-schema-definitionsInformation (disabled)Schema definitions must be unique, equivalent definitions lead to unnecessarily large specifications.
OPENAPI3APIMATIC_L661no-schema-circular-reference-loopErrorIf a schema definition references another definition (alias or not), the reference must be resolvable and not form any kind of loop.
OPENAPI3APIMATIC_L662no-inline-complex-schema-definitionWarningA complex schema is one that may use one or more of the following constructs: allOf, anyOf, oneOf, not, properties. Such schema definitions must be added globally in the components/schemas section with a unique name and then referenced throughout the API document with that name or should define title property alongside the properties property. Inline definitions of such schemas are not recommended as for auto-generating SDKs/documentation the names of such schemas are deduced from the parent objects in which they are declared inline. The names deduced this way may not be user-friendly and can conflict with other definitions resulting in name duplication. This behavior can affect your output quality.
OPENAPI3APIMATIC_L663unique-schema-titleErrorDuplicate schema titles have been found, which can lead to confusion and potential conflicts. Each schema within the API specification must have a unique title.
OPENAPI3APIMATIC_L664no-schema-default-for-required-parameterWarning (disabled)A default value should not be assigned to a required parameter. Required parameters must be provided with a value during the API call, and assigning a default value may lead to unexpected behavior. Please check the parameter definition in the API specification and remove any default values assigned to required parameters. If a default value is needed, consider making the parameter optional by removing the required flag.
OPENAPI3APIMATIC_L665no-explicit-schema-type-implies-any-typeWarning (disabled)Schema definitions where the type is not explicitly defined can be of any type.
OPENAPI3APIMATIC_L666int32-schema-format-with-integer-typeWarningThe int32 format is only applicable to schemas with the type set to integer. It seems that the int32 format has been used with an incompatible schema type.
OPENAPI3APIMATIC_L667int64-schema-format-with-integer-typeWarningThe int64 format is only applicable to schemas with the type set to integer. It seems that the int64 format has been used with an incompatible schema type.
OPENAPI3APIMATIC_L668float-schema-format-with-number-typeWarningThe float format is only applicable to schemas with the type set to number. It seems that the float format has been used with an incompatible schema type.
OPENAPI3APIMATIC_L669double-schema-format-with-number-typeWarningThe double format is only applicable to schemas with the type set to number. It seems that the double format has been used with an incompatible schema type.
OPENAPI3APIMATIC_L670byte-schema-format-with-string-typeWarningThe byte format is only applicable to schemas with the type set to string. It seems that the byte format has been used with an incompatible schema type.
OPENAPI3APIMATIC_L671binary-schema-format-with-string-typeWarningThe binary format is only applicable to schemas with the type set to string. It seems that the binary format has been used with an incompatible schema type.
OPENAPI3APIMATIC_L672no-binary-schema-for-operation-parameterError (disabled)The binary format cannot be used with schemas that are being used within operation parameters.
OPENAPI3APIMATIC_L673no-binary-schema-for-json-request-body-contentError (disabled)The binary format cannot be used with schemas that are being used with JSON request body content.
OPENAPI3APIMATIC_L674no-binary-schema-for-json-response-contentError (disabled)The binary format cannot be used with schemas that are being used with JSON response content.
OPENAPI3APIMATIC_L675date-schema-format-with-string-typeWarningThe date format is only applicable to schemas with the type set to string. It seems that the date format has been used with an incompatible schema type.
OPENAPI3APIMATIC_L676date-time-schema-format-with-string-typeWarningThe date-time format is only applicable to schemas with the type set to string. It seems that the date-time format has been used with an incompatible schema type.
OPENAPI3APIMATIC_L677password-schema-format-with-string-typeWarningThe password format is only applicable to schemas with the type set to string. It seems that the password format has been used with an incompatible schema type.
OPENAPI3APIMATIC_L678string-schema-boundaries-definedWarning (disabled)The schema properties for a string should define the pattern, minLength and maxLength attributes. These attributes help to define the constraints on the format and length of the string value. Please check the schema definition in the API specification for the string type and ensure that it has the pattern, minLength, and maxLength attributes defined with appropriate values.
OPENAPI3APIMATIC_L679schema-max-length-cannot-be-less-than-min-lengthWarningThe maximum length of a schema cannot be less than the minimum length. In other words, if a minimum length is specified for a schema, the maximum length must be greater than or equal to that minimum length.
OPENAPI3APIMATIC_L680number-boundaries-definedWarning (disabled)Numeric schemas should have both a minimum and maximum boundary defined in OpenAPI 3.0 specifications.
OPENAPI3APIMATIC_L681schema-maximum-cannot-be-less-than-minimumWarningThe maximum value of a schema cannot be less than the minimum value. In other words, if a minimum value is specified for a schema, the maximum value must be greater than or equal to that minimum value.
OPENAPI3APIMATIC_L682object-schema-boundaries-definedWarning (disabled)Schemas of type object must define the boundaries of the schema i.e. the maximum number of properties and the minimum number of properties.
OPENAPI3APIMATIC_L683schema-max-properties-cannot-be-less-than-min-propertiesWarningIn OpenAPI specifications, if a minimum number of properties is defined for a schema, then a maximum number of properties should also be defined, and the maximum number of properties should be equal to or greater than the minimum number of properties.
OPENAPI3APIMATIC_L684pre-defined-required-schema-propertyErrorThe properties listed in the required list of a schema must be pre-defined in the schema properties.
OPENAPI3APIMATIC_L685non-empty-schema-properties-keyErrorIn OpenAPI specifications, a schema's property keys should be non-empty strings. Empty property keys can cause issues when working with schemas and can lead to errors when the specification is used to generate code or documentation.
OPENAPI3APIMATIC_L687no-schema-default-for-required-propertyWarning (disabled)Required properties should not have a default value defined as this can lead to unwanted behavior therefore, these must be removed.
OPENAPI3APIMATIC_L689array-schema-boundaries-definedWarning (disabled)In OpenAPI specifications, array boundaries should be defined for schemas that include array data types.
OPENAPI3APIMATIC_L690schema-max-items-cannot-be-less-than-min-itemsWarningIn OpenAPI specifications, for schemas that include array data types, the maximum number of items allowed in the array must be greater than or equal to the minimum number of items allowed in the array.
OPENAPI3APIMATIC_L692no-inline-enum-schema-definitionWarningEither define a title property alongside the enum property or the schema definitions must be added globally in the components/schemas section with a unique name and then referenced throughout the API document with that name. Inline definitions of enum schemas are not recommended as for auto-generating SDKs/documentation the names of such schemas are deduced from the parent objects in which they are declared inline. The names deduced this way may not be user-friendly and can conflict with other definitions resulting in name duplication. This behavior can affect your output quality.
OPENAPI3APIMATIC_L693at-least-one-item-in-schema-enum-listErrorEnum list must not be empty as it is used to define a set of valid values for the schema. An empty enum list can cause ambiguity in the definition of acceptable values.
OPENAPI3APIMATIC_L694unique-schema-enum-itemsErrorIf property enum is specified in the schema object, it must consist of only unique items in the list.
OPENAPI3APIMATIC_L695same-schema-enum-item-typeErrorThe data type of each item defined in an enumeration list must conform to the type defined for the schema object.
OPENAPI3APIMATIC_L696non-empty-schema-enum-valueErrorAll items of an enumeration list must have a non-empty and non-null value. They represent the set of possible values of the enumeration and, therefore, cannot be empty or null.
OPENAPI3APIMATIC_L697no-schema-circular-inheritanceErrorCircular references within schemas are not allowed. A circular reference occurs when one schema references another schema that, in turn, references the original schema, creating a circular dependency. Circular references can lead to issues with data modeling, validation, and may cause infinite loops in processing.
OPENAPI3APIMATIC_L698single-discriminator-declaration-in-schema-hierarchyErrorA discriminated schema should not redefine the discriminator property. The discriminator property is defined at the root level of the schema and serves to differentiate between subtypes. Redefining the discriminator property within subtypes can lead to inconsistencies and conflicts.
OPENAPI3APIMATIC_L699non-primitive-any-of-schemas-in-polymorphismErrorIt is not allowed to use the schemas with primitive types in anyOf list when discriminator property is defined alongside anyOf. This refers to polymorphism which is the ability of a schema to represent different types or subtypes in the presence of discriminator.
OPENAPI3APIMATIC_L700non-primitive-one-of-schemas-in-polymorphismErrorIt is not allowed to define the schemas with primitive types in oneOf list when discriminator property is defined alongside oneOf. This refers to polymorphism which is the ability of a schema to represent different types or subtypes in the presence of discriminator.
OPENAPI3APIMATIC_L701no-base-schema-property-re-declarationWarningWhen using the allOf keyword to combine multiple schemas, each schema should define unique properties. It appears that there is a duplicate property that already exists in one of the schemas defined within the allOf array.
OPENAPI3APIMATIC_L702required-string-type-for-discriminator-schema-propertyErrorThe discriminator property is used to differentiate between different subtypes within a schema. This discriminator property, used for polymorphism, must be of type string.
OPENAPI3APIMATIC_L703no-items-property-with-non-array-typeWarningWhen the items property is present in a schema, the type must be explicitly defined as array. Using the items property with schemas that have explicitly defined non-array types (such as string, number, object, boolean, etc.) can lead to issues with schema validation, code generation, and API documentation tools.

OpenAPI Discriminators

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L800non-empty-discriminator-property-nameErrorThe discriminator property name should be non-empty and non-null.
OPENAPI3APIMATIC_L801pre-defined-schema-property-for-discriminatorErrorThe discriminator property (indicated by propertyName) should either be defined directly in the same schema in which discriminator is used or be defined in oneOf/anyOf options.
OPENAPI3APIMATIC_L802non-empty-discriminator-mapping-keyErrorIn OpenAPI specifications, the discriminator mapping key must be a non-empty string. The discriminator mapping key is used to map the discriminator value to a schema definition.
OPENAPI3APIMATIC_L803unique-discriminator-mapping-keyErrorThe discriminator mapping keys defined in the discriminator object must be unique.
OPENAPI3APIMATIC_L804non-empty-discriminator-mapping-valueErrorDiscriminator mapping value must specify the name or the reference to the globally defined schema to which the discriminator value needs to be mapped to. This information is useful for deserialization purposes. Therefore, the value must be non-null, non-empty and must reference to a globally defined schema.
OPENAPI3APIMATIC_L805pre-defined-discriminator-mapping-value-schemaErrorIn OpenAPI specifications, when using a discriminator to distinguish between different schemas, each schema must be defined in the specification. Each schema referenced in the discriminator mapping must be defined in the specification to ensure that the schema is properly defined and can be used correctly.
OPENAPI3APIMATIC_L806discriminator-mapping-value-for-each-one-of-schemaErrorDiscriminator mapping values indicate possible schemas that a payload can be deserialized into, based on the discriminator property. Therefore, it is expected that a mapping value is provided for each of the schemas involved in the oneOf list. A missing value for any schema may cause deserialization issues in the generated code.
OPENAPI3APIMATIC_L807discriminator-mapping-value-for-each-any-of-schemaErrorDiscriminator mapping values indicate possible schemas that a payload can be deserialized into, based on the discriminator property. Therefore, it is expected that a mapping value is provided for each of the schemas involved in the anyOf list. A missing value for any schema may cause deserialization issues in the generated code.

OpenAPI XML

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L840required-xml-name-in-parameter-schemaErrorIn OpenAPI specifications, when using XML for the parameter schema, it is required to specify the XML name. However, for array non-wrapped cases, the name does not need to be directly specified in the schema XML. In such cases, it will be present in the inner items schema.
OPENAPI3APIMATIC_L841required-xml-name-in-request-body-content-schemaErrorIn OpenAPI specifications, when using XML for the request body content schema, the XML name is required to be specified. However, for array non-wrapped cases, the name does not need to be directly specified in the schema XML. In such cases, it will be present in the inner items schema.
OPENAPI3APIMATIC_L842required-xml-name-in-response-content-schemaErrorIn OpenAPI specifications, when using XML for the response content schema, the XML name is required to be specified. However, for array non-wrapped cases, the name does not need to be directly specified in the schema XML. In such cases, it will be present in the inner items schema.
OPENAPI3APIMATIC_L843required-xml-name-in-schema-propertyErrorIn OpenAPI specifications, when using XML for schema properties, the XML name is required to be specified. An XML name should be specified for schema properties to ensure that the schema is properly defined and can be used correctly.
OPENAPI3APIMATIC_L844no-xml-name-in-non-wrapped-array-schemaWarningIn OpenAPI specifications, when using XML for array schemas, there are two ways to serialize an array: as a 'wrapped' array, where each element of the array is a child element of a container element, or as a 'non-wrapped' array, where each element of the array is a sibling element of the other elements. When using non-wrapped array schemas, specifying an XML name is forbidden. This rule enforces the requirement that an XML name cannot be specified for non-wrapped array schemas to ensure that the schema is properly defined and can be used correctly.
OPENAPI3APIMATIC_L845xml-wrapped-only-for-array-schema-typeErrorIn OpenAPI specifications, XML serialization (wrapped) can be used to describe how to serialize and deserialize XML documents. The wrapped style applies to array schema types and defines how XML elements are named when representing arrays. This rule enforces the requirement that the wrapped style can only be used with array schema types to ensure that the schema is properly defined and can be used correctly.
OPENAPI3APIMATIC_L846only-schema-primitive-type-for-xml-attribute-propertyErrorWhen declaring schema properties as XML attributes, only primitive types are allowed. Non-primitive types, such as object types or arrays, are not permitted as XML attribute properties.
OPENAPI3APIMATIC_L847only-schema-properties-can-be-xml-attributesErrorOnly schema properties can be marked as XML attributes while the root schema can only be marked as XML element.
OPENAPI3APIMATIC_L848no-namespace-for-schema-xml-attribute-propertyErrorNamespace is provided for a property declared as an XML attribute which is not allowed.

OpenAPI Security Schemes

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L870non-empty-api-key-security-parameter-nameErrorThe name property is used to identify the parameter or header that contains the API key. The name property of an API key security scheme must not be empty or null.
OPENAPI3APIMATIC_L871non-empty-scheme-of-http-security-schemeErrorThe scheme property specifies the HTTP authentication scheme to be used, such as basic, bearer, etc. The scheme property of an HTTP security scheme must not be empty or null.
OPENAPI3APIMATIC_L872required-non-empty-additional-header-nameErrorA non-null, non-empty, user-friendly name must be provided for the additional header in x-additional-headers APIMatic extension.
OPENAPI3APIMATIC_L873non-conflicting-api-key-header-and-additional-headerErrorAn additional header cannot have the same name as the API key, this leads to unwanted behavior and conflicts.

OpenAPI OAuth 2.0 Flows

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L910pre-defined-oauth2-authorization-server-in-server-configurationErrorThe authorization server referenced inside the OAuth 2.0 authentication definition must be pre-defined in the server configuration of the API.
OPENAPI3APIMATIC_L911pre-defined-oauth2-token-server-in-server-configurationErrorThe access token server referenced inside the OAuth 2.0 authentication definition must be pre-defined in the server configuration of the API.
OPENAPI3APIMATIC_L912non-empty-oauth-flow-scopes-keyErrorThe scope key is used to define the scopes or permissions associated with the OAuth flow. A non-empty scope key must be provided in all OAuth scope definitions.
OPENAPI3APIMATIC_L913unique-oauth-flow-scopes-keyErrorThe scope keys defined in the OAuth flow object must be unique.

OpenAPI Security Requirements

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L930at-least-one-security-mechanism-appliedWarningAPIs that require some form of authentication must define the security schemes used, in the global Components Object using the securitySchemes property and apply these security schemes to the endpoints that require authentication. This will ensure that the requests that require authentication are authenticated properly.
OPENAPI3APIMATIC_L931unique-security-requirementWarningEach security requirement object represents a unique combination of security schemes that need to be satisfied for an API operation. The security list should not contain duplicate security requirement objects.
OPENAPI3APIMATIC_L932unique-security-requirement-scopesErrorEach security requirement scope within a security scheme represents a unique permission or access level. Therefore, duplicate entries for security requirement scopes are not allowed.
OPENAPI3APIMATIC_L933pre-defined-security-requirement-scope-in-security-schemeErrorA security requirement must only use pre-defined scopes from the security scheme scope definitions.

OpenAPI Vendor Extensions

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L950supported-vendor-extensionWarningAPIMatic supports certain vendor extensions which are loaded at the time of importing API description files containing these extensions. These include APIMatic specific extensions as well that are used for configuring products like Code Generation, Transformer, etc. All other extensions will be ignored or may not work as expected.
OPENAPI3APIMATIC_L951no-additional-apimatic-vendor-extension-propertyWarningAPIMatic specific extensions that are used for configuring products like Code Generation, Transformer, etc. do not support any additional vendor extension properties which will be ignored or may not work as expected.

Miscellaneous

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L970supported-response-codeWarningIf multiple responses are disabled via import settings provided in the APIMatic Metadata file, only response definitions in responses belonging to status code ranges 200-208 and 400-599 will be imported. Those outside the supported range will be ignored automatically during import/transformations in APIMatic.

Pagination

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L1000valid-pagination-typeErrorThe pagination type defined for the response must be one of the supported types: "offset", "page", "cursor", or "link". Any other value is considered invalid.
OPENAPI3APIMATIC_L1001non-empty-pagination-resultErrorThe result field within the pagination object must be a valid, non-empty JSON pointer string. It should point to an array field in the API response that contains the paginated results.
OPENAPI3APIMATIC_L1002pagination-result-points-to-arrayErrorThe result field in the pagination object must be a valid JSON pointer that references an array field in the API response. Pointers targeting non-array fields are not supported and will result in an invalid pagination configuration.
OPENAPI3APIMATIC_L1003valid-pagination-json-pointerErrorThe JSON pointer must reference a valid location within the request or response. Examples of valid pointers include: $response.body, $response.body#/data/prop, and $request.query#/offset.
OPENAPI3APIMATIC_L1004pagination-pointer-points-valid-propertyErrorThe JSON pointer must reference an existing property within the request or response structure. If it points to a property that does not exist, the pagination configuration is considered invalid.
OPENAPI3APIMATIC_L1005non-empty-pagination-inputErrorThe input field in the pagination object must be a valid, non-empty JSON pointer string. It should reference a field in the API request that provides the pagination input, such as an offset, page number, or cursor value.
OPENAPI3APIMATIC_L1006non-empty-pagination-outputErrorThe output field in the cursor pagination object must be a valid, non-empty JSON pointer string. It should reference a field in the API response that provides the pagination output, such as a next cursor value.
OPENAPI3APIMATIC_L1007cursor-input-cursor-output-types-should-matchErrorThe input and output fields in a cursor-based pagination object must have matching schema types. For example, if the input field is of type string, the output field must also be of type string.
OPENAPI3APIMATIC_L1008non-empty-pagination-nextErrorThe next field in a link-based pagination object must be a valid, non-empty JSON pointer string. It should reference a field in the API response that provides the URL to the next page of results.
OPENAPI3APIMATIC_L1009link-pagination-next-must-be-stringErrorIn link-based pagination, the next field must be a string containing the URL to the next page of results. Any other type is considered invalid.
OPENAPI3APIMATIC_L1010pagination-input-must-point-to-integer-propertyErrorFor both offset-based and page-based pagination strategies, the input field must point to a property of type integer. This value typically represents the starting offset or page number and must be a valid integer to ensure correct pagination behavior.
OPENAPI3APIMATIC_L1011pagination-type-requiredErrorEvery pagination extension must specify a type field indicating the pagination strategy. Supported values are "offset", "page", "cursor", and "link". Without a type, the pagination configuration cannot be validated or applied.

OpenAPI Webhooks

CodeRuleSeverityWhat it checks
OPENAPI3APIMATIC_L1030webhook-only-post-method-allowedErrorWebhooks are server-initiated notifications sent to a client-specified URL. Only the POST HTTP method is allowed for webhook operations. Using any other method is not supported.
OPENAPI3APIMATIC_L1031webhook-discriminator-property-pointer-missing-request-body-contentErrorThe webhook discriminator property pointer cannot be resolved because the request body does not have any content defined. Ensure the request body contains valid media type content definitions.
OPENAPI3APIMATIC_L1032webhook-valid-keyErrorWebhook keys must be non-empty and follow naming conventions. Invalid or empty webhook keys may cause issues during code generation or API documentation.
OPENAPI3APIMATIC_L1033webhook-no-group-assignedWarningIt is recommended that webhooks are assigned to a webhook group using the APIMatic webhook group extension. Unassigned webhooks may not be properly categorized in the generated documentation or SDKs.
OPENAPI3APIMATIC_L1035webhook-discriminator-property-pointer-requiredErrorWhen an event discriminator is defined for a webhook group, the propertyPointer field must be specified. This pointer identifies the field in the request body used to differentiate between event types.
OPENAPI3APIMATIC_L1036webhook-discriminator-property-pointer-invalid-formatErrorThe property pointer in the event discriminator must follow a valid JSON pointer format starting with /. An invalid format will prevent the discriminator from correctly identifying the event type field.
OPENAPI3APIMATIC_L1037webhook-discriminator-property-pointer-invalid-locationErrorThe property pointer in the event discriminator must reference a location within the request body. Pointers that reference other locations are not supported for webhook event discrimination.
OPENAPI3APIMATIC_L1038webhook-discriminator-property-pointer-empty-pathErrorThe property pointer in the event discriminator must contain a non-empty path after the location prefix. An empty path cannot identify a specific field in the request body.
OPENAPI3APIMATIC_L1039webhook-discriminator-property-pointer-missing-request-bodyErrorThe property pointer in the event discriminator references a field in the request body, but the webhook operation does not have a request body defined. A request body is required for the discriminator to function.
OPENAPI3APIMATIC_L1040webhook-discriminator-property-pointer-points-to-valid-propertyErrorThe property pointer in the event discriminator must reference an existing property in the request body schema. If the pointer does not resolve to a valid property, the event discrimination will fail.
OPENAPI3APIMATIC_L1041webhook-discriminator-property-pointer-references-string-typeErrorThe property referenced by the event discriminator pointer must be of type string. Non-string types cannot be used as discriminator values for identifying different event types.
OPENAPI3APIMATIC_L1042webhook-discriminator-mapping-value-references-existing-definitionErrorEach value in the event discriminator mapping must reference an existing webhook definition. Mapping values that reference non-existent webhooks will prevent proper event type resolution.
OPENAPI3APIMATIC_L1043webhook-payload-verification-algorithm-requiredErrorWhen payload verification is defined for a webhook group, the algorithm field must be specified. This defines the hashing algorithm used to verify the integrity of the webhook payload.
OPENAPI3APIMATIC_L1044webhook-payload-verification-invalid-algorithmErrorThe payload verification algorithm must be one of the supported algorithms. Invalid algorithms will prevent the webhook payload verification from being properly configured.
OPENAPI3APIMATIC_L1045webhook-payload-verification-signature-header-requiredErrorWhen payload verification is defined for a webhook group, the signatureHeader field must be specified. This identifies the HTTP header that contains the signature for payload verification.
OPENAPI3APIMATIC_L1047webhook-payload-verification-valid-digest-encodingErrorThe payload verification digest encoding must be one of the supported encoding formats. Invalid encoding values will prevent proper payload verification configuration.
OPENAPI3APIMATIC_L1048webhook-payload-verification-digest-encoding-requires-hmac-algorithmErrorThe digestEncoding property in payload verification is only applicable when using HMAC-based algorithms. Using digest encoding with non-HMAC algorithms is not supported.
OPENAPI3APIMATIC_L1049webhook-payload-verification-valid-message-templateErrorThe message template in payload verification must only contain supported placeholders. Invalid placeholders will prevent the message from being properly constructed for signature verification.
OPENAPI3APIMATIC_L1050webhook-payload-verification-valid-signature-value-templateErrorThe signature value template in payload verification must follow the expected format with supported placeholders. Invalid templates will prevent proper signature extraction and verification.
OPENAPI3APIMATIC_L1051webhook-extension-group-must-exist-when-referencedErrorWhen a webhook operation references a webhook group name, that group must be defined in the x-webhook-groups extension at the root level. Referencing a non-existent group will result in an invalid configuration.
OPENAPI3APIMATIC_L1052webhook-valid-placeholder-delimiterErrorPlaceholders in the payload verification message template must use valid delimiters. Invalid delimiters will prevent proper parsing of the message template.
OPENAPI3APIMATIC_L1053webhook-discriminator-mapping-value-emptyErrorEach entry in the discriminator mapping must reference a valid webhook ID. Mapping values that are empty or missing will prevent proper event discrimination.
OPENAPI3APIMATIC_L1054webhook-group-non-empty-descriptionWarningWhen a description is provided for a webhook group, it must contain a non-empty value. An empty description provides no useful information and should either be removed or populated with meaningful content.

Learn more

On this page