Closed mjkoster closed 5 years ago
the following syntax is not position depended:
odmObject { Switch { required [ { $ref #/odmObject/Switch/odmData/state } { $ref #/odmObject/Switch/odmAction/on } { $ref #/odmObject/Switch/odmAction/off } ] odmData { state { enum [ { on 1 } { off 0 } ] } odmAction { on {} off {} } } }
F2F4: Duplicate issues, resolved through #72 and #69.
We decided to change the optionality constraint from "optional" defined as a boolean quality of the odmClass itself, to a quality "required" with an array argument that specifies the set of required elements in the "parent" definition, i.e. the definition that uses the required elements.
For example, an odmObject Definition will list its required Properties, Actions, and Events in an array. We originally thought that we could simply list the names of the required elements in the array, but due to a number of practical issues we need to make this an array of JSON Pointers. There is a relative JSON Pointer syntax that starts with a number indicating nesting depth. We want to specify an element below where the pointer is, so we will use 0:
ref: https://tools.ietf.org/id/draft-handrews-relative-json-pointer-00.html