The OpenAPI specification defines several places where mime types (for specification v2) or media type ranges (for specification v3) can be used. The defined types must conform to the RFC6838 and RFC7231. This ensures that a tool can rely on the declared media type to generate appropriate code to handle the parsing of output.

Noncompliant Code Example

Compliant Solution