-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URI Variables in CoAP are not supported #1015
Comments
Are we talking about the server side or the client side? Giving a look at the code it seems that now URIVariables are handled by the server. @JKRhb can you verify if this is still an issue? |
Hmm, I guess the problem here is that for HTTP, forms like {
"href": "http://plugfest.thingweb.io:8083/smart-coffee-machine/properties/availableResourceLevel{?id}",
"contentType": "application/json",
"op": ["readproperty", "writeproperty"]
}, are generated, while for CoAP, only forms like {
"href": "coap://plugfest.thingweb.io:5683/smart-coffee-machine/properties/availableResourceLevel",
"contentType": "application/json",
"op": ["writeproperty", "readproperty"]
}, without the actual URI variables are generated, right? |
I guess we need to implement this function in the HTTP server also for the CoAP server or move it to the core package to use it across protocol binding implementations: node-wot/packages/binding-http/src/http-server.ts Lines 264 to 296 in c8177c2
|
So it seems that it is just about the TD generation. Regarding core or not: One issue I see with moving to core would mean that uri variables would be generated for all protocols, whether they support it or not. I am not convinced on myself but I think it would be better to manage forms as much as possible in the binding level 🤔 |
Oh, yeah, I was rather thinking about moving the function itself to the core package and then let the binding implementations use it in their implementations :) I now tried to implement the feature in #1078 – could you have a look if that resolves the issue? |
Ok that makes sense, thank you! |
Smart coffee machine Thing produces CoAP forms even if there are uri variables for that affordance. But there is no support for that in CoAP so those forms are not usable at all. Either the support for URI variables should be implemented or forms should not be generated for coap in that case.
The text was updated successfully, but these errors were encountered: