WebThingsIO / api

Web Thing API Specification
http://iot.mozilla.org/wot/
Other
164 stars 25 forks source link

Define members of Property object #22

Closed benfrancis closed 6 years ago

benfrancis commented 7 years ago

Note: System for defining object values of properties which are more complex than a simple type like “integer”, e.g. an acceleration vector. Perhaps using JSON Schema syntax.

Note: Decide whether a “required” property is needed for properties or whether the use of a JSON Schema to validate a Thing Description is enough.

coderbyheart commented 6 years ago

OpenAPI has this figured out very well: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#schema-object-examples

benfrancis commented 6 years ago

There's lots of ongoing discussion about this at the W3C. In this specification we are currently re-using types from JSON Schema (as I believe OpenAPI does), but not the same syntax. Also in addition to a type definition, properties may have a human readable description and a URL.

One problem with the syntax used by JSON Schema and OpenAPI is the potential confusion between "properties" and "properties" of "properties".

But yes, OpenAPI is a useful source of inspiration.

benfrancis commented 6 years ago

Fixed.