Skip to main content

parameter-pipe-delimited-style-only-for-array-type

Overview

This rule belongs to the openapi-v3-standards-validation ruleset and states that:

In an OpenAPI v3.0.x document, the pipeDelimited style can only be used when the type of the parameter is set as array i.e. it cannot be used for primitive or object types.

PropertyValue
EnabledYes
Maximum SeverityError
MessagePipe delimited style cannot be used with the current parameter type.
CodeOPENAPI3STANDARDS_V093
TypeValidation
Rule SystemSemantic
Broad CategoryParameters
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi standards semantic validation pipe delimited style array serialization parameter

Suggested Fixes

  • Ensure that the type of the parameter set in either the parameter's schema or content definition is equal to array.
  • If the parameter type is not expected to be an array, change the value of the style property to one that supports non-array types e.g. matrix, label, form, deepObject.
  • If the parameter type is not expected to be an array and you are unsure about which style to use, simply remove the style property definition.

For More Information