Browse Source
Use a set instead of a list for scope deduplication in get_openapi_security_definitions, converting O(S²) membership checks to O(S). Output is sorted for deterministic schema generation. Guard jsonable_encoder with a dict membership check to skip redundant serialization when the same security scheme appears in multiple dependencies. Benchmark (50 scopes, 1-20 deps): Speed: 42.7 µs → 39.5 µs (−7%) RAM: 9.7 KB → 9.7 KB (0%)pull/15621/head
1 changed files with 12 additions and 13 deletions
Loading…
Reference in new issue