Skip to main content

valid-parameter-example

Overview

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

The example value specified for the Parameter Object using either the example property or examples must be valid for the schema definition provided for that parameter.

PropertyValue
EnabledYes
Maximum SeverityWarning
MessageParameter example does not conform to its schema definition.
CodeOPENAPI3DOCSGEN_L382
TypeLinting
Rule SystemSemantic
Broad CategoryOpenAPI Parameters
Products ImpactedDeveloper Experience Portal
Tagsdocumentation generation documentation docs openapi3 openapi semantic linting apimatic examples example value parameter schema

Suggested Fixes

  • Ensure that parameter example value conforms to the parameter schema 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