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

Provide backwards compatibility with Mozilla Web Thing Descriptions #2881

Open
benfrancis opened this issue Sep 30, 2021 · 0 comments
Open
Labels
w3c-compliance wot-thing-description W3C WoT Thing Description specification
Milestone

Comments

@benfrancis
Copy link
Member

In transitioning the gateway from Mozilla Web Thing Descriptions to W3C Thing Descriptions we should be careful to maintain backwards compatibility where possible.

It turns out the same JSON schema and TypeScript types are currently shared between both the gateway's API and IPC layers, so any non-backwards-compatible changes risk breaking existing add-ons too.

I think it's fine for us to change the Thing Descriptions exposed by the gateway at the API layer to follow the W3C specification, but when consuming Thing Descriptions from the IPC layer we should provide backwards compatibility by translating the old format to the new one.

Some examples of where this may be needed:

  1. Change links to forms in API Change links to forms in API #2806
  2. Add data wrapper for event data schema Add data wrapper for event data schema #2810
  3. Change mediaType to type for links in API Change mediaType to type for links in API #2808
  4. Change @context of Thing Descriptions to an array Change @context of Thing Descriptions #2809
  5. Remove name member of property affordances in Thing Descriptions Remove name member of property affordances in Thing Descriptions #2855
  6. Remove value member of property affordances in Thing Descriptions Remove value member of property affordances in Thing Descriptions #2854
  7. Add prefix to proprietary members of Thing Descriptions Remove or add prefix to proprietary members of Thing Descriptions #2832

For the first issue, I suggest a follow-up to #2806 which adds back in support for links and translates them into forms where appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
w3c-compliance wot-thing-description W3C WoT Thing Description specification
Projects
Status: Product Backlog
Development

No branches or pull requests

1 participant