Skip to main content

no-invalid-schema-examples

Validates examples declared on schemas against the resolved schema constraints.

AttributeValue
CategoryExamples
MaturityBronze
Starter–LenientOff
Recommended–StrictWarning
CompleteError

See it fail

type: string
enum: [pending, paid]
example: failed

Fix it

Use a valid enum value, or update the schema when failed is supported.

Options

Set allowAdditionalProperties: true when object examples may contain undeclared fields. Default: false.

Nearby: no-invalid-media-type-examples, no-invalid-parameter-examples.