allow-empty-value-only-for-form-and-query-parameter
Overview
This rule belongs to the swagger-v2-standards-validation ruleset and states that:
The allowEmptyValue property sets the ability to pass empty-valued parameters. This is valid only for either query or formData parameters and allows you to send a parameter with a name only or an empty value.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | The value of allowEmptyValue is not allowed for parameters other than query or formData. |
| Code | SWAGGER20STANDARDS_V108 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Parameters |
| Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
| Tags | swagger2 swagger standards semantic validation allow empty value parameter form query |
Suggested Fixes
- The
allowEmptyValueis a boolean property withtrueorfalseas possible values. It can betrueonly forqueryandformDataparameters.