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

Reconsider the format of Action resources and Event resources #33

Closed
benfrancis opened this issue May 25, 2017 · 1 comment · Fixed by #72
Closed

Reconsider the format of Action resources and Event resources #33

benfrancis opened this issue May 25, 2017 · 1 comment · Fixed by #72
Assignees
Milestone

Comments

@benfrancis
Copy link
Member

"name" is used elsewhere to be a human friendly name whereas the name of actions and events is a computer friendly string like the property, action and event keys in the Thing Description.

Maybe name should be something else, like "type".

@benfrancis benfrancis added this to the Q2 2017 milestone May 25, 2017
@benfrancis
Copy link
Member Author

Also the format of Action resources...

{
  "name": "reboot"
}

...and Event resources...

{
  "name": "reboot",
  "description": "Going down for reboot",
  "time": "2017-01-25T15:01:35+00:00"
}

is now inconsistent with the format of Property resources...

{
  "temperature": 21
}

...which use the property name as a key rather than using a "name" property of the object.

The definition of the WebSocket API makes this difference even more obvious. It would be nice to make this more consistent.

@benfrancis benfrancis changed the title Reconsider "name" member of action and event resources Reconsider the format of Action resources and Event resources May 30, 2017
@ghost ghost assigned benfrancis Mar 14, 2018
@ghost ghost added the review label Mar 14, 2018
@ghost ghost removed the review label Mar 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant