test_openapi_schema() — fastapi Function Reference
Architecture documentation for the test_openapi_schema() function in test_additional_response_extra.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD b245b7dd_00db_ef42_6ca1_576f09f9e1c5["test_openapi_schema()"] bd4d3106_c5f1_7cf3_dbd7_34264f9183d9["test_additional_response_extra.py"] b245b7dd_00db_ef42_6ca1_576f09f9e1c5 -->|defined in| bd4d3106_c5f1_7cf3_dbd7_34264f9183d9 style b245b7dd_00db_ef42_6ca1_576f09f9e1c5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_additional_response_extra.py lines 30–52
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": {
"responses": {
"200": {
"description": "Successful Response",
"content": {"application/json": {"schema": {}}},
}
},
"summary": "Read Item",
"operationId": "read_item_items__get",
}
}
},
}
)
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_additional_response_extra.py.
Where is test_openapi_schema() defined?
test_openapi_schema() is defined in tests/test_additional_response_extra.py at line 30.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free