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

#322 Add GeoUnit and OrgUnit Schemas #323

Merged
merged 16 commits into from
May 30, 2018
Merged

Conversation

saurabhere
Copy link
Contributor

Fixes Issue #322
Introduces new concepts OrgUnit and GeoUnits
Already being used in Profile Schema.
Needs to be included before the Profile schema is stabilized to prevent breaking changes.

To Review: @cdegroot-adobe @trieloff @lrosenthol

"xdm:parentGeoUnit": {
"title": "Parent Geographical Unit.",
"$ref": "https://ns.adobe.com/xdm/common/geounit",
"description": "Parent geographical unit of the current geographical unit in the geographical heirarchy."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: hierarchy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

"type": "object",
"meta:extensible": true,
"title": "Geo Unit",
"description": "The geographical unit of a parent geographical unit.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the reference to parent here? How does this relate to other geo objects? Please elaborate this in the description.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is explained in issue #322

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, you meant put them in the description as well. Done!

"$schema": "http://json-schema.org/draft-06/schema#",
"type": "object",
"meta:extensible": true,
"title": "Org Unit",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Organizational

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

"type": "object",
"meta:extensible": true,
"title": "Org Unit",
"description": "The organisation unit of a parent organisation.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be "organization", US spelling.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

@@ -80,17 +80,17 @@
"$ref": "https://ns.adobe.com/xdm/context/pushnotificationtoken"
}
},
"xdm:orgUnitID": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change, please update the CHANGELOG.md

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but, I see "meta:status": "experimental" , still ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, breaking changes between releases. Got it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see fa2c6f4 for how to document the breaking part of the change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks. keeping in mind for future.

@trieloff trieloff added the breaking Breaking Change label May 14, 2018
@saurabhere
Copy link
Contributor Author

fixed build and spellings. @trieloff OK by you?

Copy link
Contributor

@cdegroot-adobe cdegroot-adobe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to consider a separate schema for the hierarchy that has a relationship to the @ids of geo and org.

"type": "string",
"description": "The user-friendly name for the organizational unit."
},
"xdm:parentOrgUnit": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove the parent concepts here? There can be a separate table with this lookup data along with other data. The queries would be very hard if we keep it the way it is.

"type": "string",
"description": "The user-friendly name for the geographical unit."
},
"xdm:parentGeoUnit": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove the parent concepts here? There can be a separate table with this lookup data along with other data. The queries would be very hard if we keep it the way it is.

@saurabhere
Copy link
Contributor Author

@cdegroot-adobe While your suggestion is one way to handle parent-child relationships, what are the downsides to this current approach? It seems clearer to me w.r.t schema in mind.

@trieloff
Copy link
Contributor

@saurabhere approved. Please resolve the conflict.

@cdegroot-adobe I see that @saurabhere's approach to modeling the relationship is in line with @kstreeter's suggestions, so I don't think there is an issue.

@kstreeter kstreeter added this to the Bug Fixes milestone May 29, 2018
@trieloff
Copy link
Contributor

@saurabhere please check this #307 (comment) with @anshuman-yadav – it looks like you will need to update the extensions/adobe/experience/campaign/orchestration/reportingevent.schema.json, too.

Once this is done, we can merge, i.e. I'm dismissing @cdegroot-adobe's requested changes.

@trieloff trieloff dismissed cdegroot-adobe’s stale review May 30, 2018 08:45

Objections are in line with editor's suggestions – not an issue.

@trieloff trieloff merged commit 3c8023d into adobe:master May 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking Change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants