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

Updated the order of the response (message followed by data) #10

Open
wants to merge 2 commits 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
3 changes: 2 additions & 1 deletion home-automation/02-device-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ All responses will have the form

```json
{
"data": "Mixed type holding the content of the response",
"message": "Description of what happened"

Choose a reason for hiding this comment

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

JSON data does not have guaranteed order for a keys

Also the comma is on the wrong one so the syntax is invalid now.

"data": "Mixed type holding the content of the response",
}
```

Expand Down Expand Up @@ -58,6 +58,7 @@ If a device with the given identifier already exists, the existing device will b
**Response**

- `201 Created` on success
- `400 BAD REQUEST` on plure due to incorrect data

Choose a reason for hiding this comment

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

What's a plure?

Also "Bad Request" would be better to match the case of the 201.


```json
{
Expand Down