Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add hook to exclude startswith paths #1330

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ebottos94
Copy link

Hi, first of all: this project is amazing!

I started to use this project for the first time in these days, i'm integrating it in a Django project where i manage admin panel by Wagtail. Wagtail admin urls integrate by default some endpoints, that i didn't want, so i wrote an hook to exclude paths starting with the same prefix.

I thought that this hook cloud be useful to be provided by default in drf-spectacular so I created this pull request :)

I created the hook to exclude enpoints starting with some values : preprocess_exclude_paths_startswith, and added an attrubuite in spectacular_settings to set these values : PATHS_STARTSWITH_TO_EXCLUDE.

I hope this can be useful :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant