test_openapi() — fastapi Function Reference
Architecture documentation for the test_openapi() function in test_tutorial002.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD daf25bdb_75ca_e887_f9e8_4ae603b84067["test_openapi()"] ff475a05_9603_9eed_5cef_147d501e641f["test_tutorial002.py"] daf25bdb_75ca_e887_f9e8_4ae603b84067 -->|defined in| ff475a05_9603_9eed_5cef_147d501e641f style daf25bdb_75ca_e887_f9e8_4ae603b84067 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_tutorial/test_behind_a_proxy/test_tutorial002.py lines 15–38
def test_openapi():
response = client.get("/openapi.json")
assert response.status_code == 200
assert response.json() == snapshot(
{
"openapi": "3.1.0",
"info": {"title": "FastAPI", "version": "0.1.0"},
"paths": {
"/app": {
"get": {
"summary": "Read Main",
"operationId": "read_main_app_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {"application/json": {"schema": {}}},
}
},
}
}
},
"servers": [{"url": "/api/v1"}],
}
)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_openapi() do?
test_openapi() is a function in the fastapi codebase, defined in tests/test_tutorial/test_behind_a_proxy/test_tutorial002.py.
Where is test_openapi() defined?
test_openapi() is defined in tests/test_tutorial/test_behind_a_proxy/test_tutorial002.py at line 15.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free