test_openapi_schema() — fastapi Function Reference
Architecture documentation for the test_openapi_schema() function in test_tutorial002b.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 68bad64c_87f8_87d6_4815_6d496a455b8c["test_openapi_schema()"] 22594e1a_a83d_1642_f03d_47f29b22a1a2["test_tutorial002b.py"] 68bad64c_87f8_87d6_4815_6d496a455b8c -->|defined in| 22594e1a_a83d_1642_f03d_47f29b22a1a2 style 68bad64c_87f8_87d6_4815_6d496a455b8c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_tutorial/test_path_operation_configurations/test_tutorial002b.py lines 21–57
def test_openapi_schema():
response = client.get("/openapi.json")
assert response.status_code == 200, response.text
assert response.json() == snapshot(
{
"openapi": "3.1.0",
"info": {"title": "FastAPI", "version": "0.1.0"},
"paths": {
"/items/": {
"get": {
"tags": ["items"],
"summary": "Get Items",
"operationId": "get_items_items__get",
"responses": {
"200": {
"description": "Successful Response",
"content": {"application/json": {"schema": {}}},
}
},
}
},
"/users/": {
"get": {
"tags": ["users"],
"summary": "Read Users",
"operationId": "read_users_users__get",
"responses": {
"200": {
"description": "Successful Response",
"content": {"application/json": {"schema": {}}},
}
},
}
},
},
}
)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_openapi_schema() do?
test_openapi_schema() is a function in the fastapi codebase, defined in tests/test_tutorial/test_path_operation_configurations/test_tutorial002b.py.
Where is test_openapi_schema() defined?
test_openapi_schema() is defined in tests/test_tutorial/test_path_operation_configurations/test_tutorial002b.py at line 21.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free