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

Should schemas be Thing Models? #81

Open
benfrancis opened this issue Jan 31, 2025 · 1 comment
Open

Should schemas be Thing Models? #81

benfrancis opened this issue Jan 31, 2025 · 1 comment

Comments

@benfrancis
Copy link
Member

benfrancis commented Jan 31, 2025

When this repository of schemas was created, Thing Models didn't exist.

Other implementations are now using Thing Models to define groups of action affordances and common data schemas for certain device types.

Should we continue to define capability schemas using semantic annotations, or consider creating Thing Models for each device type?

Thing Models have always seemed more vendor specific to me, as an implementation detail for how Thing Descriptions are generated on the back end rather than for use in a shared cross-vendor repository of device types. But they could theoretically be used this way...

I think our current approach works quite well for WebThings, but semantic annotations are really meant to provide additional semantic information about what certain values mean, rather than enforce any kind of data structure in the way that we use them.

@benfrancis benfrancis changed the title Should schemas now be Thing Models? Should schemas be Thing Models? Jan 31, 2025
@benfrancis
Copy link
Member Author

Having discussed this in the Web of Things Community Discourse...

Using Thing Models would involve having to fix the names of affordances in Thing Models, which the current schema approach doesn't do.

We'd have to have a complete Thing Model for every affordance type and then a Thing Model for every Thing type which composes them. Using the import feature you could potentially have multiple properties which import the same affordance definition but with different names.

You could also then have a Thing Description which composes multiple capability Thing Models using link relations.

To be honest it sounds quite messy and they end up being more like templates than schemas, which I'm not sure is what we really want here.

What we were trying to achieve with Capability Schemas was more like the schemas at schema.org. An alternative direction would be to propose schemas for schema.org.

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

1 participant