- Sort Score
- Num 10 results
- Language All
Results 1 - 1 of 1 for create_pet_assignment (0.08 seconds)
-
tests/test_union_body_discriminator_annotated.py
Pet = Annotated[ Union[Annotated[Cat, Tag("cat")], Annotated[Dog, Tag("dog")]], Discriminator(get_pet_type), ] app = FastAPI() @app.post("/pet/assignment") async def create_pet_assignment(pet: Pet = Body()): return pet @app.post("/pet/annotated") async def create_pet_annotated(pet: Annotated[Pet, Body()]): return pet client = TestClient(app) return client
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 7.7K bytes - Click Count (0)