You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as we can see above, if an operation has a request body, we will require to have a content type set, however that request body could be not required which means that a content type should not be required.
i haven't go any further in my investigation, maybe the underlying lib is already capable of handling such cases, any if we agree that this is not an expected behavior i can propose a fix in a few hours/days.
The text was updated successfully, but these errors were encountered:
As i just discovered, request bodies are optional by default.
see https://spec.openapis.org/oas/v3.1.0#fixed-fields-10 or https://swagger.io/docs/specification/describing-request-body/
this dear library doesn't handle such cases
libopenapi-validator/requests/validate_body.go
Line 41 in 688b7a2
as we can see above, if an operation has a request body, we will require to have a content type set, however that request body could be not required which means that a content type should not be required.
i haven't go any further in my investigation, maybe the underlying lib is already capable of handling such cases, any if we agree that this is not an expected behavior i can propose a fix in a few hours/days.
The text was updated successfully, but these errors were encountered: