test_openapi_schema() — fastapi Function Reference
Architecture documentation for the test_openapi_schema() function in test_openapi_route_extensions.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 86c713bf_7582_967b_d905_951a1205806c["test_openapi_schema()"] d9455736_b621_72a3_def9_87e6695b3e3b["test_openapi_route_extensions.py"] 86c713bf_7582_967b_d905_951a1205806c -->|defined in| d9455736_b621_72a3_def9_87e6695b3e3b style 86c713bf_7582_967b_d905_951a1205806c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_openapi_route_extensions.py lines 22–45
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": {
"/": {
"get": {
"responses": {
"200": {
"description": "Successful Response",
"content": {"application/json": {"schema": {}}},
},
},
"summary": "Route With Extras",
"operationId": "route_with_extras__get",
"x-custom-extension": "value",
}
},
},
}
)
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_openapi_schema() do?
test_openapi_schema() is a function in the fastapi codebase, defined in tests/test_openapi_route_extensions.py.
Where is test_openapi_schema() defined?
test_openapi_schema() is defined in tests/test_openapi_route_extensions.py at line 22.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free