Skip to main content

no-schema-example-usage

Overview

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

Use of the property example has been deprecated by OpenAPI in favor of the JSON Schema examples keyword. Use of property example is discouraged as later versions of the OpenAPI specification may remove it.

PropertyValue
EnabledYes
Maximum SeverityWarning
MessageUsage of example found.
CodeOPENAPI3STANDARDS_L192
TypeLinting
Rule SystemSemantic
Broad CategorySchemas
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi standards semantic linting example schema

Suggested Fixes

  • Avoid using example in your schema definition unless you are aware of the risks.

For More Information