Skip to content
Discussion options

You must be logged in to vote

Since FastAPI 0.115.0 you can modify your code by adding Query like shown below to make it working:

@app.get("/hh")
async def update_item(item: Annotated[Item, Query()]):
    return {
        "method": 'get',
        "people_name": item.name,
        "people_age": item.age,
        "people_height": item.height
    }

Replies: 7 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by YuriiMotov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question or problem question-migrate
4 participants
Converted from issue

This discussion was converted from issue #4327 on February 28, 2023 16:23.