Closed benfrancis closed 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
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.
Fixed.
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.