refactor(backend): move various endpoints to modelviewsets#11617
refactor(backend): move various endpoints to modelviewsets#11617SchrodingersGat merged 27 commits intoinventree:masterfrom
Conversation
✅ Deploy Preview for inventree-web-pui-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #11617 +/- ##
=======================================
Coverage 91.34% 91.35%
=======================================
Files 966 967 +1
Lines 50210 50242 +32
=======================================
+ Hits 45866 45900 +34
+ Misses 4344 4342 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…into move-to-router
|
@SchrodingersGat would appreciate a look here. This As seen this can be done in small steps and is still very similar to current patterns / allows reuse of current view mixins |
|
@matmair I think that this is a good move overall. Would we be looking to move a greater portion of our endpoints to this setup? Or just a small number to start with? |
|
my goal would be to move all model/object based API endpoint to viewsets and keep view/function based endpoints only for stand-alone actions. As that would be a large diff and there are small decisions to be taken regularly regarding abnormlaities in the current API I think batching this over a longer time is the way to go |
|
@matmair I'd like to get 1.3.0 out soon (as there are some major fixes that people are waiting on) - so I'll bump this to 1.4.0 |
|
one permission todo, then this is ready |
|
@SchrodingersGat this is ready for review and merge. I have identified and documented various inconsistent API details, those are kept for now. My plan would be to do a separate PR to change these (breaking) and discuss details there then to keep this one focused on the pure refactor |
|
Nice, this is a great refactor and much cleaner code. Please address the conflict and then I'm happy to merge |
|
@SchrodingersGat ready for merge |

This makes it easier to have uniform URL names and behaviors; also adds a bit more testing and cleans up some path docstrings.
Still to figure out:
Todo when stable: