example-mime-type-exists-in-operation-produces
Overview
This rule belongs to the swagger-v2-standards-validation ruleset and states that:
The mime type specified in the Example Object must be one of the Operation Object produces property values (either implicit or inherited).
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Mime type does not exist in operation produces property. |
| Code | SWAGGER20STANDARDS_V201 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Response Examples |
| Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
| Tags | swagger2 swagger standards semantic validation mime type operation examples example produces |
Suggested Fixes
- Make sure that the mime type matches exactly with one of those specified in the
producesproperty of Operation Object. - Mime type value is compared in a case-sensitive manner.