Skip to main content

at-least-one-item-in-schema-enum-list

Overview

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

Enum list must not be empty as it is used to define a set of valid values for the schema. An empty enum list can cause ambiguity in the definition of acceptable values.

PropertyValue
EnabledYes
Maximum SeverityError
MessageEmpty schema enum list found which is not allowed.
CodeOPENAPI3APIMATIC_L693
TypeLinting
Rule SystemSemantic
Broad CategoryOpenAPI Schemas
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi apimatic semantic linting empty enum schema

Suggested Fixes

  • Define at least one or more item for the schema enum list.
  • Remove the schema enum list.

For More Information