ourzora / media-metadata-schemas

A repository of known JSON metadata schemas for the Zora media protocol.
30 stars 20 forks source link

`additionalProperties: false` discussion #17

Open shrugs opened 3 years ago

shrugs commented 3 years ago

yo!

i see y'all use the additionalProperties: false flag for metadata validation. any chance we can make that a bit more forgiving (i.e. remove it, defaulting to true)?

If not, validateMetadata() will fail when a metadata object contains extra keys (like the popular attributes or properties or, problematically, the localization attribute from ERC1155), all of which should be able to be included (since parser of metadata will (should) ignore fields they don't understand). Keeping the required key should support the primary use-case of the zdk, which is to ensure that a site like zora can parse tokens on its own protocol.

iainnash commented 3 years ago

Since the zora platform does not support these property keys, it wouldn't really make sense to add them to the zora specification. However, there is a good opportunity to use perhaps introduce an enjin spec that includes compatibility with other NFT platforms as you suggest.