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

Range filters not deffined properly in swagger #1534

Closed
eloi-martinez-qida opened this issue Sep 13, 2022 · 2 comments
Closed

Range filters not deffined properly in swagger #1534

eloi-martinez-qida opened this issue Sep 13, 2022 · 2 comments

Comments

@eloi-martinez-qida
Copy link

Range filters only show the base filter, not the _min _max or _before _affter suffixes

I assume it's because the filter.base_filters only returns the base filter not the ones in the suffix.

I also assume this is the same cause as the cause the issue with django json:api (django-json-api/django-rest-framework-json-api#938)

@carltongibson
Copy link
Owner

Hi @eloi-martinez-qida — I recommend checking out drf-spectacular if you're working with schemas.

https://drf-spectacular.readthedocs.io/en/latest/readme.html

It's a lot better developed than other options, including the basic in-core support.

I'm likely to deprecate the built-in support in favour of this in the 23.x series.

@carltongibson
Copy link
Owner

As per #1432 the in-built schema support is going to be deprecated in the next version.

Rather, I recommend you migrate to use drf-spectacular, which is much more fully featured, and under active development.

https://drf-spectacular.readthedocs.io/en/latest/readme.html

If for some reason you're not able to use drf-spectacular you can copy the django_filters.rest_framework.backends.DjangoFilterBackend into your own project to customise as needed. (But use drf-spectacular.)

Thanks.

@carltongibson carltongibson closed this as not planned Won't fix, can't repro, duplicate, stale Nov 18, 2022
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

No branches or pull requests

2 participants