Home / Function/ examples() — fastapi Function Reference

examples() — fastapi Function Reference

Architecture documentation for the examples() function in test_openapi_examples.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  150df3b3_63ce_55d9_c7a3_7ca25b975d7a["examples()"]
  8ac1d492_09f7_2975_cc25_f70aecbbb54b["test_openapi_examples.py"]
  150df3b3_63ce_55d9_c7a3_7ca25b975d7a -->|defined in| 8ac1d492_09f7_2975_cc25_f70aecbbb54b
  style 150df3b3_63ce_55d9_c7a3_7ca25b975d7a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_openapi_examples.py lines 16–33

def examples(
    item: Item = Body(
        examples=[
            {"data": "Data in Body examples, example1"},
        ],
        openapi_examples={
            "Example One": {
                "summary": "Example One Summary",
                "description": "Example One Description",
                "value": {"data": "Data in Body examples, example1"},
            },
            "Example Two": {
                "value": {"data": "Data in Body examples, example2"},
            },
        },
    ),
):
    return item

Domain

Subdomains

Frequently Asked Questions

What does examples() do?
examples() is a function in the fastapi codebase, defined in tests/test_openapi_examples.py.
Where is examples() defined?
examples() is defined in tests/test_openapi_examples.py at line 16.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free