openapi-spec-validator icon indicating copy to clipboard operation
openapi-spec-validator copied to clipboard

requestBody on GET method should be invalid

Open dtkav opened this issue 7 years ago • 0 comments

requestBody should only be allowed on PATCH / POST / PUT methods.

The request body applicable for this operation. The requestBody is only supported in HTTP methods where the HTTP 1.1 specification RFC7231 has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague, requestBody SHALL be ignored by consumers.

from : https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#operation-object

dtkav avatar Nov 08 '18 02:11 dtkav