Skip to content
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

Align with top-level 'link' field of the TD (for Prague WD) #93

Closed
danielpeintner opened this issue Feb 16, 2018 · 6 comments
Closed

Align with top-level 'link' field of the TD (for Prague WD) #93

danielpeintner opened this issue Feb 16, 2018 · 6 comments

Comments

@danielpeintner
Copy link
Contributor

TD plans to add a new field "link" for Prague (see w3c/wot-thing-description#94)

We might consider adding this to scripting also.

@mkovatsc
Copy link
Contributor

So far link is only planned for informative metadata than does not need processing by the runtime. For now, they all shall be simply passed on to the application.

@zolkis
Copy link
Contributor

zolkis commented Feb 16, 2018

The API could look like this:

dictionary TDLink {
  required USVString href;
  DOMString rel;
  USVString mediaType;
};

partial interface ConsumedThing {
  sequence<TDLink> getLinks();  // throws on error
};

The TD is already fetched, that is why the method is synchronous.

@zolkis
Copy link
Contributor

zolkis commented Feb 16, 2018

I have prepared a PR to add this. Let me know if I should file it.

@mkovatsc
Copy link
Contributor

rel and mediaType should be optional, as I guess we also need this definition for ExposedThing.

RFC 8288 now leaves it open which target attributes exist; they may depend on the rel type or the link serialization (such as our TD). In the next step, we will probably need to allow for arbitrary attributes, as domain-specific contexts may define such attributes for the TD link serialization.

@zolkis
Copy link
Contributor

zolkis commented Feb 16, 2018

By default all dictionary members are optional, so we need to make href a required property.

@zolkis
Copy link
Contributor

zolkis commented Jun 8, 2018

Handled by #113.

@zolkis zolkis closed this as completed Jun 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants