Skip to main content

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.

PropertyValue
EnabledYes
Maximum SeverityError
MessageReference to an undefined type found.
CodeAPIMATICPRE_V402
TypeValidation
Rule SystemSemantic
Broad CategoryTypes
Products ImpactedCode Generation, Developer Experience Portal, API Transformer
Tagspreliminary 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.

For More Information