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

implement DjangoFilterBackend.get_schema_operation_parameters #646

Conversation

n2ygk
Copy link
Contributor

@n2ygk n2ygk commented May 31, 2019

Fixes #644

Description of the Change

Implements filter backend functionality required by DRF 3.9+ generateschema management command. Eventually this can extend django-filter's implementation, if and when carltongibson/django-filter#1086 is merged, but it's small enough to stand on its own.

See #604 for more stuff still needed but it shouldn't hurt to merge this now. It will at least prevent an exception from being raised if someone tries to generateschema although the output will not be correct until the rest of #604 is done.

Checklist

  • PR only contains one change (considered splitting up PR)
  • unit-test added
  • documentation updated
  • CHANGELOG.md updated (only for user relevant changes)
  • author name in AUTHORS

@n2ygk n2ygk requested a review from sliverc May 31, 2019 20:49
@n2ygk n2ygk force-pushed the issue-644/get_schema_operation_parameters branch from a148ef4 to 828e59c Compare June 9, 2019 20:35
@codecov
Copy link

codecov bot commented Jun 9, 2019

Codecov Report

Merging #646 into master will decrease coverage by 0.34%.
The diff coverage is 87.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #646      +/-   ##
==========================================
- Coverage   96.15%   95.81%   -0.35%     
==========================================
  Files          57       58       +1     
  Lines        2889     2913      +24     
==========================================
+ Hits         2778     2791      +13     
- Misses        111      122      +11
Impacted Files Coverage Δ
example/tests/unit/test_openapi.py 100% <100%> (ø)
rest_framework_json_api/django_filters/backends.py 83.33% <66.66%> (-16.67%) ⬇️
rest_framework_json_api/compat.py 50% <0%> (-50%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7abd764...c7afeb7. Read the comment docs.

@codecov
Copy link

codecov bot commented Jun 9, 2019

Codecov Report

Merging #646 into master will decrease coverage by 0.22%.
The diff coverage is 22.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #646      +/-   ##
==========================================
- Coverage   96.15%   95.93%   -0.23%     
==========================================
  Files          57       56       -1     
  Lines        2889     2879      -10     
==========================================
- Hits         2778     2762      -16     
- Misses        111      117       +6
Impacted Files Coverage Δ
rest_framework_json_api/django_filters/backends.py 87.03% <22.22%> (-12.97%) ⬇️
example/tests/integration/test_polymorphism.py 100% <0%> (ø) ⬆️
example/models.py 100% <0%> (ø) ⬆️
example/tests/unit/test_renderers.py 100% <0%> (ø) ⬆️
example/migrations/0007_artproject_description.py
rest_framework_json_api/renderers.py 87.37% <0%> (+0.57%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7abd764...828e59c. Read the comment docs.

@n2ygk
Copy link
Contributor Author

n2ygk commented Jun 10, 2019

I'm going to cancel this PR as I'm close to submitting a more complete openapi generateschema PR and will incorporate this related code there.

@n2ygk n2ygk closed this Jun 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

missing DjangoFilterBackend.get_schema_operation_parameters()
1 participant