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

Update resource.json #2798

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions config/dictionaries/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,7 @@
"summary": "Update a device tag",
"description": "",
"method": "PATCH",
"endpoint": "/v6/device_tag",
"filters": "?\\$filter=(tag_key%20eq%20'<EXISTING-KEY>')%20and%20(device%20eq%20<DEVICE_ID>)",
"endpoint": "/v6/device_tag(<TAG-ID>)",
Copy link
Member

Choose a reason for hiding this comment

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

Optional-idea: As an additional/alternative suggestion, it might be more convenient to suggest using the composite ID notation, which is also save against unescaped $filters.

Suggested change
"endpoint": "/v6/device_tag(<TAG-ID>)",
"endpoint": "/v6/device_tag(device=<DEVICE_ID>,tag_key='<EXISTING-KEY>'",

If you prefer having the numeric ID variant as well, but also like my suggestion you can add it as a separate example by coping the current one and using a different id and summary.
Eg: "id": "update-tag-by-natural-key", "summary": "Update a device tag by device id and tag_key"

"data": "{\n \"value\": \"<NEW-VALUE>\"\n}"
},
{
Expand Down Expand Up @@ -1109,4 +1108,4 @@
}
]
}
]
]
Loading