Define & Validate APIsValidation RulesetsAPIMatic Rulesets

Metadata File Validation

Validation checks on the APIMatic Metadata file provided with your API definition.

PropertyValue
Ruleset IDmetadata-validation
Code prefixMETADATA_V
TypeValidation
Default severityError
Rule systemSemantic
Rules7

Metadata Structure

CodeRuleSeverityWhat it checks
METADATA_V001valid-metadata-syntaxErrorThe APIMatic Metadata file must follow the metadata file syntax, with each property using its expected type.
METADATA_V002no-metadata-additional-propertyErrorThe APIMatic Metadata file must not contain properties APIMatic does not support. Property names are case-sensitive.

Validation Configuration

CodeRuleSeverityWhat it checks
METADATA_V200valid-ruleset-id-or-codeErrorEach key in the Rulesets map of the validation configuration must be non-empty and unique. For a built-in ruleset, the key must match that ruleset's Id or Code.
METADATA_V201valid-custom-ruleset-file-pathErrorThe FilePath of a custom ruleset must be a non-empty relative path, not a URL, and must point to a readable ruleset file.
METADATA_V202valid-rule-id-or-codeErrorWhen configuring a rule in a ruleset, the rule identifier must match the Id or Code of an existing rule in that ruleset.

Merge Configuration

CodeRuleSeverityWhat it checks
METADATA_V300at-least-one-api-directory-for-mergingErrorWhen MergeConfiguration > MergeApis is enabled, at least one API directory must exist next to the metadata file.
METADATA_V301valid-merge-order-directory-pathErrorEvery entry in MergeConfiguration > MergeOrderOfDirectories must be a relative path to a directory that exists next to the metadata file.

On this page