Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validator rejects output generated by codemetapy #35

Closed
apirogov opened this issue Mar 28, 2024 · 1 comment · Fixed by #36
Closed

Validator rejects output generated by codemetapy #35

apirogov opened this issue Mar 28, 2024 · 1 comment · Fixed by #36
Assignees

Comments

@apirogov
Copy link

The validator seems to only accept a single hard-coded @context with codemeta, but codemetapy generates a file with context given as a list:

"@context": [
        "https://doi.org/10.5063/schema/codemeta-2.0",
        "https://w3id.org/software-iodata",
        "https://raw.githubusercontent.com/jantman/repostatus.org/master/badges/latest/ontology.jsonld",
        "https://schema.org",
        "https://w3id.org/software-types"
    ],

This is valid JSON-LD, but this validator rejects it.
I understand that implementing the validation fully respecting arbitrary RDF contexts might be difficult for different reasons. But a possible solution could be:

  1. If there is more than one context, check that codemeta context URL is part of the list
  2. for unknown fields, if there are other contexts beyond codemeta, make a warning instead of an error (because it might be valid for the other contexts)
@progval
Copy link
Member

progval commented Mar 28, 2024

It's a known limitation that this is a generator and not primarily a validator, so it rejects plenty of valid documents. However, for this particular case, #32 should fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants