w3c / wot-scripting-api

Web of Things (WoT) Scripting API
http://w3c.github.io/wot-scripting-api/
Other
42 stars 28 forks source link

Add support for URI variables to `exploreDirectory` method #528

Open JKRhb opened 9 months ago

JKRhb commented 9 months ago

While dealing with the implementation of the exploreDirectory method, I noticed that the things property in the API specification Thing Model defines three uriVariables which are currently not accessible via our API (namely the query parameters offset, limit, and format).

Should we add these three as optional parameters to the method?

zolkis commented 9 months ago

Should be part of an options dictionary, each as a named property, as they need to be validated. They can also be part of options as a separate dictionary with 3 properties, just like we use URI variable also in InteractionOptions as a parsed JSON object.

That needs more work, too. In general, we need to improve handling URI variables from scripts/web API. IMHO we should make the allowed URI variables explicit(ly validated). Otherwise why do we do a web API, we should be fine with plain RESTful communication, using whatever means from scripts (libraries, fetch, etc).

relu91 commented 8 months ago

Call 15/01: