Home / Function/ test_optional_list_validation_alias_schema() — fastapi Function Reference

test_optional_list_validation_alias_schema() — fastapi Function Reference

Architecture documentation for the test_optional_list_validation_alias_schema() function in test_optional_list.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  abeb5d54_d7b5_7724_ee1d_a0fa092bcc5b["test_optional_list_validation_alias_schema()"]
  e5136429_9a94_4b13_0278_d22fff767687["test_optional_list.py"]
  abeb5d54_d7b5_7724_ee1d_a0fa092bcc5b -->|defined in| e5136429_9a94_4b13_0278_d22fff767687
  28b7c1b7_b1b8_c344_dea4_80c78da77e28["get_body_model_name()"]
  abeb5d54_d7b5_7724_ee1d_a0fa092bcc5b -->|calls| 28b7c1b7_b1b8_c344_dea4_80c78da77e28
  style abeb5d54_d7b5_7724_ee1d_a0fa092bcc5b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_request_params/test_body/test_optional_list.py lines 235–251

def test_optional_list_validation_alias_schema(path: str):
    openapi = app.openapi()
    body_model_name = get_body_model_name(openapi, path)

    assert app.openapi()["components"]["schemas"][body_model_name] == {
        "properties": {
            "p_val_alias": {
                "anyOf": [
                    {"items": {"type": "string"}, "type": "array"},
                    {"type": "null"},
                ],
                "title": "P Val Alias",
            },
        },
        "title": body_model_name,
        "type": "object",
    }

Domain

Subdomains

Frequently Asked Questions

What does test_optional_list_validation_alias_schema() do?
test_optional_list_validation_alias_schema() is a function in the fastapi codebase, defined in tests/test_request_params/test_body/test_optional_list.py.
Where is test_optional_list_validation_alias_schema() defined?
test_optional_list_validation_alias_schema() is defined in tests/test_request_params/test_body/test_optional_list.py at line 235.
What does test_optional_list_validation_alias_schema() call?
test_optional_list_validation_alias_schema() calls 1 function(s): get_body_model_name.

Analyze Your Own Codebase

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

Try Supermodel Free