connexion
connexion copied to clipboard
Empty body parameter
Discussed in https://github.com/spec-first/connexion/discussions/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 https://github.com/spec-first/connexion/issues/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.