valid-example-value
Overview
This rule belongs to the openapi-v3-docsgen-linting ruleset and states that:
Examples within parameters or request body media types should not contain any properties marked as readOnly. Similarly, when providing examples for response object media types, it is important to avoid including any properties marked as writeOnly.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Warning |
| Message | Invalid example value found. |
| Code | OPENAPI3DOCSGEN_L593 |
| Type | Linting |
| Rule System | Semantic |
| Broad Category | OpenAPI Examples |
| Products Impacted | Developer Experience Portal |
| Tags | documentation generation documentation docs openapi3 openapi semantic linting apimatic example examples value readonly writeonly |
Suggested Fixes
- Remove any
readOnlyproperty from the example defined within parameter or request body media type examples. - Remove any
writeOnlyproperties from the example defined within response object media type examples.