oncall-engine/engine/engine/included_path.py
Ildar Iskhakov ff2db43c49
Add openapi schema generation for internal api (#2771)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-08-16 06:13:56 +00:00

9 lines
330 B
Python

from django.conf import settings
def custom_preprocessing_hook(endpoints):
filtered = []
for path, path_regex, method, callback in endpoints:
if any(path_prefix in path for path_prefix in settings.SPECTACULAR_INCLUDED_PATHS):
filtered.append((path, path_regex, method, callback))
return filtered