code: def test_openapi_schema(client: TestClient):
      response = client.get("/openapi.json")
      assert response.status_code == 200, response.text
      assert response.json() == {
          "openapi": "3.1.0",
          "info": {"title": "FastAPI", "version": "0.1.0"},
          "paths": {
              "/users/": {
                  "get": {
                      "tags": ["users"],
                      "summary": "Read Users",
                      "operationId": "read_users_users__get",
                      "parameters": [
                          {
                              "required": True,
                              "schema": {
                                  "title": "Token",
                                  "type": "string",
                              },
                              "name": "token",
                              "in": "query",
                          }
                      ],
                      "responses": {
                          "200": {
                              "description": "Successful Response",
                              "content": {
                                  "application/json": {"schema": {}}
                              },
                          },
                          "422": {
                              "description": "Validation Error",
                              "content": {
                                  "application/json": {
                                      "schema": {
                                          "$ref": "#/components/schemas/HTTPValidationError"
                                      }
                                  }
                              },
                          },
                      },
                  }
              },
              "/users/me": {
                  "get": {
                      "tags": ["users"],
                      "summary": "Read User Me",
                      "operationId": "read_user_me_users_me_get",
                      "parameters": [
                          {
                              "required": True,
                              "schema": {
                                  "title": "Token",
                                  "type": "string",
                              },
                              "name": "token",
                              "in": "query",
                          }
                      ],
                      "responses": {
                          "200": {
                              "description": "Successful Response",
                              "content": {
                                  "application/json": {"schema": {}}
                              },
                          },
                          "422": {
                              "description": "Validation Error",
                              "content": {
                                  "application/json": {
                                      "schema": {
                                          "$ref": "#/components/schemas/HTTPValidationError"
                                      }
                                  }
                              },
                          },
                      },
                  }
              },
              "/users/{username}": {
                  "get": {
                      "tags": ["users"],
                      "summary": "Read User",
                      "operationId": "read_user_users__username__get",
                      "parameters": [
                          {
                              "required": True,
                              "schema": {
                                  "title": "Username",
                                  "type": "string",
                              },
                              "name": "username",
                              "in": "path",
                          },
                          {
                              "required": True,
                              "schema": {
                                  "title": "Token",
                                  "type": "string",
                              },
                              "name": "token",
                              "in": "query",
                          },
                      ],
                      "responses": {
                          "200": {
                              "description": "Successful Response",
                              "content": {
                                  "application/json": {"schema": {}}
                              },
                          },
                          "422": {
                              "description": "Validation Error",
                              "content": {
                                  "application/json": {
                                      "schema": {
                                          "$ref": "#/components/schemas/HTTPValidationError"
                                      }
                                  }
                              },
                          },
                      },
                  }
              },
              "/items/": {
                  "get": {
                      "tags": ["items"],
                      "summary": "Read Items",
                      "operationId": "read_items_items__get",
                      "parameters": [
                          {
                              "required": True,
                              "schema": {
                                  "title": "Token",
                                  "type": "string",
                              },
                              "name": "token",
                              "in": "query",
                          },
                          {
                              "required": True,
                              "schema": {
                                  "title": "X-Token",
                                  "type": "string",
                              },
                              "name": "x-token",
                              "in": "header",
                          },
                      ],
                      "responses": {
                          "200": {
                              "description": "Successful Response",
                              "content": {
                                  "application/json": {"schema": {}}
                              },
                          },
                          "404": {"description": "Not found"},
                          "422": {
                              "description": "Validation Error",
                              "content": {
                                  "application/json": {
                                      "schema": {
                                          "$ref": "#/components/schemas/HTTPValidationError"
                                      }
                                  }
                              },
                          },
                      },
                  }
              },
              "/items/{item_id}": {
                  "get": {
                      "tags": ["items"],
                      "summary": "Read Item",
                      "operationId": "read_item_items__item_id__get",
                      "parameters": [
                          {
                              "required": True,
                              "schema": {
                                  "title": "Item Id",
                                  "type": "string",
                              },
                              "name": "item_id",
                              "in": "path",
                          },
                          {
                              "required": True,
                              "schema": {
                                  "title": "Token",
                                  "type": "string",
                              },
                              "name": "token",
                              "in": "query",
                          },
                          {
                              "required": True,
                              "schema": {
                                  "title": "X-Token",
                                  "type": "string",
                              },
                              "name": "x-token",
                              "in": "header",
                          },
                      ],
                      "responses": {
                          "200": {
                              "description": "Successful Response",
                              "content": {
                                  "application/json": {"schema": {}}
                              },
                          },
                          "404": {"description": "Not found"},
                          "422": {
                              "description": "Validation Error",
                              "content": {
                                  "application/json": {
                                      "schema": {
                                          "$ref": "#/components/schemas/HTTPValidationError"
                                      }
                                  }
                              },
                          },
                      },
                  },
                  "put": {
                      "tags": ["items", "custom"],
                      "summary": "Update Item",
                      "operationId": "update_item_items__item_id__put",
                      "parameters": [
                          {
                              "required": True,
                              "schema": {
                                  "title": "Item Id",
                                  "type": "string",
                              },
                              "name": "item_id",
                              "in": "path",
                          },
                          {
                              "required": True,
                              "schema": {
                                  "title": "Token",
                                  "type": "string",
                              },
                              "name": "token",
                              "in": "query",
                          },
                          {
                              "required": True,
                              "schema": {
                                  "title": "X-Token",
                                  "type": "string",
                              },
                              "name": "x-token",
                              "in": "header",
                          },
                      ],
                      "responses": {
                          "200": {
                              "description": "Successful Response",
                              "content": {
                                  "application/json": {"schema": {}}
                              },
                          },
                          "404": {"description": "Not found"},
                          "403": {"description": "Operation forbidden"},
                          "422": {
                              "description": "Validation Error",
                              "content": {
                                  "application/json": {
                                      "schema": {
                                          "$ref": "#/components/schemas/HTTPValidationError"
                                      }
                                  }
                              },
                          },
                      },
                  },
              },
              "/admin/": {
                  "post": {
                      "tags": ["admin"],
                      "summary": "Update Admin",
                      "operationId": "update_admin_admin__post",
                      "parameters": [
                          {
                              "required": True,
                              "schema": {
                                  "title": "Token",
                                  "type": "string",
                              },
                              "name": "token",
                              "in": "query",
                          },
                          {
                              "required": True,
                              "schema": {
                                  "title": "X-Token",
                                  "type": "string",
                              },
                              "name": "x-token",
                              "in": "header",
                          },
                      ],
                      "responses": {
                          "200": {
                              "description": "Successful Response",
                              "content": {
                                  "application/json": {"schema": {}}
                              },
                          },
                          "418": {"description": "I'm a teapot"},
                          "422": {
                              "description": "Validation Error",
                              "content": {
                                  "application/json": {
                                      "schema": {
                                          "$ref": "#/components/schemas/HTTPValidationError"
                                      }
                                  }
                              },
                          },
                      },
                  }
              },
              "/": {
                  "get": {
                      "summary": "Root",
                      "operationId": "root__get",
                      "parameters": [
                          {
                              "required": True,
                              "schema": {
                                  "title": "Token",
                                  "type": "string",
                              },
                              "name": "token",
                              "in": "query",
                          }
                      ],
                      "responses": {
                          "200": {
                              "description": "Successful Response",
                              "content": {
                                  "application/json": {"schema": {}}
                              },
                          },
                          "422": {
                              "description": "Validation Error",
                              "content": {
                                  "application/json": {
                                      "schema": {
                                          "$ref": "#/components/schemas/HTTPValidationError"
                                      }
                                  }
                              },
                          },
                      },
                  }
              },
          },
          "components": {
              "schemas": {
                  "HTTPValidationError": {
                      "title": "HTTPValidationError",
                      "type": "object",
                      "properties": {
                          "detail": {
                              "title": "Detail",
                              "type": "array",
                              "items": {
                                  "$ref": "#/components/schemas/ValidationError"
                              },
                          }
                      },
                  },
                  "ValidationError": {
                      "title": "ValidationError",
                      "required": ["loc", "msg", "type"],
                      "type": "object",
                      "properties": {
                          "loc": {
                              "title": "Location",
                              "type": "array",
                              "items": {
                                  "anyOf": [
                                      {"type": "string"},
                                      {"type": "integer"},
                                  ]
                              },
                          },
                          "msg": {"title": "Message", "type": "string"},
                          "type": {
                              "title": "Error Type",
                              "type": "string",
                          },
                      },
                  },
              }
          },
      }
  
imports: import pytest
  from dirty_equals import IsDict
  from fastapi.testclient import TestClient
  from fastapi.utils import match_pydantic_error_url
label_desc: Use image node_id 26 for calling a global function with example usage: test_openapi_schema(client) without return types