test_optional_str_schema() — fastapi Function Reference
Architecture documentation for the test_optional_str_schema() function in test_optional_str.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 2f65f32b_f24c_bdad_84ea_df698b5f25a0["test_optional_str_schema()"] 3f7d416c_ad03_437e_1805_be947abbd565["test_optional_str.py"] 2f65f32b_f24c_bdad_84ea_df698b5f25a0 -->|defined in| 3f7d416c_ad03_437e_1805_be947abbd565 28b7c1b7_b1b8_c344_dea4_80c78da77e28["get_body_model_name()"] 2f65f32b_f24c_bdad_84ea_df698b5f25a0 -->|calls| 28b7c1b7_b1b8_c344_dea4_80c78da77e28 style 2f65f32b_f24c_bdad_84ea_df698b5f25a0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_request_params/test_body/test_optional_str.py lines 34–47
def test_optional_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": {
"anyOf": [{"type": "string"}, {"type": "null"}],
"title": "P",
},
},
"title": body_model_name,
"type": "object",
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does test_optional_str_schema() do?
test_optional_str_schema() is a function in the fastapi codebase, defined in tests/test_request_params/test_body/test_optional_str.py.
Where is test_optional_str_schema() defined?
test_optional_str_schema() is defined in tests/test_request_params/test_body/test_optional_str.py at line 34.
What does test_optional_str_schema() call?
test_optional_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