📝 Add note about path declaration order

This commit is contained in:
Sebastián Ramírez
2019-02-16 19:23:42 +04:00
parent 80b68cd97d
commit a809da5567
3 changed files with 27 additions and 6 deletions

View File

@@ -1,10 +1,13 @@
from uuid import UUID
from fastapi import FastAPI
app = FastAPI()
@app.get("/items/{item_id}")
async def read_item(item_id: UUID):
return {"item_id": item_id}
@app.get("/users/me")
async def read_user_me():
return {"user_id": "the current user"}
@app.get("/users/{user_id}")
async def read_user(user_id: str):
return {"user_id": user_id}