Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/fastapi/fastapi
/ create_pet_annotated
Function
create_pet_annotated
tests/test_union_body_discriminator_annotated.py:41–42 ·
view source on GitHub ↗
(pet: Annotated[Pet, Body()])
Source
from the content-addressed store, hash-verified
39
40
@app.post(
"/pet/annotated"
)
41
async
def
create_pet_annotated(pet: Annotated[Pet, Body()]):
42
return
pet
43
44
client = TestClient(app)
45
return
client
Callers
nothing calls this directly
Calls
1
Body
Class · 0.90
Tested by
no test coverage detected