w3c-ccg / did-spec

Please see README.md for latest version being developed by W3C DID WG.
https://w3c.github.io/did-core/
Other
124 stars 45 forks source link

Replace "publicKey" with "publicKeys" #103

Closed thehenrytsai closed 6 years ago

thehenrytsai commented 6 years ago

It is an array of keys, so the name should be plural.

msporny commented 6 years ago

Unfortunately, this decision is a bit of linked data tribal knowledge. Linked data models prefer singular form because when the property is expanded in most expressions, it becomes:

subject publicKey keyId1. subject publicKey keyId2. subject publicKey keyId3.

What you are suggesting would make it the data model instead:

subject publicKeys keyId1. subject publicKeys keyId2. subject publicKeys keyId3.

The latter doesn't make a lot of sense when expressed in the data model because the predicate sounds as if it is plural when it is in fact singular.

The other issue is that values may be thought to be arrays today, but they may be restrained in other data models (other than DID documents) to be singular values, which would make the plural case misleading.

For these two reasons, the group would probably not support changing from singular form to plural form. Closing.