Skip to main content

parameter-example-or-examples-exist

Overview

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

Parameter Object must specify a non-null, non-empty example value using either the example or examples property.

PropertyValue
EnabledYes
Maximum SeverityInformation
MessageParameter object example is missing.
CodeOPENAPI3DOCSGEN_L381
TypeLinting
Rule SystemSemantic
Broad CategoryOpenAPI Parameters
Products ImpactedDeveloper Experience Portal
Tagsdocumentation generation documentation docs openapi3 openapi semantic linting apimatic example examples parameter

Suggested Fixes

  • Ensure that either example or examples property is present in the Parameter Object.
  • example and examples are mutually exclusive properties.
  • When using the examples list, make sure that the list is not empty.
  • Ensure that the parameter example value is not empty or null.
  • The example value specified must be valid in accordance with the parameter schema definition.

For More Information