Skip to main content

valid-schema-enum-item-type

Overview

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

Each item within the enum list should match the expected schema type. In case an item does not conform to the specified type, it may lead to unexpected behavior or errors when consuming the API.

PropertyValue
EnabledYes
Maximum SeverityError
MessageOne or more items defined in the enum list do not conform to the schema type.
CodeOPENAPI3APIMATICSYNTAX_L662
TypeLinting
Rule SystemSyntax
Broad CategoryOpenAPI Schemas
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi syntax linting apimatic schema enum item type

Suggested Fixes

  • Make sure all items in an enum list have the same type.
  • Remove items from enum list which do not conform to the enumeration type.

For More Information