-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed
Labels
Description
This demo generates a doc document
insert_router = APIRouter()
@insert_router.post("/items/")
async def create_item(item: Item):
item_dict = item.dict()
if item.tax:
price_with_tax = item.price + item.tax
item_dict.update({"price_with_tax": price_with_tax})
return item_dict
This demo doesn't generate docs
@insert_router.route(path="/items/",methods=["post"])
async def create_item(item: Item):
item_dict = item.dict()
if item.tax:
price_with_tax = item.price + item.tax
item_dict.update({"price_with_tax": price_with_tax})
return item_dict
Is this a bug?