Skip to content

API add Node properties #1327

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

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open

API add Node properties #1327

wants to merge 6 commits into from

Conversation

cbp1983
Copy link
Contributor

@cbp1983 cbp1983 commented Dec 23, 2024

Summary

This change allows users to view Node Properties as part of API Node requests.

Copyright assignment

I assign all rights, including copyright, to any future Dradis
work by myself to Security Roots.

Check List

  • Added a CHANGELOG entry

@cbp1983 cbp1983 requested review from aapomm and caitmich December 23, 2024 16:52
@@ -44,7 +44,7 @@ def destroy
protected

def node_params
params.require(:node).permit(:label, :type_id, :parent_id, :position)
params.require(:node).permit(:label, :type_id, :parent_id, :position, properties: {})
Copy link
Member

Choose a reason for hiding this comment

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

This is important, as using JSON opens a can of worms around validation. If you look at the app's NodesController we stick to raw_properties to let the user submit a "text blob" with the JSON properties, but we then apply strict validation at the model level.

I'd expect for the API flow to follow a very similar pattern.

cbp1983 and others added 3 commits April 14, 2025 13:38
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.

3 participants