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

django-rest-framework-gis support #746

Merged
merged 2 commits into from
May 24, 2022
Merged

django-rest-framework-gis support #746

merged 2 commits into from
May 24, 2022

Conversation

tfranzel
Copy link
Owner

Forked the schema code from django-rest-framework-gis, fixed some issues and restructured the code to make it work with spectacular.

support for:

  • GeoJSON responses (list/retrieve) for GeoFeatureModelSerializer
  • geo fields in regular serializers
  • geo pagination
  • all geo fields supported including sane fallback for under-specified geometry field.

This supersedes previous effort for support in #38 #67 #743 and #744

Feedback welcome!

@tfranzel tfranzel changed the title Rest gis upsteam forked django-rest-framework-gis support May 22, 2022
@tfranzel tfranzel force-pushed the rest_gis_upsteam_forked branch from 171c9b7 to 3ae486e Compare May 22, 2022 13:48
@tfranzel tfranzel force-pushed the rest_gis_upsteam_forked branch from 3ae486e to 9c4c033 Compare May 22, 2022 14:35
@codecov
Copy link

codecov bot commented May 22, 2022

Codecov Report

Merging #746 (b51575c) into master (efd8e7b) will decrease coverage by 0.06%.
The diff coverage is 96.17%.

@@            Coverage Diff             @@
##           master     #746      +/-   ##
==========================================
- Coverage   98.81%   98.74%   -0.07%     
==========================================
  Files          64       66       +2     
  Lines        7324     7505     +181     
==========================================
+ Hits         7237     7411     +174     
- Misses         87       94       +7     
Impacted Files Coverage Δ
tests/conftest.py 97.87% <ø> (ø)
drf_spectacular/contrib/rest_framework_gis.py 92.92% <92.92%> (ø)
drf_spectacular/openapi.py 97.30% <100.00%> (+<0.01%) ⬆️
drf_spectacular/plumbing.py 97.29% <100.00%> (+0.01%) ⬆️
tests/contrib/test_rest_framework_gis.py 100.00% <100.00%> (ø)
tests/test_extensions.py 100.00% <100.00%> (ø)

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 efd8e7b...b51575c. Read the comment docs.

Copy link

@joey-kevala joey-kevala left a comment

Choose a reason for hiding this comment

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

Thanks @tfranzel, I tested this on my codebase and it works great other than the one minor issue in the polygon example

@tfranzel tfranzel force-pushed the rest_gis_upsteam_forked branch from 9c4c033 to b51575c Compare May 24, 2022 09:43
@tfranzel tfranzel merged commit 13ea8e2 into master May 24, 2022
@tfranzel tfranzel deleted the rest_gis_upsteam_forked branch May 24, 2022 09:50
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