Home / Function/ test_required_str_schema() — fastapi Function Reference

test_required_str_schema() — fastapi Function Reference

Architecture documentation for the test_required_str_schema() function in test_required_str.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  59ab59a4_fb81_8f94_3000_85d7214f2ce1["test_required_str_schema()"]
  2c757026_ce58_cb5f_e4a3_710daa866978["test_required_str.py"]
  59ab59a4_fb81_8f94_3000_85d7214f2ce1 -->|defined in| 2c757026_ce58_cb5f_e4a3_710daa866978
  28b7c1b7_b1b8_c344_dea4_80c78da77e28["get_body_model_name()"]
  59ab59a4_fb81_8f94_3000_85d7214f2ce1 -->|calls| 28b7c1b7_b1b8_c344_dea4_80c78da77e28
  style 59ab59a4_fb81_8f94_3000_85d7214f2ce1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_request_params/test_body/test_required_str.py lines 35–46

def test_required_str_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": {"title": "P", "type": "string"},
        },
        "required": ["p"],
        "title": body_model_name,
        "type": "object",
    }

Domain

Subdomains

Frequently Asked Questions

What does test_required_str_schema() do?
test_required_str_schema() is a function in the fastapi codebase, defined in tests/test_request_params/test_body/test_required_str.py.
Where is test_required_str_schema() defined?
test_required_str_schema() is defined in tests/test_request_params/test_body/test_required_str.py at line 35.
What does test_required_str_schema() call?
test_required_str_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