Home / Function/ header_examples() — fastapi Function Reference

header_examples() — fastapi Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

tests/test_openapi_examples.py lines 82–101

def header_examples(
    data: Union[str, None] = Header(
        default=None,
        examples=[
            "json_schema_header1",
            "json_schema_header2",
        ],
        openapi_examples={
            "Header One": {
                "summary": "Header One Summary",
                "description": "Header One Description",
                "value": "header1",
            },
            "Header Two": {
                "value": "header2",
            },
        },
    ),
):
    return data

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free