Define & Validate APIsValidation RulesetsAPIMatic Rulesets

APIMatic Post-Processing Validation For Code Generation

APIMatic post-processes a user-provided API specification document and automatically fixes some common issues that can impact code generation. This validation helps inform users about these issues and the fixes performed.

PropertyValue
Ruleset IDapimatic-post-processing-codegen-validation
Code prefixAPIMATICPOSTPROCESSCODEGEN_V
TypeValidation
Default severityWarning
Rule systemSemantic
Rules9

Endpoints

CodeRuleSeverityWhat it checks
APIMATICPOSTPROCESSCODEGEN_V001non-conflicting-model-and-endpoint-group-namesWarningIf controller and model postfixing is disabled, similar model names and endpoint group names can cause conflicts in code generation, therefore, the names of both entities must be kept unique overall.
APIMATICPOSTPROCESSCODEGEN_V002non-conflicting-endpoint-namesWarningIf conflicts are observed in endpoint names, they may be renamed to avoid code generation issues.
APIMATICPOSTPROCESSCODEGEN_V003non-conflicting-test-case-namesWarningIf conflicts are observed in test case names, they may be renamed to avoid code generation issues.
APIMATICPOSTPROCESSCODEGEN_V004no-reserved-keywords-in-endpoint-groupWarningThe endpoint group name must not contain any reserved keywords that can possibly cause issues during Code Generation. If it contains any, the endpoint group name may be auto renamed.
APIMATICPOSTPROCESSCODEGEN_V005optional-parameters-placementWarningFor code generation purposes, it is important that optional parameters should be defined at the end of the endpoint parameters list and not before or between required parameters. If this is not the case by default, the parameters may be automatically sorted to get the required order.
APIMATICPOSTPROCESSCODEGEN_V006non-conflicting-parameter-namesWarningIf conflicts are observed in parameter's display names, they may be renamed to avoid code generation issues.

Global Types/Models

CodeRuleSeverityWhat it checks
APIMATICPOSTPROCESSCODEGEN_V101valid-enum-field-name-conventionsWarningNames assigned to fields of an enumeration model must not contain special characters. In case they do, the special characters will be removed to prevent issues.
APIMATICPOSTPROCESSCODEGEN_V102single-declaration-of-discriminatorWarningThe discriminator must be declared once and in the base type only.

Miscellaneous

CodeRuleSeverityWhat it checks
APIMATICPOSTPROCESSCODEGEN_V201non-null-non-empty-error-template-keyWarningThe error template key must be a valid error HTTP status code/range or set to 0. Empty or null entries will be automatically removed.

Learn more

On this page