MCPcopy Index your code
hub / github.com/fastapi/fastapi / examples

Function examples

tests/test_schema_extra_examples.py:30–38  ·  view source on GitHub ↗
(
        item: Item = Body(
            examples=[
                {"data": "Data in Body examples, example1"},
                {"data": "Data in Body examples, example2"},
            ],
        ),
    )

Source from the content-addressed store, hash-verified

28
29 @app.post("/examples/")
30 def examples(
31 item: Item = Body(
32 examples=[
33 {"data": "Data in Body examples, example1"},
34 {"data": "Data in Body examples, example2"},
35 ],
36 ),
37 ):
38 return item
39
40 with pytest.warns(FastAPIDeprecationWarning):
41

Callers

nothing calls this directly

Calls 1

BodyClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…