Home / Function/ test_openapi_schema() — fastapi Function Reference

test_openapi_schema() — fastapi Function Reference

Architecture documentation for the test_openapi_schema() function in test_custom_route_class.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  ab4b18c4_8861_3800_8b44_9a88963732a7["test_openapi_schema()"]
  03b8225c_2e46_e60d_3266_63591da5f758["test_custom_route_class.py"]
  ab4b18c4_8861_3800_8b44_9a88963732a7 -->|defined in| 03b8225c_2e46_e60d_3266_63591da5f758
  1b892f95_174f_a6fa_5ff9_9cd8b88e8ee0["get()"]
  ab4b18c4_8861_3800_8b44_9a88963732a7 -->|calls| 1b892f95_174f_a6fa_5ff9_9cd8b88e8ee0
  style ab4b18c4_8861_3800_8b44_9a88963732a7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_custom_route_class.py lines 75–121

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": {
                "/a/": {
                    "get": {
                        "responses": {
                            "200": {
                                "description": "Successful Response",
                                "content": {"application/json": {"schema": {}}},
                            }
                        },
                        "summary": "Get A",
                        "operationId": "get_a_a__get",
                    }
                },
                "/a/b/": {
                    "get": {
                        "responses": {
                            "200": {
                                "description": "Successful Response",
                                "content": {"application/json": {"schema": {}}},
                            }
                        },
                        "summary": "Get B",
                        "operationId": "get_b_a_b__get",
                    }
                },
                "/a/b/c/": {
                    "get": {
                        "responses": {
                            "200": {
                                "description": "Successful Response",
                                "content": {"application/json": {"schema": {}}},
                            }
                        },
                        "summary": "Get C",
                        "operationId": "get_c_a_b_c__get",
                    }
                },
            },
        }
    )

Domain

Subdomains

Calls

Frequently Asked Questions

What does test_openapi_schema() do?
test_openapi_schema() is a function in the fastapi codebase, defined in tests/test_custom_route_class.py.
Where is test_openapi_schema() defined?
test_openapi_schema() is defined in tests/test_custom_route_class.py at line 75.
What does test_openapi_schema() call?
test_openapi_schema() calls 1 function(s): get.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free