Skip to content

Commit

Permalink
remove openapi schema from oss
Browse files Browse the repository at this point in the history
  • Loading branch information
devgenix committed Dec 22, 2023
1 parent 8c7ffd5 commit b070578
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions agenta-backend/agenta_backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ async def lifespan(application: FastAPI, cache=True):
yield


app = FastAPI(lifespan=lifespan)
# app = FastAPI(lifespan=lifespan)
app = FastAPI()

allow_headers = ["Content-Type"]

Expand Down Expand Up @@ -78,18 +79,4 @@ async def lifespan(application: FastAPI, cache=True):
app.include_router(observability_router.router, prefix="/observability")
app.include_router(organization_router.router, prefix="/organizations")
app.include_router(bases_router.router, prefix="/bases")
app.include_router(configs_router.router, prefix="/configs")

APIKeyHeader = {
"APIKeyHeader": []
}

app.openapi()["components"]["securitySchemes"] = {
"APIKeyHeader": {
"type": "apiKey",
"name": "Authorization",
"in": "header",
}
}

app.openapi()["security"] = [APIKeyHeader]
app.include_router(configs_router.router, prefix="/configs")

0 comments on commit b070578

Please sign in to comment.