Exclude providers API from swagger since we don't own the API
This commit is contained in:
parent
b5b98a2907
commit
859e2f044f
|
@ -45,6 +45,8 @@ def custom_preprocessing_hook(endpoints):
|
||||||
# your modifications to the list of operations that are exposed in the schema
|
# your modifications to the list of operations that are exposed in the schema
|
||||||
api_type = os.environ["API_TYPE"]
|
api_type = os.environ["API_TYPE"]
|
||||||
for (path, path_regex, method, callback) in endpoints:
|
for (path, path_regex, method, callback) in endpoints:
|
||||||
|
if path.startswith("/api/v1/providers"):
|
||||||
|
continue
|
||||||
if path.startswith(f"/api/{api_type}"):
|
if path.startswith(f"/api/{api_type}"):
|
||||||
filtered.append((path, path_regex, method, callback))
|
filtered.append((path, path_regex, method, callback))
|
||||||
return filtered
|
return filtered
|
||||||
|
|
Loading…
Reference in New Issue