Coverage for docs_src / strict_content_type / tutorial001_py310.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.13.3, created at 2026-04-06 01:24 +0000

1from fastapi import FastAPI 1abhicdefg

2from pydantic import BaseModel 1abhicdefg

3 

4app = FastAPI(strict_content_type=False) 1abhicdefg

5 

6 

7class Item(BaseModel): 1abhicdefg

8 name: str 1abcdefg

9 price: float 1abcdefg

10 

11 

12@app.post("/items/") 1abhicdefg

13async def create_item(item: Item): 1abhicdefg

14 return item 1jklmnopq