Skip to content

Commit

Permalink
Fix openapi security type for apis (#19)
Browse files Browse the repository at this point in the history
Co-authored-by: Yifan Zhang <[email protected]>
  • Loading branch information
yifan and Yifan Zhang authored Jan 9, 2023
1 parent 7d2d2e5 commit 5ba46ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apihub/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,9 @@ def get_paths(redis=get_redis()):
paths = {}
components_schemas = {}
security_schemes = {
"BasicAuth": {
"bearerAuth": {
"type": "http",
"scheme": "basic",
"scheme": "bearer",
}
}
definitions = DefinitionManager(redis=redis)
Expand Down Expand Up @@ -393,7 +393,7 @@ def custom_openapi(app=api):
for path in openapi_schema["paths"].values():
for operation in path.values():
if "security" not in operation:
operation["security"] = [{"BasicAuth": []}]
operation["security"] = [{"bearerAuth": []}]

paths, components_schemas, security_schemes = get_paths()
openapi_schema["paths"].update(paths)
Expand Down

0 comments on commit 5ba46ee

Please sign in to comment.