Define & Validate APIsValidation Rulesets

API Blueprint Rulesets

The ruleset APIMatic uses to validate API Blueprint documents.

APIMatic validates API Blueprint documents against the ruleset below. These include rules defined by the standard as well as additional checks APIMatic enforces for better output.

API Blueprint Validation

Validation checks performed on an API Blueprint or API Elements file.

PropertyValue
Ruleset IDapi-blueprint-validation
Code prefixAPIBLUEPRINT_V
TypeValidation
Default severityError
Rule systemSemantic
Rules10

Basic Structure

CodeRuleSeverityWhat it checks
APIBLUEPRINT_V001no-tab-indentationBlockingAn API Blueprint file must not use tab(s) \t to indent sections. Only spaces are currently supported in the Apiary platform.
APIBLUEPRINT_V002required-metadata-formatBlockingAn API Blueprint file is identified and distinguished from a normal Markdown file using the FORMAT key-value pair. It is usually placed in the first line of the metadata section. This keyword must be present and its value must be set as 1A.
APIBLUEPRINT_V003valid-metadata-formatBlockingAn API Blueprint file is identified and distinguished from a normal Markdown file using the FORMAT key-value pair. This keyword must have its value set as 1A.
APIBLUEPRINT_V004no-large-payloadBlockingThe input API Blueprint/Elements file provided must not be very large. Keep the size optimal to avoid any issues.
APIBLUEPRINT_V005valid-apiary-fileBlockingIf you intend to use the API Blueprint file inside Apiary, it must be valid for it i.e. it must not contain any syntax/semantic issues.
APIBLUEPRINT_V006valid-entity-typeErrorEach element in an API Blueprint/Elements file must have a correct type assigned to it as per the standards.

API Resources

CodeRuleSeverityWhat it checks
APIBLUEPRINT_V100no-request-body-in-resource-get-methodWarningA resource in an API Blueprint/Elements file must not define an Attributes or a Payload section for the request when the actions use the GET HTTP method. This is because such methods do not expect a body and, therefore, all related information will be automatically ignored during import/transformations in APIMatic.
APIBLUEPRINT_V101supported-response-codeWarningIf multiple responses are disabled via import settings provided in the APIMatic Metadata file, only response definitions 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.

Data Structures

CodeRuleSeverityWhat it checks
APIBLUEPRINT_V300required-data-structure-property-nameErrorA data structure that defines an object must specify a non-empty name for each property which is part of the object. Properties with missing name will be ignored automatically when importing/transforming the document in APIMatic.
APIBLUEPRINT_V301valid-json-schemaErrorIf a JSON schema is embedded in an API Blueprint/Elements file to provide a data definition, it must be valid as per standards.

Learn more

On this page