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

Empty body parameter #1939

Open
codescrawl opened this issue Jun 12, 2024 Discussed in #1938 · 0 comments
Open

Empty body parameter #1939

codescrawl opened this issue Jun 12, 2024 Discussed in #1938 · 0 comments

Comments

@codescrawl
Copy link

Discussed in #1938

Originally posted by codescrawl June 11, 2024
I'm having a problem with a missing body parameter. I've read through various discussions and especially focussed on #1241. I have the x-body-name set based on that discussion.

The error I see is

TypeError: create() missing 1 required positional argument: 'person'
INFO:     127.0.0.1:54992 - "POST /api/people HTTP/1.1" 500 Internal Server Error

I'm tried different dependency versions and I'm seeing the following:
Flask 3.0.3 & connexion[Flask, swagger-ui, uvicorn] 3.1.0 exhibits the error on a POST
Flask 2.2.5 & connexion[Flask, swagger-ui, uvicorn] 3.1.0 exhibits the error on a POST
Flask 2.2.5 & connexion[Flask, swagger-ui, uvicorn] 2.14.2 works fine
Flask 3.0.2 & connexion[Flask, swagger-ui, uvicorn] 3.0.2 exhibits the error on a POST

I've attached a working project with pipfiles in subdirectories for easy swapping out. The project is minimal and has swagger enabled on http://localhost:8000/api/ui

Would anyone be able to give me some advice on how to get later versions working together as it seems odd that I have to pin to much earlier versions.

Thanks!
step1.zip
stack-trace.txt

Interestingly I just tried the same openapi spec without Flask's involvement at all using AsyncApp instead and get the same result with the latest release. Attached below is the changed project. I'm starting to get the sense that this might be a genuine bug.

step1-async.zip

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

1 participant