We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dce8ad4 commit 7d2d2e5Copy full SHA for 7d2d2e5
apihub/server.py
@@ -388,6 +388,13 @@ def custom_openapi(app=api):
388
openapi_schema["info"]["x-logo"] = {
389
"url": "https://raw.githubusercontent.com/yifan/apihub/master/images/APIHub-logo.png"
390
}
391
+
392
+ # patch security not defined in path
393
+ for path in openapi_schema["paths"].values():
394
+ for operation in path.values():
395
+ if "security" not in operation:
396
+ operation["security"] = [{"BasicAuth": []}]
397
398
paths, components_schemas, security_schemes = get_paths()
399
openapi_schema["paths"].update(paths)
400
openapi_schema["components"]["schemas"].update(components_schemas)
0 commit comments