OpenAPI Response Post 201 Media Type Error (Edit)

POST 201 success HTTP status codes have a application/json media type, standardizing the response payload returned for a successful response

OpenAPIResponsesPOST2xxMedia Types

Rule Definition

openapi-response-post-201-media-type-error.yaml
{"openapi-response-post-201-media-type-error":{"description":"POST 201 success HTTP status codes have a application/json media type, standardizing the response payload returned for a successful response","message":"POST 201 Responses MUST Have Media Type","severity":"error","given":"$.paths.*.post.responses.201.content","then":{"field":"application/json","function":"truthy"}}}

Back to All of the Rules