Allow for more TM fields to be optional #2042
Labels
Forms
Topics related to the forms container
Has Use Case Potential
The use case can be extracted and explained
Thing Model
Topic related to Thing Models
In the context of w3c/wot-binding-templates#258, one result of the discussion was that there might be cases where information within a Thing Model is primarily aimed at implementors of Things, indicating that they should support certain features or extensions of a protocol, like CoAP's Echo option. In this particular case, a consumer does not benefit that much from receiving this information in a TD, while implementors could use this information as a set of constraints for the Thing's behavior. However, at the moment it is required to take over all definitions (expect affordances labelled optional via
tm:optional
) into the resulting TD, which is why having vocabulary that is only used by Thing implementors is not really possible at the moment.I was therefore wondering if we could either expand the scope of
tm:optional
to other levels of a TM or whether it could be possible to label vocabulary terms as optional during instantiation in general (e.g., in a Binding Template document where a vocabulary term is introduced). I guess the former approach would be a bit more flexible and would also cause less burden for specification authors, although it could make TMs a bit more verbose in certain scenarios.When it comes to the example use case mentioned above, this could lead to the definition of a form like the following, where we use a JSON pointer to indicate that the
cov:usesEcho
member is optional via atm:optional
at the form level:Alternatively, we could also consider supporting JSON Path expressions, using the respective JSON object of the form as the root node.
This would make the
tm:optional
array entry a bit more concise:Looking forward to your feedback on this – if this would make sense as a potential addition to the specification, then I would transform the content of this issue into a use case submission via the new template :)
The text was updated successfully, but these errors were encountered: