w3c / did-core

W3C Decentralized Identifier Specification v1.0
https://www.w3.org/TR/did-core/
Other
407 stars 96 forks source link

Make DID doc metadata propertly names consistent #533

Closed rhiaro closed 3 years ago

rhiaro commented 3 years ago

Changes equivalent id and canonical id to use hyphens instead of camelCase because the other DID doc metadata properties use hyphens. If I missed an explicit resolution to do these inconsistently, just close the PR..

I don't think this is technically an editorial change, if there are already implementations of these properties with camelCase.


Preview | Diff

peacekeeper commented 3 years ago

Good point, I agree this is currently inconsistent. I guess we could discuss whether we want to use hyphens for all metadata properties, or camelCase for all. Perhaps the latter would be preferable and we should get rid of hyphens altogether, given that the DID document Core Properties also use camelCase?

Same question for the DID parameters (e.g. maybe version-time should be versionTime?)

msporny commented 3 years ago

Perhaps the latter would be preferable and we should get rid of hyphens altogether, given that the DID document Core Properties also use camelCase?

Agree on camelCase as dashes can't be easily used in many programming languages:

const {versionTime} = resolverResponse.documentMetadata; // this feels nice
// vs.
const versionTime = resolverResponse.documentMetadata['version-time']; // this is bad mojo
rhiaro commented 3 years ago

@msporny done!

<marquee>This is a breaking change for anyone who has already implemented the metadata stuff</marquee>

peacekeeper commented 3 years ago

<marquee>

As a member of the TAG, can I request that you bring back <marquee> into HTML and make all browsers support it? It would make the web a so much better place!

msporny commented 3 years ago

Normative, multiple reviews, changes requested and made, no objections, merging.