xdm
xdm copied to clipboard
repo:createdDate vs repo:createDate
Asked via email to Grp-XDM-API-WGs 10 May 2018: There appears to be a discrepancy between the following:
- https://github.com/adobe/xdm/blob/master/schemas/external/repo/common.schema.json has “repo:createDate” (‘create’, not ‘created’).
- https://github.com/adobe/xdm/blob/master/schemas/external/repo/asset.schema.json has “repo:createdDate” (‘created’, not ‘create’), as do 5 other schema files and 14 example files in the schemas directory.
May I assume that common.schema.json is in error and that “repo:createdDate” is the correct property name?
NOTE: Leonard Rosenthol commented via email (before this issue was created) that he thinks that "repo:createDate" would be the correct one "since it is based on XMP". I was not aware that the repository metadata concepts were specifically based on XMP.
Whichever direction this goes, I recommend that the tense of both the "create" and "modify" metadata be aligned. (In other words, I recommend that we either choose "repo:createDate" and "repo:lastModifyDate" or choose "repo:createdDate" and "repo:lastModifiedDate". (Choosing the later would clearly require the least change to existing schemas.)
Current situation, looking only in the 'schemas' directory:
- repo:createDate: Found only in external/repo/common.schema.json
- repo:createdDate: Found in assets/asset.schema.json, assets/image.schema.json, assets/video.schema.json, content/componentized-page.schema.json, external/repo/asset.schema.json, and external/repo/directory.schema.json, and 14 example files.
- repo:lastModifyDate: Not found
- repo:lastModifiedDate: Found in assets/asset.schema.json, assets/image.schema.json, assets/video.schema.json, content/componentized-page.schema.json, external/repo/asset.schema.json, external/repo/common.schema.json, and external/repo/directory.schema.json, and 14 example files.
For comparison:
- xmp:createDate: Found in assets/asset.schema.json and 5 example files.
- xmp:modifyDate: Found in assets/asset.schema.json and 5 example files.
The original “Core Asset Data Model”, on which the core asset and other schemas were defined, started from XMP. As such, those definitions take precidence.
Thanks, Leonard. The issue remains... the XDM spec currently has repo:createDate defined in one place and repo:createdDate defined other places.
By what process does this get resolved?
Options to achieve consistency appear to be:
- repo:createDate, repo:modifyDate (most directly related to XMP naming)
- repo:createDate, repo:lastModifyDate (close to existing, but lastModify sounds a bit odd)
- repo:createdDate, repo:lastModifiedDate (least change to current spec, by far)
On a related note: I see that xdm:repositoryCreatedBy and xdm:repositoryLastModifiedBy are defined in four different schema.json files. Do those come from XMP? I am a bit surprised that such metadata is not defined closer to "common" in the schema inheritance hierarchy. In any case, is there no need for a corresponding "repo" version of such metadata? (repo:createdBy and repo:lastModifiedBy, anyone?)
@kstreeter @trieloff @lrosenthol - I think it would make sense to roll this into the next milestone build which is just 2 business days away. I am happy to push the buttons on a PR to make this happen but I need you to decide on what is the right option going forward.
Is there any consensus to add a "repo:id" to the common properties? Maybe move out "repo:assetID" and use the "repo:id"? Or is the semantics of "repo:assetID" different than that of an envisioned "repo:id"? I see examples throughout the internal wiki that already makes use of "repo:id" as if it was a standard property.
@jbeckert, resolving an ambiguity regarding "repo:assetID" and "repo:id" sounds like a great idea... but it probably deserves its own issue, don't you think? :) What "internal wiki" is there that is being used that is not the specification as defined at https://github.com/adobe/xdm?
@jimaldous I'm referring to the internal Confluence wiki. Simply search for "repo:id" (with quotes) and you'll see what I'm referring to. There seem to be assumptions that "repo:id" already exists or will exist soon. "Yes" to moving it into its own issue. I created a new issue #348
After going through the history, it looks like repo:createdDate is the correct version.
I might have confused it with xmp:createDate (XMP also uses modifyDate), but repo: in general uses created* and modified* – not just for *Date but also for *By
Thanks, @trieloff. You mentioned *By. Once this is fixed, we will have repo:createdDate and repo:lastModifedDate defined in "external/repo/common.schema.json". It seems natural that we would also have repo:createdBy and repo:lastModifedBy right next to them in the same schema file. However, we have xdm:repositoryCreatedBy and xdm:repositoryLastModifiedBydefined in "content/content.schema.json". Is there a reason that these are treated differently? Why not repo:*By instead of xdm:repository*By?
The repo schemas only follow whatever the ACP is defining (albeit in a buggy way – see above).
The xdm schemas are in our control and XDM contributors found it useful to track who edited something, in addition to the date, so the properties got introduced. I agree that they might be useful for ACP, too – but we need to bring it up to the ACP API working group, get it in there, and then we can take it out of XDM.
@trieloff - Who would be the approvers for this change in the ACP API WG? Lets add them to this and get it resolved one way or the other.
That would be @ogoldman
@ogoldman - can you please provide your assessment of how to resolve this issue?
Oliver and I have a proposal we are working through for how to resolve this - its' related to our discussion about setting up a separate git repo...
The repo property should be repo:CreateDate and repo:ModifyDate, in order to remain consistent with the existing XMP properties with related names and semantics.
I just looked over the state of assets in XDM to see if the attribute capitalization issue has been addressed yet and I noted that there remains a mix of repo:createDate and repo:createdDate. A quick search in the source code of the spec shows the following counts:
- repo:createDate in .md files: 59
- repo:createDate in .json files: 2
- repo:createdDate in .md files: 15
- repo:createdDate in .json files: 40
- repo:lastModifyDate in any file: 0
- repo:lastModifiedDate in any file: 116 Given that the ACP API spec uses repo:createdDate, I recommend changing all repo:createDate to repo:createdDate.
So in the internal API specification we have repo:createdDate and repo:lastModifiedDate. So I tend to agree. I think the asset metadata might come up with more along the lines as indicated by @ogoldman due to XMP mapping.
I am not sure where this goes or should go from here. Maybe a PR @jimaldous ?
/cc @lrosenthol, @kstreeter