-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Migrated from GitLab.
As noted in Assignment 1:
Full list of operations implemented in the sample code
- [...]
- [...]
- [...]
- [...]
- Get all entries in a table
- HTTP method:
GET- Operation: (None)
- Parameters: Table name
- Response codes:
status_codes::BadRequest(400): No parameters specifiedstatus_codes::NotFound(404): Table does not existstatus_codes::OK(200): Table found, entities returned as JSON array- Result: If the table exists, the response body is a JSON array of objects. Each object corresponds to an entity in this table. The entity’s partition is returned as though it were a property named
“Partition”and its row is returned as though it were a property named“Row”. The actual properties of the entity are returned as properties of the JSON object.- Note: The above design poorly handles the case where an entity has a property
“Partition”or“Row”. The simplest solution is to adopt the convention of never assigning an entity those properties.
Because of this, I believe it would be best to check for these property names in handle_put(), and return status_codes::BadRequest (400) (and document this).
Reactions are currently unavailable