📝 Add docs for path operation configurations

This commit is contained in:
Sebastián Ramírez committed 2018-12-15 14:39:11 +04:00
1 parent 8628120873
commit e790bf6f1b
13 files changed
+246

No files matched your search

@@ -0,0 +1,18 @@
from fastapi import FastAPI
app = FastAPI()
@app.get("/items/", tags=["items"])
async def read_items():
return [{"name": "Foo", "price": 42}]
@app.get("/users/", tags=["users"])
async def read_users():
return [{"username": "johndoe"}]
@app.get("/elements/", tags=["items"], deprecated=True)
async def read_elements():
return [{"item_id": "Foo"}]