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

Mapping of Data Schemas to operations and vice versa #1469

Closed
egekorkan opened this issue Apr 20, 2022 · 3 comments · Fixed by #1493
Closed

Mapping of Data Schemas to operations and vice versa #1469

egekorkan opened this issue Apr 20, 2022 · 3 comments · Fixed by #1493
Assignees
Labels
Editorial Issues with no technical impact on implementations PR available

Comments

@egekorkan
Copy link
Contributor

The comment at #1324 (comment) made me realize that we do not explain very well how data schemas of an affordance maps to the operations. We implicitly know this, i.e. subscription in events maps to the subscribeevent operation. However, I think that the spec needs a nice table that says that for this operation, the data schema (or the payload) is defined by:

  • these terms in the affordance
  • protocol related information in the forms
  • lack of both means empty payload
@egekorkan egekorkan changed the title Mapping of Data Schemas to operations Mapping of Data Schemas to operations and vice versa Apr 20, 2022
@benfrancis
Copy link
Member

As part of of this, as noted in #1324 there is currently no explanation of how to define schemas for some of the meta-interactions in top level forms, e.g. subscribeallevents, unsubscribeallevents and queryallactions.

I think we need to go through every operation type and ensure it's clear how to define a schema for that operation. See also: #1053.

@benfrancis
Copy link
Member

Something else that I noticed today while reviewing w3c/wot-profile#192 is that there's currently no way to define a schema for the response to a subscribeevent operation. Specifically in this case the need is to provide a subscription ID in the response to the creation of a webhook subscription, which the Consumer can later use to cancel the subscription.

Related to #1053.

@egekorkan
Copy link
Contributor Author

egekorkan commented Apr 29, 2022

The hacky way to do that is to use oneOf in conjunction with readOnly and writeOnly or simply indicating the read/write options per property:https://w3c.github.io/wot-thing-description/#webhook-example-serialization

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Editorial Issues with no technical impact on implementations PR available
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants