tiangolo / full-stack-fastapi-couchbase

Full stack, modern web application generator. Using FastAPI, Couchbase as database, Docker, automatic HTTPS and more.
MIT License
441 stars 84 forks source link

422 Unprocessable Entity #5

Closed zero0nee closed 5 years ago

zero0nee commented 5 years ago

Hi!

When I try to create a new user, using POST /api/v1/users/ I get the response 422 Unprocessable Entity, and the backend will just log:

[2019-02-28 16:15:06 +0000] [45] [INFO] ('172.20.0.2', 51610) - "POST /api/v1/users/ HTTP/1.1" 422

Anyone else has this problem. I've just used the template generator without any customisation.

zero0nee commented 5 years ago

Ok! I found this. The client sends a JSON using a property called name , however according to the API specification the property should be named username not name

Perhaps it would be solved by changing the property names inside CreateUser.vue?

tiangolo commented 5 years ago

Sorry for the delay and thank you! There was indeed a bug.

The most recent version has several things updated, code cleaned, refactored, and simplified, etc (And this bug is fixed too :grin: )

zero0nee commented 5 years ago

Nice! I want to confirm that it is now fixed. :)

tiangolo commented 5 years ago

Great! Thanks for coming back to report. I'll then close this issue now.