-
Notifications
You must be signed in to change notification settings - Fork 44
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
Update mapper output schema to allow multiple devices per message #496
Conversation
no worries, as long as it's not out of left field. The usual use for
devices is either "device name" or "device id" -- so just slightly
different. code works well enough.
…On Fri, Nov 4, 2022 at 9:48 AM Brian ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In schema/event_mapping_entity.json
<#496 (comment)>:
> @@ -0,0 +1,30 @@
+{
+ "$udmi_version": "1.4.0",
+ "title": "Mapping Event Entity",
+ "type": "object",
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "additionalProperties": false,
+ "properties": {
+ "code": {
"code" is from the DBO definition "Code: The human readable identifier for
the entity. This should be unique in document scope."
https://github.com/google/digitalbuildings/blob/master/ontology/docs/building_config.md
@grafnu <https://github.com/grafnu> does this work or would you still
prefer a change to something like "name", "id", or even "humanReadableId" ?
—
Reply to this email directly, view it on GitHub
<#496 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIEPD3THK37JKVGRQ5FTB3WGU46DANCNFSM6AAAAAARWUELMY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@grafnu we did a second pass based on your feedback, ready for another look. |
298cdb0
to
dcec4c5
Compare
Okay - added patterns in all the spots you requested, thank you for the suggestions @grafnu. The only one that I didn't use was I rebased and rebuilt the gencode hash but otherwise there are no changes in the earlier force-pushed commits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still two lingering bits that are just "type: object" -- which should be made more specific...
Mostly looks good, but there's still two lingering references to things as
just "object" when they can/should be more specific!
…On Wed, Nov 30, 2022 at 10:36 AM Nathan Merritt ***@***.***> wrote:
Okay - added patterns in all the spots you requested, thank you for the
suggestions @grafnu <https://github.com/grafnu>. The only one that I
didn't use was code - I see a bunch of mixed case values in our examples
and it's a human readable field so I think we should be fine on comparisons.
I rebased and rebuilt the gencode hash but otherwise there are no changes
in the earlier force-pushed commits
—
Reply to this email directly, view it on GitHub
<#496 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIEPD7L56FBQJ376TUD5SDWK6NBXANCNFSM6AAAAAARWUELMY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
dcec4c5
to
33be0b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Trevor - I tried to flag my changes explicitly in this review, hopefully that will make it easier for you/GitHub's UI
edit: doesn't seem to have helped much, so I'll clarify below:
In a couple spots I am proposing a schema which includes map objects with un-enumerable string keys (guids, DBO types, etc). I believe the correct expression of such a thing in JSON-schema-speak is "type": "object"
with additional validation of the key pattern and value shape provided in the "patternProperties"
field.
You seem to not want any "type": "object"
fields. If there is another way you'd like me to try and express these same relationships please provide me with an example that would be acceptable to you, as I don't seem to be making much progress guessing at your intent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I'm sure there will be iterations at some point, but nothing is jumping out me as wrong at this point...
@grafnu I don't have write permissions on the repo - is there anything else that needs to happen before this merges? |
Nothing to be done other than letting me know, that works! Submitted...
…On Wed, Dec 7, 2022 at 9:36 AM Nathan Merritt ***@***.***> wrote:
@grafnu <https://github.com/grafnu> I don't have write permissions on the
repo - is there anything else that needs to happen before this merges?
—
Reply to this email directly, view it on GitHub
<#496 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIEPD6IV7XBSJMDTVRJGQ3WMDDKFANCNFSM6AAAAAARWUELMY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This adds the additional required fields to the mapper output schema to allow for multiple translations to be issued at once (via a map of guid -> entity info) and adds an extra level to stash entity information like
type
,missing_telemetry_fields
, andconnections
.