Open mjkoster opened 5 years ago
See #38, #40, and #63
can the example be in JSON?
{
"odmObject": {
"Brightness": {
"required": [
{
"$ref": "0/odmData/currentBrightness"
},
{
"$ref": "0/odmAction/setBrightness"
}
],
"odmProperty": {
"currentBrightness": {
"type": "number"
}
},
"odmAction": {
"setLevel": {
"inputData": [
{
"$ref": "0/odmData/targetBrightness"
},
{
"$ref": "0/odmData/transitionTime"
}
],
"required": [
{
"$ref": "0/odmData/targetBrightness"
}
],
"odmData": {
"targetBrightness": {
"type": "number"
},
"transitionTime": {
"type": "number"
}
}
}
}
}
}
}
F2F4: Add "odmInputRequired" at "odmAction" level. This is not needed for "odmEvent", because "odmRequired" is already available. "odmRequired" is applied to objects, actions (output) and events (output).
Added "odmRequiredInputData" to qualities of odmAction
I think we might want to reconsider using odmRequiredOutputData to provide a more explicit definition. IOW, Actions would have required input data and output data to be more consistent with the input data and output data definitions.
Likewise, odmEvents would have the odmRequiredOutputData quality instead of odmRequired
odmRequired would still be used to specify required properties, actions, events in an object, etc.
odmData would still use JSON schema...
Rather than create a new class for different uses of data, we should define inputData and outputData for Actions and Events as pointers to odmData definitions, using the same pattern as for required (https://github.com/one-data-model/language/issues/68):