Define & Validate APIsValidation RulesetsAPIMatic Rulesets

APIMatic Linting for Portal Generation

APIMatic performs some preliminary linting checks on the user-provided API specification file to ensure that the docs/portal generation produces the desired output.

PropertyValue
Ruleset IDapimatic-docs-linting
Code prefixAPIMATICDOCS_L
TypeLinting
Default severityWarning
Rule systemSemantic
Rules13

Description

CodeRuleSeverityWhat it checks
APIMATICDOCS_L001required-description-all-entitiesInformationEach element in the API specification must have a non-null non-empty description.
APIMATICDOCS_L002required-entity-descriptionInformationComponent must have a non-null non-empty description.

Examples

CodeRuleSeverityWhat it checks
APIMATICDOCS_L101required-entity-example-valueInformationComponent must have a non-null, non-empty and valid example/sample value.
APIMATICDOCS_L102required-example-value-or-external-urlWarningAn example entry from the multiple examples list must have either an example value set or an alternate external URL from which the example value can be fetched.
APIMATICDOCS_L103no-example-for-error-with-no-modelWarningAn example must not be set for a error response that has no error model linked to it.
APIMATICDOCS_L104valid-example-valueWarningThe sample value provided must be valid according to the type definition of the component to which it belongs.
APIMATICDOCS_L105example-value-restrictionsWarningThe sample value provided must obey all restrictions placed in the corresponding type definition.
APIMATICDOCS_L106no-undeclared-fields-in-example-valueWarningAll undeclared fields from the component's example must be defined in the component's type definition. If any fields are extra, they should be removed from the example.
APIMATICDOCS_L107unique-example-idsWarningThe ids assigned to examples provided for a component must be unique.
APIMATICDOCS_L108non-empty-non-null-example-idWarningAll examples provided for a component must be assigned unique, non-empty and non-null ids.
APIMATICDOCS_L109valid-example-external-value-urlWarningThe external URL provided for example, from which the example value is retrieved, must be a valid publicly-accessible URL.
APIMATICDOCS_L110no-read-only-property-in-parameter-exampleWarningAn example provided for a complex type parameter must not contain properties that are marked as read-only. Such properties may only be set in a response but should not be part of the request.
APIMATICDOCS_L111no-write-only-property-in-response-exampleWarningAn example provided for a complex type response must not contain properties that are marked as write-only. Such properties may only be sent as part of the request but should not be set in the response.

Learn more

On this page