Rename operation ids
This commit is contained in:
parent
cbbf6c2c40
commit
68face201b
20 changed files with 14173 additions and 23 deletions
|
|
@ -42,11 +42,18 @@ class CustomApplicationTokenExt(OpenApiAuthenticationExtension):
|
|||
|
||||
def custom_preprocessing_hook(endpoints):
|
||||
filtered = []
|
||||
|
||||
# your modifications to the list of operations that are exposed in the schema
|
||||
api_type = os.environ.get("API_TYPE", "v1")
|
||||
|
||||
for (path, path_regex, method, callback) in endpoints:
|
||||
if path.startswith("/api/v1/providers"):
|
||||
continue
|
||||
|
||||
if path.startswith("/api/v1/users/users"):
|
||||
continue
|
||||
|
||||
if path.startswith(f"/api/{api_type}"):
|
||||
filtered.append((path, path_regex, method, callback))
|
||||
|
||||
return filtered
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue