test_openapi_schema() — fastapi Function Reference
Architecture documentation for the test_openapi_schema() function in test_tutorial004.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 5915e3f9_1a0f_054c_68a6_75c32507d4b6["test_openapi_schema()"] 33415128_98b9_ab55_a56b_29f5aa5fea7a["test_tutorial004.py"] 5915e3f9_1a0f_054c_68a6_75c32507d4b6 -->|defined in| 33415128_98b9_ab55_a56b_29f5aa5fea7a style 5915e3f9_1a0f_054c_68a6_75c32507d4b6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_tutorial/test_metadata/test_tutorial004.py lines 16–66
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": {
"/users/": {
"get": {
"tags": ["users"],
"summary": "Get Users",
"operationId": "get_users_users__get",
"responses": {
"200": {
"description": "Successful Response",
"content": {"application/json": {"schema": {}}},
}
},
}
},
"/items/": {
"get": {
"tags": ["items"],
"summary": "Get Items",
"operationId": "get_items_items__get",
"responses": {
"200": {
"description": "Successful Response",
"content": {"application/json": {"schema": {}}},
}
},
}
},
},
"tags": [
{
"name": "users",
"description": "Operations with users. The **login** logic is also here.",
},
{
"name": "items",
"description": "Manage items. So _fancy_ they have their own docs.",
"externalDocs": {
"description": "Items external docs",
"url": "https://fastapi.tiangolo.com/",
},
},
],
}
)
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_metadata/test_tutorial004.py.
Where is test_openapi_schema() defined?
test_openapi_schema() is defined in tests/test_tutorial/test_metadata/test_tutorial004.py at line 16.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free