w3c/wot-scripting-api

Add support for URI variables to `exploreDirectory` method

JKRhb opened this issue · 2 comments

JKRhb commented

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?

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).

Call 15/01:

  • @JKRhb we'll work on a concrete use case description (blocked by use case task force - we need to define the process - Use case task force will resume work this Wednesday).