refactor: openApi made lazy. This is a staging post so there are extra tests (in all the decorators). Fixes a potential issue in __init__ where the default argument creates a shared object at parse time rather than a separate one for each instance. As only one instance, not normally an issue but not good practice.
One FIXME is an edge case in init_openapi where neither if clause evaluates to True for openapi_file_path (should we log an error or what?)
0dccef3
25 days ago
by dave42w
0%
refactor: openApi made lazy.
All add_route methods have auth_required, openapi_name and openapi_tags which get stored in the route.
Instead of incrementally adding them to openapi routes they are added all at once in app.start
include_routes now additionally tracks the list of routers whose routes have been added to the main app. This will be used more later to avoid merging routes until app.start for more flexibility
642eac9
25 days ago
by dave42w
0%
refactor: try to solve the speed issue by improving handling moving from allowing None for openApi_tags to not
2ae5e7f
25 days ago
by dave42w
0%
refactor: slightly optimised lower_http_method I've tested with 100,000 loops. This is marginally faster.
This PR lowers slows full test suite by 0.004s on my system. However, those benchmarks are mostly setup. Once we are making calls to a running server none of this code is being executed.
f9ebbee
24 days ago
by dave42w
0%
refactor: remove extra Robyn instance variable to avoid extra side effects in the future. No consistent peformance impact on 100,000 Robyn(__file__) calls