only-predefined-type-as-type-reference
Overview
This rule belongs to the apimatic-preliminary-validation ruleset and states that:
A type used in a component must either be a valid primitive type supported by APIMatic or a model/complex type for which a corresponding custom type must be defined globally.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Reference to an undefined type found. |
| Code | APIMATICPRE_V402 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Types |
| Products Impacted | Code Generation, Developer Experience Portal, API Transformer |
| Tags | preliminary checks validation apimatic type primitve type scalar type custom type model complex model |
Suggested Fixes
- Make sure that all non-primitive types used throughout the specification have a corresponding type definition.
- Make sure the type name is not misspelled. Names are compared in a case sensitive manner.
- If the type is a primitive one, make sure it is supported in the respective specification format.