Open tjaffri opened 8 years ago
According to the OCF spec, notifications are not represented anywhere in the RAML or JSON schemas. Reference section 5.3 RAML Definition OIC Resource Type Specification:
Notify is not part of an RAML definition but is defined in the Core specification. The semantics of a Notify are the same as the CRUDN Read value. All Resource Types defined in this specification support notification via the use of observe as defined in OIC Core Specification Section 11.4.2.
The linked section 11.4.2 describes abstractly the sequence for a NOTIFY operation, but does not metion how that is implemented with HTTP.
The OCF Core Specification section 12.2 Mapping of CRUDN to CoAP explains how the abstract CRUDN operations described in the spec are mapped to HTTP REST. (Note CoAP essentially means REST.) The NOTIFY operation mapping is not described inline, but references another spec:
A Device implementing CoAP shall conform to IETF draft-ietf-core-observe-16 to implement the CoAP Observe option.
I haven't had time to digest that spec yet.
Also, there may be a problem with the way OpenT2T notifications are currently implemented in terms of properties. OCF notifications are at the resource level, and OpenT2T has mapped OCF resource endpoint+verb combinations to JavaScript methods. Currently translators that implement OCF schemas don't have any properties.
Let's use this issue to work on: