Rename operation ids

This commit is contained in:
wvffle 2022-09-25 13:57:22 +00:00 committed by Georg Krause
commit 68face201b
20 changed files with 14173 additions and 23 deletions

View file

@ -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