standardize packaging, tooling, docs, CI, and licensing
This commit is contained in:
@@ -85,8 +85,14 @@ def bind_routes(
|
||||
paths = spec.get("paths", {})
|
||||
security_deps = security_deps or {}
|
||||
|
||||
http_methods = {"get", "put", "post", "delete", "options", "head", "patch", "trace"}
|
||||
|
||||
for path, methods in paths.items():
|
||||
for http_method, operation in methods.items():
|
||||
if http_method.lower() not in http_methods or not isinstance(
|
||||
operation, dict
|
||||
):
|
||||
continue
|
||||
|
||||
operation_id = operation.get("operationId")
|
||||
if not operation_id:
|
||||
@@ -102,7 +108,7 @@ def bind_routes(
|
||||
path=path,
|
||||
method=http_method,
|
||||
operation_id=operation_id,
|
||||
)
|
||||
) from None
|
||||
|
||||
key = f"{http_method.upper()}:{path}"
|
||||
deps = security_deps.get(key, [])
|
||||
|
||||
Reference in New Issue
Block a user