Skip to main content

valid-enum-field-types

Overview

This rule belongs to the apimatic-preliminary-validation ruleset and states that:

All fields of an enumeration model must have the same type: "String" or "Number". Other types are currently not supported.

PropertyValue
EnabledYes
Maximum SeverityError
MessageEnumeration model contains one or more fields that are of a type other than "String" or "Number" which is not supported.
CodeAPIMATICPRE_V514
TypeValidation
Rule SystemSemantic
Broad CategoryGlobal Types/Models
Products ImpactedCode Generation, Developer Experience Portal, API Transformer
Tagspreliminary checks validation apimatic type enumeration field property custom type model complex model

Suggested Fixes

  • Make sure all fields of an enumeration model have the same type.
  • Make sure that type of all fields is set and is non-empty, non-null.
  • Remove all references to types other than "String" and "Number".

For More Information