codemeta/codemeta-generator

Generator declares codemeta.json files invalid when a property has multiple values

Opened this issue · 1 comments

Correct me if I am wrong, but my belief is that in JSON-LD properties are allowed to have multiple values (using an array). For example, the description property should be allowed to have multiple values, say if you had descriptions in different languages.

The current behavior of the generator, when importing a file with multiple descriptions, is to display the descriptions in the descriptions window separated by commas. However, if I hit the "validate" button, it says it is invalid.

If codemeta spec requires that there be only one description, I apologize for posting this issue in the wrong place as it should be a suggestion for codemeta rather than a bug with the generator. However, it seems to me that codemeta is a combination of an ontology and JSON-LD, so there should be no issue with having multiple descriptions. In this case, there is a bug in the validation section of the generator.

You're right, it's valid for Codemeta.

Having multiple values in this UI is a bit of an issue, and intentionally not supported here, because it would make the UI too complex.

That said, it shows an error when importing ("description" must be text, not ["foo","bar"]), but the import succeeds nonetheless, and then you can export. That's definitely a bug.