@@ -0,0 +1,413 @@
+from fastapi import FastAPI%0Afrom pydantic import BaseModel%0A%0A%0Adef test_get_openapi():%0A    app = FastAPI()%0A%0A    class Model(BaseModel):%0A        pass%0A%0A    class Model2(BaseModel):%0A        a: Model%0A%0A    class Model3(BaseModel):%0A        c: Model%0A        d: Model2%0A%0A    @app.get(%22/%22, response_model=Model3)%0A    def f():%0A        pass  # pragma: no cover%0A%0A    openapi = app.openapi()%0A    assert isinstance(openapi, dict)%0A

Add test from @dmontagu in #333 for duplicate models (#385)