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

Create central Thing Description schema #2879

Open
benfrancis opened this issue Sep 28, 2021 · 3 comments
Open

Create central Thing Description schema #2879

benfrancis opened this issue Sep 28, 2021 · 3 comments
Labels

Comments

@benfrancis
Copy link
Member

In working on making the Thing Descriptions and API exposed by the gateway W3C compliant I've found it a bit strange that the JSON schema and TypeScript types used to validate Thing Descriptions live in the gateway-addon-ipc-schema and gateway-addon-node repos respectively.

I'm wondering whether we should eventually have a central repo (or directory inside a repo) inside the WebThingsIO GitHub org to define the JSON schema (and TypeScript types) for the Thing Description data model, as used in WebThings. Schemas which can be shared by the gateway, gateway-addon-node, gateway-addon-python, gateway-addon-ipc-schema and wot-adapter repos but which are independent of those defined in the W3C's wot-scripting-api repo in case we need to temporarily diverge from them.

@benfrancis
Copy link
Member Author

See also: WebThingsIO/gateway-addon-ipc-schema#19

@benfrancis
Copy link
Member Author

Note that there is now an npm package published by the W3C which provides a schema and TypeScript types based on the schemas in the wot-scripting-api repo https://www.npmjs.com/package/wot-thing-description-types

We could maintain a fork of that (gives us more flexibility than depending it on directly).

@lu-zero
Copy link

lu-zero commented Dec 27, 2021

Depending on what you have in mind, wouldn't be better to use the wot as base and just add to the context the webthings-specific bits with the wt namespace?

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

No branches or pull requests

2 participants