Exclude providers API from swagger since we don't own the API

This commit is contained in:
Georg Krause 2022-07-17 17:43:57 +02:00
parent b5b98a2907
commit 859e2f044f
No known key found for this signature in database
GPG Key ID: 2970D504B2183D22
1 changed files with 2 additions and 0 deletions

View File

@ -45,6 +45,8 @@ def custom_preprocessing_hook(endpoints):
# your modifications to the list of operations that are exposed in the schema
api_type = os.environ["API_TYPE"]
for (path, path_regex, method, callback) in endpoints:
if path.startswith("/api/v1/providers"):
continue
if path.startswith(f"/api/{api_type}"):
filtered.append((path, path_regex, method, callback))
return filtered