[Fixes #14201] Dropped spectacular, replaced with docstrings for API endpoints#14202
[Fixes #14201] Dropped spectacular, replaced with docstrings for API endpoints#14202
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes the drf-spectacular dependency and its associated @extend_schema decorators across the GeoNode API views, transitioning documentation descriptions into method docstrings. The feedback identifies an incorrect docstring for the favorite method and recommends explicitly defining serializer_class within @action decorators for several endpoints to ensure that the built-in Django Rest Framework schema generator continues to produce accurate API documentation in the absence of drf-spectacular.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #14202 +/- ##
==========================================
+ Coverage 64.87% 74.65% +9.78%
==========================================
Files 960 960
Lines 58866 58825 -41
Branches 8070 8018 -52
==========================================
+ Hits 38188 43916 +5728
+ Misses 19054 13108 -5946
- Partials 1624 1801 +177 🚀 New features to boost your workflow:
|
|
Thanks @giohappy what do you plan regarding the amount of information the docstrings should provide? For example instead of We could do could be also decorators (IsAuthenticated…) return scodes and api version might be good? And are you planning to use DRF's built-in |
|
@t-book, this is only the first cleanup step. I kept the descriptions from the spectacular decorators just for memory and as a basis for any solution we will decide. Personally, I don't have a plan yet for an alternative autodoc solution. The many customisations inside serializers, mixins, custom responses, and the presence of dynamic filters, make any solution fail somewhere... I suspect that, whatever we choose, it will need some manual tweaking. |
a9ac0a2 to
a4bb53d
Compare
No description provided.