no-allow-empty-value-for-deep-object-style-parameter
Overview
This rule belongs to the openapi-v3-standards-validation
ruleset and states that:
Empty valued parameters cannot be serialized when using the deepObject
style type. Therefore, for such cases, the value of allowEmptyValue will be ignored.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Warning |
Message | Value of allowEmptyValue will be ignored for deepObject parameter style. |
Code | OPENAPI3STANDARDS_V098 |
Type | Validation |
Rule System | Semantic |
Broad Category | Parameters |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi standards semantic validation style deep object serialization parameter allow empty value |
Suggested Fixes
- Remove the allowEmptyValue flag from the parameter definition if you are using the
deepObject
style. - Change the value of the parameter style from
simple
to one that supports empty values e.g. matrix, label, form.
For More Information
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#fixed-fields-10
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-examples
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-10
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#style-values
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#parameter-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#openapi-specification
- https://docs.apimatic.io/rulesets/overview/