-
Notifications
You must be signed in to change notification settings - Fork 322
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
Issue 469 - Create distinct fields for different cases of birth date #498
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"xdm:name": { | ||
"xdm:firstName": "Jane", | ||
"xdm:middleName": "F", | ||
"xdm:lastName": "Doe", | ||
"xdm:fullName": "Jane F. Doe" | ||
}, | ||
"xdm:birthDayAndMonth": "01-03" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,91 @@ | ||
{ | ||
"meta:license": [ | ||
"Copyright 2017 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/context/person", | ||
"$schema": "http://json-schema.org/draft-06/schema#", | ||
"title": "Person", | ||
"type": "object", | ||
"meta:extensible": true, | ||
"meta:auditable": true, | ||
"description": | ||
"An individual person. May represent a person acting in various roles, such as a customer, contact, or owner.", | ||
"definitions": { | ||
"person": { | ||
"properties": { | ||
"xdm:name": { | ||
"title": "Full name", | ||
"$ref": "https://ns.adobe.com/xdm/context/person-name", | ||
"description": "The person's full name" | ||
}, | ||
"xdm:birthDay": { | ||
"title": "Birth day", | ||
"type": "integer", | ||
"description": "The day of the month a person was born (1-31).", | ||
"minimum": 1, | ||
"maximum": 31 | ||
}, | ||
"xdm:birthMonth": { | ||
"title": "Birth month", | ||
"type": "integer", | ||
"description": "The month of the year a person was born (1-12).", | ||
"minimum": 1, | ||
"maximum": 12 | ||
"meta:license": [ | ||
"Copyright 2017 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/context/person", | ||
"$schema": "http://json-schema.org/draft-06/schema#", | ||
"title": "Person", | ||
"type": "object", | ||
"meta:extensible": true, | ||
"meta:auditable": true, | ||
"description": "An individual person. May represent a person acting in various roles, such as a customer, contact, or owner.", | ||
"definitions": { | ||
"person": { | ||
"properties": { | ||
"xdm:name": { | ||
"title": "Full name", | ||
"$ref": "https://ns.adobe.com/xdm/context/person-name", | ||
"description": "The person's full name" | ||
}, | ||
"xdm:birthDay": { | ||
"title": "Birth day", | ||
"type": "integer", | ||
"description": "The day of the month a person was born (1-31).", | ||
"minimum": 1, | ||
"maximum": 31, | ||
"meta:status": "deprecated" | ||
}, | ||
"xdm:birthMonth": { | ||
"title": "Birth month", | ||
"type": "integer", | ||
"description": "The month of the year a person was born (1-12).", | ||
"minimum": 1, | ||
"maximum": 12, | ||
"meta:status": "deprecated" | ||
}, | ||
"xdm:birthDate": { | ||
"title": "Birth Date", | ||
"type": "string", | ||
"format": "date", | ||
"description": "The full date a person was born." | ||
}, | ||
"xdm:birthDayAndMonth": { | ||
"title": "Birth Date", | ||
"type": "string", | ||
"pattern": "[0-1][0-9]-[0-9][0-9]", | ||
"description": "The day and month a person was born, in the format MM-DD. This field should be used when the day and month of a person's birth is known, but not the year." | ||
}, | ||
"xdm:birthYear": { | ||
"title": "Birth year", | ||
"type": "integer", | ||
"description": "The year a person was born including the century (yyyy, e.g 1983). This field should be used when only the person's age is known, not the full birth date.", | ||
"minimum": 1, | ||
"maximum": 32767 | ||
}, | ||
"xdm:gender": { | ||
"title": "Gender", | ||
"type": "string", | ||
"enum": [ | ||
"male", | ||
"female", | ||
"not_specified", | ||
"non_specific" | ||
], | ||
"meta:enum": { | ||
"male": "Male", | ||
"female": "Female", | ||
"not_specified": "Not Specified", | ||
"non_specific": "Nonspecific" | ||
}, | ||
"description": "Gender identity of the person.\n", | ||
"default": "not_specified" | ||
} | ||
} | ||
} | ||
}, | ||
"allOf": [ | ||
{ | ||
"$ref": "https://ns.adobe.com/xdm/common/extensible#/definitions/@context" | ||
}, | ||
"xdm:birthYear": { | ||
"title": "Birth year", | ||
"type": "integer", | ||
"description": | ||
"The year a person was born including the century (yyyy, e.g 1983).", | ||
"minimum": 1, | ||
"maximum": 32767 | ||
{ | ||
"$ref": "#/definitions/person" | ||
}, | ||
"xdm:gender": { | ||
"title": "Gender", | ||
"type": "string", | ||
"enum": ["male", "female", "not_specified", "non_specific"], | ||
"meta:enum": { | ||
"male": "Male", | ||
"female": "Female", | ||
"not_specified": "Not Specified", | ||
"non_specific": "Nonspecific" | ||
}, | ||
"description": "Gender identity of the person.\n", | ||
"default": "not_specified" | ||
{ | ||
"$ref": "https://ns.adobe.com/xdm/common/auditable" | ||
} | ||
} | ||
} | ||
}, | ||
"allOf": [ | ||
{ | ||
"$ref": "https://ns.adobe.com/xdm/common/extensible#/definitions/@context" | ||
}, | ||
{ | ||
"$ref": "#/definitions/person" | ||
}, | ||
{ | ||
"$ref": "https://ns.adobe.com/xdm/common/auditable" | ||
} | ||
], | ||
"meta:status": "experimental" | ||
} | ||
], | ||
"meta:status": "experimental" | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is this minimum for a birth year reasonable ? I mean, if we set limits, shouldn't those limits be meaningful ?
In other words, is a birth year of, say, 67, reasonable for our XDM use cases ? And why would -100 (the assumed birth year of Julius Caesar) not be ?
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.
Yes, this needs work. This definition will let folks move forward, we should improve this under a new issue.