INNER CODE UNIT · Python

get_open_api_endpoint

JiayuXu0/FastAPI-Template · src/__init__.py:103

    async def get_open_api_endpoint(
        username: str = Depends(get_current_username),
    ):
        openapi_schema = get_openapi(
            title=app.title,
            version=app.version,
            description=app.description,
            routes=app.routes,
        )

        return openapi_schema

    register_exceptions(app)
    register_routers(app, prefix="/api")
    return app


app = create_app()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…