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

Fix model field defined filter labels fetching for schema #1390

Closed

Conversation

meteozond
Copy link

To fix RestFrameworkFilterBackend.get_schema_operation_parameters we need FilterSet instance inspection instead of class.

Copy link
Owner

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test case for this? Thanks.

@meteozond
Copy link
Author

meteozond commented Jun 25, 2021

I'm not sure that it deserves separate test. Is modified existing GetSchemaOperationParametersTests test enough?

@carltongibson carltongibson added this to the 21.1 milestone Jul 12, 2021
@carltongibson carltongibson removed this from the 21.1 milestone Aug 29, 2021
@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.

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.

2 participants