predefined-exception-model-for-error
Overview
This rule belongs to the apimatic-preliminary-validation
ruleset and states that:
If an error response has a non-empty model name listed in its definition, a corresponding error model of "Exception" type must exist in the globally defined custom types.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Error response references a type which has no corresponding "Exception" type model definition. |
Code | APIMATICPRE_V303 |
Type | Validation |
Rule System | Semantic |
Broad Category | Endpoint Responses |
Products Impacted | Code Generation, Developer Experience Portal, API Transformer |
Tags | preliminary checks validation apimatic exception error response type custom type model complex model |
Suggested Fixes
- Define a model in custom types of type "Exception", assign it a unique name and then link it to the error response.
- Make sure that the model you linked to the error response is of "Exception" type and not "Structure".