GithubHelp home page GithubHelp logo

gateway-addon-ipc-schema's People

Contributors

benfrancis avatar mrstegeman avatar relu91 avatar tim-hellhake avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gateway-addon-ipc-schema's Issues

Changes to device schema needed for W3C compliance

For better or worse the schemas defined in definitions.json are currently used by the WebThings Gateway application to validate parts of Thing Descriptions and to generate TypeScript types used to represent them.

There are certain changes needed to these schemas in order to validate W3C compliant Thing Descriptions. Notably:

  1. Add data wrapper for event data schema WebThingsIO/gateway#2810
  2. Change mediaType to type for links in API WebThingsIO/gateway#2808
  3. Change @context of Thing Descriptions to an array WebThingsIO/gateway#2809

Ideally we would also remove or vendor-prefix non-standard members of the Thing Description

  1. Remove name member of property affordances in Thing Descriptions WebThingsIO/gateway#2855
  2. Remove value member of property affordances in Thing Descriptions WebThingsIO/gateway#2854
  3. Add prefix to proprietary members of Thing Descriptions WebThingsIO/gateway#2832

Before releasing these changes we'll need to evaluate the impact on any existing add-ons which may use these terms directly.

Compiler problem with messages definitions

Using the current ipc schema inside the gateway causes the following complaints

2021-09-28 18:19:07.930 ERROR  : wot-adapter: strict mode: missing type "object" for keyword "properties" at "https://raw.githubusercontent.com/WebThingsIO/gateway-addon-ipc-schema/master/messages/definitions.json#/allOf/1" (strictTypes)
2021-09-28 18:19:07.937 ERROR  : wot-adapter: strict mode: missing type "object" for keyword "properties" at "https://raw.githubusercontent.com/WebThingsIO/gateway-addon-ipc-schema/master/messages/definitions.json#/allOf/1" (strictTypes)
2021-09-28 18:19:07.946 ERROR  : wot-adapter: strict mode: missing type "object" for keyword "properties" at "https://raw.githubusercontent.com/WebThingsIO/gateway-addon-ipc-schema/master/messages/definitions.json#/allOf/1" (strictTypes)
2021-09-28 18:19:08.026 ERROR  : wot-adapter: strict mode: missing type "object" for keyword "properties" at "https://raw.githubusercontent.com/WebThingsIO/gateway-addon-ipc-schema/master/messages/definitions.json#/allOf/1" (strictTypes)
2021-09-28 18:19:08.114 ERROR  : wot-adapter: strict mode: missing type "object" for keyword "properties" at "https://raw.githubusercontent.com/WebThingsIO/gateway-addon-ipc-schema/master/messages/definitions.json#/allOf/1" (strictTypes)
2021-09-28 18:19:08.122 ERROR  : wot-adapter: strict mode: missing type "object" for keyword "properties" at "https://raw.githubusercontent.com/WebThingsIO/gateway-addon-ipc-schema/master/messages/definitions.json#/allOf/1" (strictTypes)
2021-09-28 18:19:08.128 ERROR  : wot-adapter: strict mode: missing type "object" for keyword "properties" at "https://raw.githubusercontent.com/WebThingsIO/gateway-addon-ipc-schema/master/messages/definitions.json#/allOf/1" (strictTypes)
2021-09-28 18:19:08.181 ERROR  : wot-adapter: strict mode: missing type "object" for keyword "properties" at "https://raw.githubusercontent.com/WebThingsIO/gateway-addon-ipc-schema/master/messages/definitions.json#/allOf/1" (strictTypes)
2021-09-28 18:19:08.186 ERROR  : wot-adapter: strict mode: missing type "object" for keyword "properties" at "https://raw.githubusercontent.com/WebThingsIO/gateway-addon-ipc-schema/master/messages/definitions.json#/allOf/1" (strictTypes)
2021-09-28 18:19:08.192 ERROR  : wot-adapter: strict mode: missing type "object" for keyword "properties" at "https://raw.githubusercontent.com/WebThingsIO/gateway-addon-ipc-schema/master/messages/definitions.json#/allOf/1" (strictTypes)
2021-09-28 18:19:08.239 ERROR  : wot-adapter: strict mode: missing type "object" for keyword "properties" at "https://raw.githubusercontent.com/WebThingsIO/gateway-addon-ipc-schema/master/messages/definitions.json#/allOf/1" (strictTypes)
2021-09-28 18:19:08.243 ERROR  : wot-adapter: strict mode: missing type "object" for keyword "properties" at "https://raw.githubusercontent.com/WebThingsIO/gateway-addon-ipc-schema/master/messages/definitions.json#/allOf/1" (strictTypes)
2021-09-28 18:19:08.249 ERROR  : wot-adapter: strict mode: missing type "object" for keyword "properties" at "https://raw.githubusercontent.com/WebThingsIO/gateway-addon-ipc-schema/master/messages/definitions.json#/allOf/1" (strictTypes)

Even if the message is not helping a lot I think the problem has to be found here:

"form_element_property": {
"title": "PropertyForm",
"allOf":[
{ "$ref": "#/definitions/form_element" },
{
"properties": {
"op": {
"oneOf": [
{
"type": "string",
"enum": [
"readproperty",
"writeproperty",
"observeproperty",
"unobserveproperty"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"readproperty",
"writeproperty",
"observeproperty",
"unobserveproperty"
]
}
}
]
}
}
}
]
},

Notice how the second schema does not have type property defined

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.