swagger-codegen-generators
swagger-codegen-generators copied to clipboard
[Python] JSON request with body=None should produce empty payload
(this is a clone of https://github.com/swagger-api/swagger-codegen/issues/12138) This issue is to reconsider change made as a consequence of https://github.com/swagger-api/swagger-codegen/issues/9558 Conclusions related to JSON semantic correctness are unquestionably correct. There is however HTTP Semantics with its legacy (https://www.rfc-editor.org/rfc/rfc9110#name-delete ), that was taken into account in OpenAPI 3.0 (see https://spec.openapis.org/oas/latest.html#operationObject ). As a consequence, the None body should be allowed for GET, HEAD and DELETE operations.
Hey @hsekowski . Any chance we can get this fix merged? I'm encountering the exact same issue where {}
is sent during a POST when I'd want to be no body at all.
Thanks!
Hi @Plonk42 , I'm just external contributor, who raised and issue and proposed a solution (https://github.com/swagger-api/swagger-codegen-generators/pull/1142) Some repo owner has to take a look and decide what to do with the PR and issue
Oh sorry I was confused, I didn't realized the mentioned commit was pushed to you own fork. Thanks anyway for the fix, I'll apply it manually until it gets eventually merged.