Skip to main content

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.

PropertyValue
EnabledNo
Maximum SeverityWarning
MessageDefault value and example value are redundant.
CodeOPENAPI3DOCSGEN_L757
TypeLinting
Rule SystemSemantic
Broad CategoryOpenAPI Schemas
Products ImpactedAPI Transformer, Developer Experience Portal
Tagsdocumentation 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.

For More Information