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.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Warning |
Message | Usage of example found. |
Code | OPENAPI3STANDARDS_L192 |
Type | Linting |
Rule System | Semantic |
Broad Category | Schemas |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi standards semantic linting example schema |
Suggested Fixes
- Avoid using
example
in your schema definition unless you are aware of the risks.