📝 Use return type annotation instead of response_model when possible (#14753)

This commit is contained in:
Motov Yurii
2026-02-04 15:07:26 +03:00
committed by GitHub
parent f6ba0141f4
commit 741c7345ea
27 changed files with 50 additions and 54 deletions

View File

@@ -12,8 +12,8 @@ class Item(BaseModel):
tags: set[str] = set()
@app.post("/items/", response_model=Item, tags=["items"])
async def create_item(item: Item):
@app.post("/items/", tags=["items"])
async def create_item(item: Item) -> Item:
return item