Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python] JSON request with body=None should produce empty payload #1141

Open
hsekowski opened this issue May 2, 2023 · 3 comments
Open

[Python] JSON request with body=None should produce empty payload #1141

hsekowski opened this issue May 2, 2023 · 3 comments

Comments

@hsekowski
Copy link

(this is a clone of swagger-api/swagger-codegen#12138)
This issue is to reconsider change made as a consequence of swagger-api/swagger-codegen#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.

hsekowski added a commit to hsekowski/swagger-codegen-generators that referenced this issue May 2, 2023
@Plonk42
Copy link

Plonk42 commented Aug 24, 2023

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!

@hsekowski
Copy link
Author

Hi @Plonk42 ,
I'm just external contributor, who raised and issue and proposed a solution (#1142)
Some repo owner has to take a look and decide what to do with the PR and issue

@Plonk42
Copy link

Plonk42 commented Aug 24, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants