Add Route nodes and HANDLES edges for DRF ViewSet actions#647
Open
muskiteer wants to merge 2 commits into
Open
Add Route nodes and HANDLES edges for DRF ViewSet actions#647muskiteer wants to merge 2 commits into
muskiteer wants to merge 2 commits into
Conversation
Signed-off-by: muskiteer <agarwal.vansh3110@gmail.com>
Author
|
Hi @DeusData, While testing locally, I ran into some issues with the test and lint targets. From what I could tell, these didn't appear to be directly related to the changes in this PR, but please let me know if I missed something. I'd really appreciate any feedback or suggested changes. Happy to update the PR if needed. Thanks |
Signed-off-by: muskiteer <agarwal.vansh3110@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR adds support for indexing Django REST Framework
ViewSetactions decorated with@actionby emittingRoutenodes andRoute-[:HANDLES]->Methodrelationships.Previously, DRF action methods were indexed only as
Methodnodes, which meant endpoint inventory and endpoint-to-handler mapping were incomplete for projects using DRF routers.Changes
Routenodes for DRF@actionmethods.Route-[:HANDLES]->Methodrelationships linking routes to their corresponding handler methods.Methodextraction.Verification
Reproduced using a minimal Django REST Framework project:
Before:
Methodnode was present.Routenodes were emitted.Route-[:HANDLES]->Methodrelationships existed.After:
Routenode is emitted.Route-[:HANDLES]->Methodrelationship is created.Checklist
git commit -s) — required, CI rejects unsigned commits (DCO, see CONTRIBUTING.md)make -f Makefile.cbm test)make -f Makefile.cbm lint-ci)Fixes #603