Skip to main content

no-content-type-with-encoding-allow-reserved

Overview

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

If the encoding configuration allows for reserved characters using the Encoding Object's allowReserved property, then the value of property contentType (implicit or explicit) will be ignored.

PropertyValue
EnabledYes
Maximum SeverityWarning
MessageEncoding allowReserved is defined, therefore, the value of contentType will be ignored.
CodeOPENAPI3STANDARDS_V156
TypeValidation
Rule SystemSemantic
Broad CategoryEncoding
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi standards semantic validation content type allow reserved serialization property encoding

Suggested Fixes

  • Remove the allowReserved property from the Encoding Object.
  • If you want the contentType information to be effective, remove the allowReserved information from the Encoding Object instead.

For More Information