Skip to main content

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.

PropertyValue
EnabledYes
Maximum SeverityError
MessageThe value of allowEmptyValue is not allowed for parameters other than query or formData.
CodeSWAGGER20STANDARDS_V108
TypeValidation
Rule SystemSemantic
Broad CategoryParameters
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsswagger2 swagger standards semantic validation allow empty value parameter form query

Suggested Fixes

  • The allowEmptyValue is a boolean property with true or false as possible values. It can be true only for query and formData parameters.

For More Information