diff --git a/docs_src/extending_openapi/tutorial002.py b/docs_src/extending_openapi/tutorial002.py index f7e132636..cb0fa27f5 100644 --- a/docs_src/extending_openapi/tutorial002.py +++ b/docs_src/extending_openapi/tutorial002.py @@ -1,8 +1,8 @@ from fastapi import FastAPI from fastapi.openapi.docs import ( get_redoc_html, - get_swagger_ui_html, get_stoplight_elements_html, + get_swagger_ui_html, get_swagger_ui_oauth2_redirect_html, ) from fastapi.staticfiles import StaticFiles @@ -36,6 +36,7 @@ async def redoc_html(): redoc_js_url="/static/redoc.standalone.js", ) + @app.get("/elements", include_in_schema=False) async def elements_html(): return get_stoplight_elements_html( @@ -48,4 +49,4 @@ async def elements_html(): @app.get("/users/{username}") async def read_user(username: str): - return {"message": f"Hello {username}"} \ No newline at end of file + return {"message": f"Hello {username}"}