Skip to content
This repository has been archived by the owner on Apr 21, 2019. It is now read-only.

Optional Fields for Update #22

Open
rayfarias56 opened this issue Jan 14, 2016 · 2 comments
Open

Optional Fields for Update #22

rayfarias56 opened this issue Jan 14, 2016 · 2 comments
Assignees

Comments

@rayfarias56
Copy link
Owner

As the comment near the corresponding TODO suggests. The POST should be moved into BeaconsResource (our current placement doesn't follow REST) This would mean the request would be POST /beacons which would have no URL to conflict with the payload.

Since the PUT option only really worries about updating position we may wish to create a Position object. Not sure about if this one is really necessary.

@rayfarias56 rayfarias56 self-assigned this Jan 14, 2016
@rayfarias56
Copy link
Owner Author

Commit 0eb782b

Resolves the POST issue. However, The PUT issue isn't resolved. The change to the API should be:

  1. Ignore anything the user stated about Id within the payload. It's more "RESTful" to have the URL state which beacon to edit. This means injecting parameters in at the resource level.
  2. Edit the SQL implementation to only edit the parameters (x, y, z, description) iff they exist. If they weren't passed in the request's body, leave them unaltered from their current state in the database.

This would now be more closely tied to #19.

@rayfarias56
Copy link
Owner Author

We should have all the fields be optional for an update. At the moment we do not.

@rayfarias56 rayfarias56 changed the title URL/Payload Conflicts within Beacon Resource. Optional Fields for Update Apr 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant