w3c / wot-binding-templates

Web of Things (WoT) Binding Templates
http://w3c.github.io/wot-binding-templates/
Other
23 stars 25 forks source link

improve BACnet JSON schema #312

Closed fennibay closed 1 year ago

fennibay commented 1 year ago

Match the schema to the domains and ranges of the fields.

This introduces nesting in the schema, which reflects the data model of BACnet.

netlify[bot] commented 1 year ago

Deploy Preview for wot-binding-templates ready!

Name Link
Latest commit 8150b6cce72223a9adb20e8e3cae449b2f47759e
Latest deploy log https://app.netlify.com/sites/wot-binding-templates/deploys/653bde16a24feb0008a686bb
Deploy Preview https://deploy-preview-312--wot-binding-templates.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

egekorkan commented 1 year ago

So this is something we have agreed to not do (see links below) since it gives the wrong mapping. We want to say that if you are using a certain BACnet data, here is how you represent it in TDs. This would nudge people away from JSON Schema.

Links:

fennibay commented 1 year ago

Thanks @egekorkan for the info. What was the reasoning for removing the BACnet data types?

I'm fully with you that JSON schema should be the main contract. This PR proposes just a section under BACnet-specific forms, so that BACnet's complexity can be simplified to JSON. If this is not there, most types won't be mappable to JSON, or people are forced to use additional BACnet-specific metadata.

Some examples:

So, essentially I see these data types not making people farther from JSON, but rather bring them to the JSON/Web-world.

Let's discuss.

fennibay commented 1 year ago

Short update after discussion with @egekorkan:

fennibay commented 1 year ago

@egekorkan @ektrah I addressed the concerns in #314. I did not add a new section between the sections 4. URI Scheme and 5. BACnet Vocabulary, because the needed context for the payload examples is already under 6.2 WoT Data Schema and BACnet Types.

egekorkan commented 1 year ago

Call of 08.11: We agree to merge. There has been commented that I will write in the #314