schema-example-equal-to-default-is-redundant
Overview
This rule belongs to the openapi-v3-docsgen-linting
ruleset and states that:
Don't need to define an example if it’s exactly the same as your default value.
Property | Value |
---|---|
Enabled | No |
Maximum Severity | Warning |
Message | Default value and example value are redundant. |
Code | OPENAPI3DOCSGEN_L757 |
Type | Linting |
Rule System | Semantic |
Broad Category | OpenAPI Schemas |
Products Impacted | API Transformer, Developer Experience Portal |
Tags | documentation generation documentation docs openapi3 openapi semantic linting apimatic default example redundant |
Suggested Fixes
- Ensure that example and default value is not the same.
- Remove example value from the schema.