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.
| Property | Value |
|---|---|
| Ruleset ID | apimatic-post-processing-codegen-validation |
| Code prefix | APIMATICPOSTPROCESSCODEGEN_V |
| Type | Validation |
| Default severity | Warning |
| Rule system | Semantic |
| Rules | 9 |
Endpoints
| Code | Rule | Severity | What it checks |
|---|---|---|---|
APIMATICPOSTPROCESSCODEGEN_V001 | non-conflicting-model-and-endpoint-group-names | Warning | If 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_V002 | non-conflicting-endpoint-names | Warning | If conflicts are observed in endpoint names, they may be renamed to avoid code generation issues. |
APIMATICPOSTPROCESSCODEGEN_V003 | non-conflicting-test-case-names | Warning | If conflicts are observed in test case names, they may be renamed to avoid code generation issues. |
APIMATICPOSTPROCESSCODEGEN_V004 | no-reserved-keywords-in-endpoint-group | Warning | The 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_V005 | optional-parameters-placement | Warning | For 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_V006 | non-conflicting-parameter-names | Warning | If conflicts are observed in parameter's display names, they may be renamed to avoid code generation issues. |
Global Types/Models
| Code | Rule | Severity | What it checks |
|---|---|---|---|
APIMATICPOSTPROCESSCODEGEN_V101 | valid-enum-field-name-conventions | Warning | Names 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_V102 | single-declaration-of-discriminator | Warning | The discriminator must be declared once and in the base type only. |
Miscellaneous
| Code | Rule | Severity | What it checks |
|---|---|---|---|
APIMATICPOSTPROCESSCODEGEN_V201 | non-null-non-empty-error-template-key | Warning | The 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
APIMatic Post-Processing Validation
APIMatic post-processes a user-provided API specification document and automatically fixes some common issues. This validation mainly informs users about these issues and the fixes performed.
APIMatic Preliminary Linting
APIMatic performs some preliminary linting checks on the user-provided API specification to ensure that the API specification document produces desired output in any of the APIMatic products including API Transformer, SDK/Portal generation, etc.