Coming from https://github.com/w3c/wot-thing-description/issues/957 and the need for an algorithm in Scripting PR 264, please identify the mechanism to obtain the Form pair for a given operation.
To make it even clearer. How do you know:
I have a _feeling_ that if we want to really solve this properly, we need to explicitly tell the form associated with a form's operation. Something like:
{
//...
"forms": [{
"op": "subscribeevent",
"href" : "http://mytemp.example.com:5683/temp",
"contentType": "application/json",
"htv:methodName": "POST",
"unsubscribeevent":{ //this should be probably something else
"op": "unsubscribeevent", //somewhat duplicate
"href" : "http://mytemp.example.com:5683/temp",
"contentType": "application/json",
"htv:methodName": "DELETE",
}]
//...
}
I have a feeling that if we want to really solve this properly, we need to explicitly tell the form associated with a form's operation.
I said the same in the Scripting call, i.e. either link/reference/index the unsubscribe Form, or specify them as a tuple.
The former would be an extension of the current model, the second would be a breaking change.
I like @egekorkan proposal. Maybe this can be also a direction that can be used for the topic with hypermedia #899
Perhaps instead of unsubscribeevent field in the parent Form we could use a generic cancel field for operations, which in this case would be a Form with op: unsubscribeevent.
Most helpful comment
I have a _feeling_ that if we want to really solve this properly, we need to explicitly tell the form associated with a form's operation. Something like: