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.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Information |
Message | Parameter object example is missing. |
Code | OPENAPI3DOCSGEN_L381 |
Type | Linting |
Rule System | Semantic |
Broad Category | OpenAPI Parameters |
Products Impacted | Developer Experience Portal |
Tags | documentation generation documentation docs openapi3 openapi semantic linting apimatic example examples parameter |
Suggested Fixes
- Ensure that either
example
orexamples
property is present in the Parameter Object. example
andexamples
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.