valid-mime-type
Overview
This rule belongs to the swagger-v2-syntax-validation ruleset and states that:
The mime type definitions should be in compliance with RFC6838.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Mime type is invalid. |
| Code | SWAGGER20SYNTAX_V100 |
| Type | Validation |
| Rule System | Syntax |
| Broad Category | Miscellaneous |
| Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
| Tags | swagger2 swagger syntax validation mime mime types |
Suggested Fixes
- Ensure that the mime type defined is valid.
- Ensure that the mime type does not contain any forbidden characters.
For More Information
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#mime-types
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#swagger-object
- https://www.rfc-editor.org/rfc/rfc6838
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md
- https://docs.apimatic.io/rulesets/overview/