-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Currently the HTTP Binding document specifies a default HTTP method for 7 of the 18 well-known operation types defined in the WoT Thing Description 1.1 specification:
| op value | Default Binding |
|---|---|
readproperty |
"htv:methodName": "GET" |
writeproperty |
"htv:methodName": "PUT" |
invokeaction |
"htv:methodName": "POST" |
readallproperties |
"htv:methodName": "GET" |
writeallproperties |
"htv:methodName": "PUT" |
readmultipleproperties |
"htv:methodName": "GET" |
writemultipleproperties |
"htv:methodName": "PUT" |
I have two key questions:
- Do you think it is feasible to define defaults for the full set of 18 operations?
- What level of detail do you think would be acceptable for these default bindings?
I've previously shared a WoT HTTP Binding 2.0 strawman proposal which proposes moving the content of at least the protocol binding section of the HTTP Basic Profile into the HTTP Binding document as defaults. The intention would be that the content of the protocol binding section of the HTTP SSE Profile would also be moved into a binding document, either the HTTP Binding or a seperate Server-Sent Events Binding. These defaults would then be referenced from Profiles rather than defined in them.
But what is an appropriate level of detail for a default binding? At one extreme we have the current very basic definition a single default term for each operation in a table as in the current HTTP Binding document, and at the other extreme we have the protocol bindings for action operations in the current WoT Profiles 1.0 specification which uses normative assertions to define what almost amounts to a sub-protocol for an action queue with dynamic resources and a data schema for action status.
My hope is that with Thing Description 2.0 the action operations will be better defined, and Thing Descriptions will be more expressive, such that the complicated actions bindings we created in 1.0 will not be necessary, though it remains to be seen how that will work.
What is an acceptable default binding?
- Must defaults only take the form of tables of default values for vocabulary terms?
- Can all terms have defaults (e.g. a default content type in an HTTP header)?
- Can bindings define default response codes?
- Can bindings define default error formats?
- Can bindings define default data schemas (e.g. for a queryaction response or a readmultipleproperties request)?
- Can bindings include written assertions which prescribe certain behaviour?
I think it is important to clearly answer these questions because the ability to define more detailed default bindings for the full set of WoT operations in binding documents is really a pre-requisite for the proposed new approach to profiles outlined in the WoT Profiles 2.0 Use Cases & Requirements document, where profiles constrain a fixed set of extension points (protocol bindings being one of them), but do not themselves define protocol bindings.
What do you think?
P.S. If this issue belongs in the new wot-binding-registry repo then please let me know.