Home / Function/ test_required_schema() — fastapi Function Reference

test_required_schema() — fastapi Function Reference

Architecture documentation for the test_required_schema() function in test_required.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  5f7fe5aa_f65d_93ab_44e0_b175a49ca962["test_required_schema()"]
  bfa31883_dec4_9b4d_d2de_8ac7a3915fac["test_required.py"]
  5f7fe5aa_f65d_93ab_44e0_b175a49ca962 -->|defined in| bfa31883_dec4_9b4d_d2de_8ac7a3915fac
  d1360ba2_24b5_be26_1bb8_d64ba3706aef["get_body_model_name()"]
  5f7fe5aa_f65d_93ab_44e0_b175a49ca962 -->|calls| d1360ba2_24b5_be26_1bb8_d64ba3706aef
  style 5f7fe5aa_f65d_93ab_44e0_b175a49ca962 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_request_params/test_file/test_required.py lines 32–43

def test_required_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", "format": "binary"},
        },
        "required": ["p"],
        "title": body_model_name,
        "type": "object",
    }

Domain

Subdomains

Frequently Asked Questions

What does test_required_schema() do?
test_required_schema() is a function in the fastapi codebase, defined in tests/test_request_params/test_file/test_required.py.
Where is test_required_schema() defined?
test_required_schema() is defined in tests/test_request_params/test_file/test_required.py at line 32.
What does test_required_schema() call?
test_required_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