-
Notifications
You must be signed in to change notification settings - Fork 17
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
Rename actions to match properties and events #160
Conversation
Not merging for now, some concern about merging PATCH with PUT. It may be more RESTful, but is also more inconvenient since we don't have a good/convenient way to select forms in the scripting API. Two paths forward:
In general... making things more "RESTful" also seem to be making them more protocol specific and may be a step backwards. Just having one name (interaction) per distinct API operations seems... simpler. |
Also, to be clear: I think the TD for the directory should be a TM and normative... |
I would say that the problem relies on the fact that updating a TD using PATCH is not equal to update a TD using PUT. I think we should clarify in the TD spec (if not already) that the form listed for an affordance should be treated as equivalent to each other. Mining that they could be used interchangeably the perform the same logical operation. This is not the case for substituting a TD (update using PUT) or modify part of a TD (update PATCH). The proof is that if a take a TD (which is also a valid PartialTD), the final output depends on operation chosen:
|
I understand what you're getting at. But the |
We discussed in the Discovery TF meeting and generally agreed that the new names were a useful improvement, but disagreed on the merger of PUT/PATCH (especially if they are hard to distinguish in the scripting API, or make it harder to distinguish the functionality in other protocols/make the API more HTTP specific). So... if we had a PR that just did the name changes, we could merge it. @benfrancis for now, would you mind updating this PR to take out the PUT/PATCH changes and leave the name changes? We can discuss PUT/PATCH separately. |
@mmccool I'm a bit confused about why it's OK for |
As @relu91 explained above, For |
My opinion: 1 is the easy thing to do, 2 is the right thing to do, 3 is a hacky workaround. We could do both 1 and 2 (e.g. doing 1 does not preclude doing 2 later). Actions:
|
I've added a commit to re-separate update and partial update. |
Superseded by #184 |
This PR proposes renaming and combining actions and their API endpoints in the Directory Service API to match other proposed changes to the example Thing Directory Description (in #158 and #159):
createTD
->createThing
updateTD
&updatePartialTD
->updateThing
updateTD
->updateThing
updatePartialTD
->partialUpdateThing
deleteTD
->deleteThing
See discussion in #133
Preview | Diff