Skip to main content

same-schema-enum-item-type

Overview

This rule belongs to the openapi-v3-apimatic-linting ruleset and states that:

The data type of each item defined in an enumeration list must conform to the type defined for the schema object.

PropertyValue
EnabledYes
Maximum SeverityError
MessageEnumeration list contains one or more items that do not conform to the schema type defined.
CodeOPENAPI3APIMATIC_L695
TypeLinting
Rule SystemSemantic
Broad CategoryOpenAPI Schemas
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi apimatic semantic linting unique enum schema items entries

Suggested Fixes

  • Make sure all fields of an enumeration model have the same type.
  • Make sure that none of the items in enumeration list in empty or null.
  • Remove all enumeration items whose type do not conform to schema type.

For More Information