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

Assert that profiles should not diverge from binding template defaults #404

Open
benfrancis opened this issue Apr 29, 2024 · 3 comments
Open

Comments

@benfrancis
Copy link
Member

benfrancis commented Apr 29, 2024

In the What to do with WoT Profiles 1.0 thread on the mailing list @egekorkan gave an example where a profile may specify a protocol binding which conflicts with the defaults defined in a binding template, and may therefore confuse Consumers which don't implement that profile.

We could consider adding an assertion to the WoT Profiles specification which requires that profiles must never prescribe something which conflicts with the defaults in a binding template for a given protocol. If we think that in Profiles 2.0 the profile protocol bindings and binding template defaults might actually be merged and become the same thing, it might be a good idea to specify this constraint now in Profiles 1.0.

The one problem I can see with that is that currently profiles are normative and binding templates are non-normative, and having a normative assertion rely on the content of non-normative text may be a problem.

@egekorkan
Copy link
Contributor

example where a profile may specify a protocol binding which conflicts with the defaults defined in a binding template, and may therefore confuse Consumers which don't implement that profile.

I said that but the solution is not putting a constraint like this. In my example, it is possible to add a conflict to the defaults in a profile as long as the option can be described in a TD. node-wot would not be effected if an action is invoked with a PUT or POST.

@benfrancis
Copy link
Member Author

benfrancis commented Apr 30, 2024

Hmm, maybe I didn't explain this well. What I mean is that a profile shouldn't redefine a default in its protocol binding specification, and then expect Consumers to assume that different default even though it isn't explicitly expressed in the TD.

The HTTP Basic Profile and HTTP SSE Profile currently never require the use binding vocabularies in Thing Descriptions, which I really like because it means a simple Consumer can implement a profile without having to implement full support for a binding vocabulary (which is much more complex).

Maybe this should just be guidance/advice for authors of future profiles rather than a normative assertion.

Relatedly, I'm realising that we really need binding templates for Server-Sent Events and Webhooks to define their defaults, e.g. w3c/wot-binding-templates#330. (Edit: I have filed w3c/wot-binding-templates#361 for SSE and there is already w3c/wot-binding-templates#40 for Webhooks.)

@egekorkan
Copy link
Contributor

What I mean is that a profile shouldn't redefine a default in its protocol binding specification, and then expect Consumers to assume that different default even though it isn't explicitly expressed in the TD.

This I agree as well :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants