code: def test_openapi_schema():
      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": {
              "/": {
                  "get": {
                      "summary": "F",
                      "operationId": "f__get",
                      "responses": {
                          "200": {
                              "description": "Successful Response",
                              "content": {
                                  "application/json": {
                                      "schema": {
                                          "$ref": "#/components/schemas/Model3"
                                      }
                                  }
                              },
                          }
                      },
                  }
              }
          },
          "components": {
              "schemas": {
                  "Model": {
                      "title": "Model",
                      "type": "object",
                      "properties": {},
                  },
                  "Model2": {
                      "title": "Model2",
                      "required": ["a"],
                      "type": "object",
                      "properties": {
                          "a": {"$ref": "#/components/schemas/Model"}
                      },
                  },
                  "Model3": {
                      "title": "Model3",
                      "required": ["c", "d"],
                      "type": "object",
                      "properties": {
                          "c": {"$ref": "#/components/schemas/Model"},
                          "d": {"$ref": "#/components/schemas/Model2"},
                      },
                  },
              }
          },
      }
  
file_path: fastapi/tests/test_duplicate_models_openapi.py
imports: from fastapi import FastAPI
  from fastapi.testclient import TestClient
  from pydantic import BaseModel
label_desc: Use image node_id 3 for calling a global function with example usage: test_openapi_schema() without return types