Define & Validate APIsValidation RulesetsOpenAPI Rulesets

OpenAPI v3 Syntax Linting for APIMatic Code Generation

Linting checks performed by APIMatic on provided OpenAPI v3 file to check its conformance to recommended syntax practices for better code generation experience.

PropertyValue
Ruleset IDopenapi-v3-codegen-syntax-linting
Code prefixOPENAPI3CODEGENSYNTAX_L
TypeLinting
Default severityWarning
Rule systemSyntax
Rules32

OpenAPI Info

CodeRuleSeverityWhat it checks
OPENAPI3CODEGENSYNTAX_L050valid-info-titleErrorFor successful Code Generation, the title must only use letters, numbers, underscores and dashes. It must not contain any leading/trailing white-space characters.

OpenAPI Servers

CodeRuleSeverityWhat it checks
OPENAPI3CODEGENSYNTAX_L090valid-environment-nameErrorFor successful Code Generation, the environment name must only use letters, numbers, underscores and dashes. It must not contain any leading/trailing white-space characters. Environment Names are often used for naming the files generated as part of the code generation process, so, any forbidden file name characters are not allowed.
OPENAPI3CODEGENSYNTAX_L091valid-server-nameErrorFor successful Code Generation, the server name must only use letters, numbers, underscores and dashes. It must not contain any leading/trailing white-space characters. Names are often used for naming the files generated as part of the code generation process, so, any forbidden file name characters are not allowed.
OPENAPI3CODEGENSYNTAX_L092valid-server-variables-keyErrorFor successful Code Generation, the server variables key must only use letters, numbers, underscores and dashes. It must not contain any leading/trailing white-space characters.
OPENAPI3CODEGENSYNTAX_L093valid-server-parameter-nameErrorFor successful Code Generation, the server parameter name must only use letters, numbers, underscores and dashes. It must not contain any leading/trailing white-space characters. Names are often used for naming the files generated as part of the code generation process, so, any forbidden file name characters are not allowed.

OpenAPI Components

CodeRuleSeverityWhat it checks
OPENAPI3CODEGENSYNTAX_L130valid-schema-component-keyErrorFor successful Code Generation, the Schema Component key must only use letters, numbers, underscores and dashes. It must not contain any leading/trailing white-space characters.

OpenAPI Path Items

CodeRuleSeverityWhat it checks
OPENAPI3CODEGENSYNTAX_L170valid-path-item-parameter-nameErrorFor successful Code Generation, the path item level parameter name must only use letters, numbers, underscores and dashes. It must not contain any leading/trailing white-space characters. Names are often used for naming the files generated as part of the code generation process, so, any forbidden file name characters are not allowed.

OpenAPI Operations

CodeRuleSeverityWhat it checks
OPENAPI3CODEGENSYNTAX_L190valid-operation-idErrorThe id of an Operation Object specified using the operationId property is a unique identifier of the operation in the complete API document. This id is used by the code generation engine to generate relevant components tied to an endpoint. Therefore, the id must be short and code-friendly. The id must only use letters, numbers, underscores and dashes. It must not contain any leading/trailing white-space characters. Names are often used for naming the files generated as part of the code generation process, so, any forbidden file name characters are not allowed either.
OPENAPI3CODEGENSYNTAX_L191valid-operation-summaryErrorFor successful Code Generation, the operation summary must only use letters, numbers, underscores and dashes. It must not contain any leading/trailing white-space characters.
OPENAPI3CODEGENSYNTAX_L192valid-operation-parameter-nameErrorFor successful Code Generation, the operation level parameter name must only use letters, numbers, underscores and dashes. It must not contain any leading/trailing white-space characters. Names are often used for naming the files generated as part of the code generation process, so, any forbidden file name characters are not allowed.

OpenAPI Operation Settings

CodeRuleSeverityWhat it checks
OPENAPI3CODEGENSYNTAX_L240valid-operation-method-nameErrorMethod names must use letters, numbers, spaces, underscores and dashes only. It must start with a letter.
OPENAPI3CODEGENSYNTAX_L241valid-operation-error-template-keyErrorThe key of an error template entry must be a valid error HTTP status code/range (e.g. 4XX, 500) or set to 0 to represent default/undeclared errors.
OPENAPI3CODEGENSYNTAX_L242valid-operation-error-template-message-formatErrorValue of an error template entry must be a valid string message, with support for expression templates.

OpenAPI Operation Test Cases

CodeRuleSeverityWhat it checks
OPENAPI3CODEGENSYNTAX_L340valid-test-case-nameErrorFor successful Code Generation, the test case name must only use letters, numbers, underscores and dashes. It must not contain any leading/trailing white-space characters.
OPENAPI3CODEGENSYNTAX_L341no-trailing-leading-spaces-in-test-case-nameWarningThe test case's name should not contain any leading or trailing white-space characters.'
OPENAPI3CODEGENSYNTAX_L342test-case-request-uri-begins-with-forward-slashErrorThe request URI for unit test cases specified under operation object must begin with a forward slash.

OpenAPI Schemas

CodeRuleSeverityWhat it checks
OPENAPI3CODEGENSYNTAX_L610valid-schema-titleErrorFor successful Code Generation, the schema title must only use letters, numbers, underscores and dashes. It must not contain any leading/trailing white-space characters.
OPENAPI3CODEGENSYNTAX_L611valid-schema-properties-keyErrorFor successful Code Generation, the schema property keys must only use letters, numbers, underscores and dashes. It must not contain any leading/trailing white-space characters.
OPENAPI3CODEGENSYNTAX_L612valid-schema-enum-element-nameErrorFor successful Code Generation, the enum item name must only use letters, numbers, underscores and dashes. It must not contain any leading/trailing white-space characters.
OPENAPI3CODEGENSYNTAX_L613no-trailing-leading-spaces-in-schema-enum-element-nameWarningName of a schema enum element should not contain any leading or trailing white-space characters.

OpenAPI Security Schemes

CodeRuleSeverityWhat it checks
OPENAPI3CODEGENSYNTAX_L740valid-api-key-security-scheme-nameErrorFor successful Code Generation, the name of the ApiKey Security Scheme must only use letters, numbers, underscores and dashes. It must not contain any leading/trailing white-space characters.
OPENAPI3CODEGENSYNTAX_L741valid-additional-header-nameErrorFor successful Code Generation, the name of the additional header must only use letters, numbers, underscores and dashes. It must not contain any leading/trailing white-space characters.

OpenAPI OAuth 2.0 Flows

CodeRuleSeverityWhat it checks
OPENAPI3CODEGENSYNTAX_L760no-space-in-oauth-flow-scope-keyErrorScope keys in OAuth flow must not contain spaces.

OpenAPI Security Requirements

CodeRuleSeverityWhat it checks
OPENAPI3CODEGENSYNTAX_L780no-space-in-security-requirement-scope-valueErrorScope values in OAuth flow must not contain spaces.

OpenAPI Code Generation Settings

CodeRuleSeverityWhat it checks
OPENAPI3CODEGENSYNTAX_L800valid-php-composer-package-name-codegen-settingErrorPHP Composer package name must match the naming rules specified in the composer schema file.
OPENAPI3CODEGENSYNTAX_L801valid-php-namespace-name-codegen-settingErrorPHP namespace name must not contain forbidden characters or use invalid format.
OPENAPI3CODEGENSYNTAX_L802valid-java-group-id-codegen-settingErrorJava Group ID must match the naming rules specified in maven guides.
OPENAPI3CODEGENSYNTAX_L803valid-java-artifact-id-codegen-settingErrorJava Artifact ID must match the naming rules specified in maven guides.
OPENAPI3CODEGENSYNTAX_L804valid-controller-postfix-codegen-settingErrorController postfix string must use letters, numbers, underscore and dashes only.
OPENAPI3CODEGENSYNTAX_L806valid-error-templates-codegen-setting-keyErrorThe key of an error template entry must be a valid error HTTP status code/range (e.g. 4XX, 500) or set to 0 to represent default/undeclared errors.
OPENAPI3CODEGENSYNTAX_L807valid-error-templates-codegen-setting-message-formatErrorValue of an error template entry must be a valid string message, with support for expression templates.

Miscellaneous

CodeRuleSeverityWhat it checks
OPENAPI3CODEGENSYNTAX_L900valid-apimatic-extension-property-typeWarningType of an APIMatic specific extension property must be in accordance with the type expected for that property.

Learn more

On this page