Skip to main content

valid-example-value-for-associated-schema

Overview

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

The example value specified in the Example Object using the value property must be compatible with the associated type schema definition.

PropertyValue
EnabledYes
Maximum SeverityWarning
MessageThe example value does not conform with the associated type schema definition.
CodeOPENAPI3STANDARDS_L120
TypeLinting
Rule SystemSemantic
Broad CategoryExamples
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi standards semantic linting example value schema

Suggested Fixes

  • Ensure that the example value conforms to the schema type definition.
  • Check that no required properties are missing in the sample value.
  • Check that types of all properties match those specified in the schema definition.

For More Information