allow-empty-value-only-for-query-parameter
Overview
This rule belongs to the openapi-v3-standards-linting
ruleset and states that:
Property allowEmptyValue
is only valid for query parameters (i.e. parameter location is set to query
) and allows sending a parameter with an empty value. This property cannot be used with any other types of parameters e.g. path, header, or cookie.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Warning |
Message | Property allowEmptyValue is used for a non-query parameter definition. |
Code | OPENAPI3STANDARDS_L062 |
Type | Linting |
Rule System | Semantic |
Broad Category | Parameters |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi standards semantic linting empty value query parameter |
Suggested Fixes
- Remove property
allowEmptyValue
from the current Parameter Object. - Change the parameter location to
query
if you want to allow sending it with empty values.