codemeta/codemeta-generator

Generate expanded jsonld document version from form to use for validation

Opened this issue · 3 comments

          Ah, indeed. Eventually we should make the main code generate the expanded value directly, but let's keep this for a future PR.

Originally posted by @progval in #27 (comment)

Now that we are using jsonld.jd to generate the codemeta document, we could also generated the jsonld expanded version of the document directly from the form fields and then work with the expanded document.

(for future readers:) we only mean this for the internal representation; the output should remain the compacted form

On it

work with the expanded document

means update https://github.com/hjonin/codemeta-generator/blob/3c76b4b876df2de62e6f88eaeedc1bdfa0437a03/js/validation/index.js#L16

function validateDocument(doc) {

to take the expanded version for input.

(cf. #34 (comment))