Skip to content

Commit

Permalink
#322 Add GeoUnit and OrgUnit Schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
Saurabh Gupta committed May 14, 2018
1 parent 1d2f835 commit a1a3d34
Show file tree
Hide file tree
Showing 7 changed files with 117 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"aem_user": "packageUser",
"aem_password": "override me securely",
"markdown-importer-version": "0.0.4",
"schemas": 139
"schemas": 141
},
"scripts": {
"clean": "rm -rf docs/reference",
Expand Down
7 changes: 7 additions & 0 deletions schemas/common/geounit.example.1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"@id": "https://data.adobe.io/geo-san-jose",
"xdm:label": "San Jose",
"xdm:parentGeoUnit": {
"@id": "https://data.adobe.io/geo-sf-bay-area"
}
}
44 changes: 44 additions & 0 deletions schemas/common/geounit.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"meta:license": [
"Copyright 2018 Adobe Systems Incorporated. All rights reserved.",
"This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license",
"you may not use this file except in compliance with the License. You may obtain a copy",
"of the License at https://creativecommons.org/licenses/by/4.0/"
],
"$id": "https://ns.adobe.com/xdm/common/geounit",
"$schema": "http://json-schema.org/draft-06/schema#",
"type": "object",
"meta:extensible": true,
"title": "Geo Unit",
"description": "The geographical unit of a parent geographical unit.",
"definitions": {
"geounit": {
"properties": {
"@id": {
"title": "Identifier",
"type": "string",
"format": "uri",
"description":
"The ID associated with this geographical unit."
},
"xdm:label": {
"title": "Friendly lable of the geographical unit.",

This comment has been minimized.

Copy link
@lrosenthol

lrosenthol May 16, 2018

Collaborator

British spelling of label, please correct.

This comment has been minimized.

Copy link
@trieloff

trieloff May 25, 2018

Contributor

That's not even British.

"type": "string",
"description": "The user-friendly name for the geographical unit."
},
"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."
}
},
"required": ["@id"]
}
},
"allOf": [
{
"$ref": "#/definitions/geounit"
}
],
"meta:status": "experimental"
}
7 changes: 7 additions & 0 deletions schemas/common/orgunit.example.1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"@id": "https://data.adobe.io/org-apparals-men",
"xdm:label": "Men Apparals",
"xdm:parentOrgUnit": {
"@id": "https://data.adobe.io/org-apparals"
}
}
44 changes: 44 additions & 0 deletions schemas/common/orgunit.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"meta:license": [
"Copyright 2018 Adobe Systems Incorporated. All rights reserved.",
"This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license",
"you may not use this file except in compliance with the License. You may obtain a copy",
"of the License at https://creativecommons.org/licenses/by/4.0/"
],
"$id": "https://ns.adobe.com/xdm/common/orgunit",
"$schema": "http://json-schema.org/draft-06/schema#",
"type": "object",
"meta:extensible": true,
"title": "Org Unit",
"description": "The organisation unit of a parent organisation.",
"definitions": {
"orgunit": {
"properties": {
"@id": {
"title": "Identifier",
"type": "string",
"format": "uri",
"description":
"The ID associated with this organisation unit."
},
"xdm:label": {
"title": "Friendly lable of the organisation unit.",

This comment has been minimized.

Copy link
@lrosenthol

lrosenthol May 16, 2018

Collaborator

lable->label

"type": "string",
"description": "The user-friendly name for the organisation unit."
},
"xdm:parentOrgUnit": {
"title": "Parent Organisation.",
"$ref": "https://ns.adobe.com/xdm/common/orgunit",
"description": "The parent organisation unit of the current organisation unit in the org heirarchy."
}
},
"required": ["@id"]
}
},
"allOf": [
{
"$ref": "#/definitions/orgunit"
}
],
"meta:status": "experimental"
}
6 changes: 6 additions & 0 deletions schemas/context/profile.example.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,11 @@
"https://ns.adobe.com/xdm/channels/direct-mail": "not_provided",
"https://ns.adobe.com/xdm/channels/apns": "not_provided",
"xdm:globalOptout": false
},
"xdm:orgUnit": {
"@id" : "https://data.adobe.io/org-apparals-men"
},
"xdm:geoUnit": {
"@id" : "https://data.adobe.io/geo-france"
}
}
16 changes: 8 additions & 8 deletions schemas/context/profile.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,17 @@
"$ref": "https://ns.adobe.com/xdm/context/pushnotificationtoken"
}
},
"xdm:orgUnitID": {
"title": "Organizational Unit Identifier",
"type": "string",
"xdm:orgUnit": {
"title": "Organizational Unit",
"$ref": "https://ns.adobe.com/xdm/common/orgunit",
"description":
"The unit ID within the organization owning the profile. This ID can be used to reference the organization details maintained in another dataset."
"The unit within the organization owning the profile. This can be used to reference the organization details maintained in another dataset."
},
"xdm:geoUnitID": {
"title": "Geographical Unit Identifier",
"type": "string",
"xdm:geoUnit": {
"title": "Geographical Unit",
"$ref": "https://ns.adobe.com/xdm/common/geounit",
"description":
"The geographical unit ID within the organization owning the profile. This ID can be used to reference the geographical information maintained in another dataset."
"The geographical unit within the organization owning the profile. This can be used to reference the geographical information maintained in another dataset."
},
"xdm:organizations": {
"title": "Organizations",
Expand Down

0 comments on commit a1a3d34

Please sign in to comment.