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

adding essa schemas #863

Merged
merged 3 commits into from
Apr 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": 269
"schemas": 271
},
"scripts": {
"clean": "rm -rf docs/reference",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"xdm:createdBy": "USER111",
"xdm:createdDate": "2018-01-02T15:52:25+00:00",
"xdm:lastUpdatedBy": "USER2222",
"xdm:lastUpdatedDate": "2018-01-02T15:52:25+00:00",
"xdm:lastActivityDate": "2018-01-02T15:52:25+00:00",
"xdm:lastReferencedDate": "2018-01-02T15:52:25+00:00",
"xdm:lastViewedDate": "2018-01-02T15:52:25+00:00"
}
37 changes: 37 additions & 0 deletions schemas/common/external-source-system-audit-details.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"meta:license": [
"Copyright 2020 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/external-source-system-audit-details",
"$schema": "http://json-schema.org/draft-06/schema#",
"title": "External Source System Audit Details Mixin",
"type": "object",
"meta:extensible": true,
"meta:intendedToExtend": [
"https://ns.adobe.com/xdm/context/opportunity","https://ns.adobe.com/xdm/context/account","https://ns.adobe.com/xdm/context/profile-lead-crm","https://ns.adobe.com/xdm/context/profile-contact-crm","https://ns.adobe.com/xdm/context/opportunity-contactrole","https://ns.adobe.com/xdm/context/activitylog"
],
"description": "Mixin which defines a set a audit properties for extenal sources.",
"definitions": {
"externalSourceSystemAuditDetails": {
"properties": {
"xdm:extSourceSystemAudit": {
"title": "External Source System Audit Properties",
"$ref": "https://ns.adobe.com/xdm/common/external-source-system-audit",
"description": "Audit attributes for external sources."
}
}
}
},
"allOf": [
{
"$ref": "https://ns.adobe.com/xdm/common/extensible#/definitions/@context"
},
{
"$ref": "#/definitions/externalSourceSystemAuditDetails"
}
],
"meta:status": "experimental"
}
9 changes: 9 additions & 0 deletions schemas/common/external-source-system-audit.example.1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"xdm:createdBy":"USER111",
"xdm:createdDate":"2018-01-02T15:52:25+00:00",
"xdm:lastUpdatedBy":"USER2222",
"xdm:lastUpdatedDate":"2018-01-02T15:52:25+00:00",
"xdm:lastActivityDate":"2018-01-02T15:52:25+00:00",
"xdm:lastReferencedDate":"2018-01-02T15:52:25+00:00",
"xdm:lastViewedDate":"2018-01-02T15:52:25+00:00"
}
69 changes: 69 additions & 0 deletions schemas/common/external-source-system-audit.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"meta:license": [
"Copyright 2020 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/external-source-system-audit",
Copy link
Collaborator

Choose a reason for hiding this comment

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

How is this different the existing common/auditable schema - https://github.com/adobe/xdm/blob/master/schemas/common/auditable.schema.json

Are we saying everything in the common/auditable is "internal" audit fields? If I include both of these, am I going to be confused when I see both a xdm:createdDate and a repo:createdDate? Should these fields be named something like xdm:externalCreatedDate? These are just some questions I have.

Copy link
Collaborator

Choose a reason for hiding this comment

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

As mentioned this specific mixin will be used as a reference to capture the auditable properties of customers data sets. We have CRM system and other Marketo needs to capture and present when was a record got created Vs Modified and by whom. common/auditable are the fields used meant to be used internally by the AEP services.

"$schema": "http://json-schema.org/draft-06/schema#",
"title": "External Source System Audit Attributes",
"type": "object",
"meta:extensible": true,
"description": "External Source System Audit fields.",
"definitions": {
"externalSourceSystemAudit": {
"properties": {
"xdm:createdBy": {
"title": "Created By",
"description": "Name of the user who created this record",
"type": "string"
},
"xdm:createdDate": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not use the created and modify date that all other schemas use - https://github.com/adobe/xdm/blob/master/schemas/external/repo/common.schema.json#L32

"title": "Created Date",
"description": "Date when this record was created.",
"type": "string",
"format":"date-time"
},
"xdm:lastUpdatedBy": {
"title": "Last Updated By",
"description": "User who last modified this record.",
"type": "string"
},
"xdm:lastUpdatedDate": {
"title": "Last Updated Date",
"description": "Date when this record was last modofied.",
"type": "string",
"format":"date-time"
},
"xdm:lastActivityDate": {
"title": "Last Activity Date",
"description": "Last activity date.",
"type": "string",
"format": "date-time"
},
"xdm:lastReferencedDate": {
"title": "Last Referenced Date",
"description": "Last referenced date.",
"type": "string",
"format": "date-time"
},
"xdm:lastViewedDate": {
"title": "Last Viewed Date",
"description": "Last viewed date.",
"type": "string",
"format": "date-time"
}
}
}
},
"allOf": [
{
"$ref": "https://ns.adobe.com/xdm/common/extensible#/definitions/@context"
},
{
"$ref": "#/definitions/externalSourceSystemAudit"
}
],
"meta:status": "experimental"
}