test_openapi() — fastapi Function Reference
Architecture documentation for the test_openapi() function in test_deprecated_openapi_prefix.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 50e829c4_b52d_6c38_9df4_9db1b6fe95ec["test_openapi()"] b5011027_e220_0cad_0f05_94f866e99ab5["test_deprecated_openapi_prefix.py"] 50e829c4_b52d_6c38_9df4_9db1b6fe95ec -->|defined in| b5011027_e220_0cad_0f05_94f866e99ab5 style 50e829c4_b52d_6c38_9df4_9db1b6fe95ec fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_deprecated_openapi_prefix.py lines 22–45
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
Defined In
Source
Frequently Asked Questions
What does test_openapi() do?
test_openapi() is a function in the fastapi codebase, defined in tests/test_deprecated_openapi_prefix.py.
Where is test_openapi() defined?
test_openapi() is defined in tests/test_deprecated_openapi_prefix.py at line 22.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free