Home / Function/ test_optional_validation_alias_schema() — fastapi Function Reference

test_optional_validation_alias_schema() — fastapi Function Reference

Architecture documentation for the test_optional_validation_alias_schema() function in test_optional_str.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  e9e0faaf_d506_8a13_3395_57c74bd18692["test_optional_validation_alias_schema()"]
  dfeed45d_bdd4_d7f2_b74f_c67acc7b9d16["test_optional_str.py"]
  e9e0faaf_d506_8a13_3395_57c74bd18692 -->|defined in| dfeed45d_bdd4_d7f2_b74f_c67acc7b9d16
  5fadf4ad_2b8a_4b4f_fde9_555fff6ad722["get_body_model_name()"]
  e9e0faaf_d506_8a13_3395_57c74bd18692 -->|calls| 5fadf4ad_2b8a_4b4f_fde9_555fff6ad722
  style e9e0faaf_d506_8a13_3395_57c74bd18692 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_request_params/test_form/test_optional_str.py lines 176–189

def test_optional_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": [{"type": "string"}, {"type": "null"}],
                "title": "P Val Alias",
            },
        },
        "title": body_model_name,
        "type": "object",
    }

Domain

Subdomains

Frequently Asked Questions

What does test_optional_validation_alias_schema() do?
test_optional_validation_alias_schema() is a function in the fastapi codebase, defined in tests/test_request_params/test_form/test_optional_str.py.
Where is test_optional_validation_alias_schema() defined?
test_optional_validation_alias_schema() is defined in tests/test_request_params/test_form/test_optional_str.py at line 176.
What does test_optional_validation_alias_schema() call?
test_optional_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