Add support for multiple types
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, json
Direzione di ricerca
Start by locating the validator code that checks JSON-LD @type and reports “Wrong document type”; the issue does not name a file or test. Determine how it handles multiple types and whether fields from both types can be used. Done means the validator accepts a valid record with both SoftwareSourceCode and SoftwareApplication types; the issue provides no test entry point.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I'm working to convert a full schema.org json-ld record for software into a codemeta and am having problems with the codemeta validator. The json validates on https://validator.schema.org/. Pasting the first few lines
{
"@context": {
"@vocab": "https://schema.org/",
"prov": "http://www.w3.org/ns/prov#",
"sosa": "https://w3c.github.io/sdw-sosa-ssn/ssn/#SOSA"
},
"@id": "https://doi.org/10.5281/zenodo.591887",
"@type": ["SoftwareSourceCode", "SoftwareApplication"]
}
into the codemeta validator gives the error
Wrong document type: must be "SoftwareSourceCode"/"SoftwareApplication", not ["SoftwareSourceCode","SoftwareApplication"]
This error makes no sense to me because SoftwareApplication is not lower on the tree than SoftwareSourceCode. But when I change the line to be as instructed anyway,
{
"@context": {
"@vocab": "https://schema.org/",
"prov": "http://www.w3.org/ns/prov#",
"sosa": "https://w3c.github.io/sdw-sosa-ssn/ssn/#SOSA"
},
"@id": "https://doi.org/10.5281/zenodo.591887",
"@type": "SoftwareSourceCode"/"SoftwareApplication"
}
I still get the error
Could not read codemeta document because it is not valid JSON (SyntaxError: Expected ',' or '}' after property value in JSON at position 256 (line 8 column 34)). Check for missing or extra quote, colon, or bracket characters.
Any ideas? Can the codemeta validator be updated to accept multiple types so that the fields from both can be used?
If codemeta is aligned more with schema.org, we could lean more on the schema.org validator instead of making a completely new one. Then, all we would need to do is check the schema.org validator for errors, and if it passes, then just check that the terms codemeta has selected are used (e.g. author instead of creator).
- Lingua principale
- JavaScript
- Stelle
- 23
- Fork
- 17
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di codemeta/codemeta-generator
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
codemeta/codemeta-generator#94 · 1 commento ·
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 58/100
codemeta/codemeta-generator#93 · 3 commenti ·
-
Validation: softwareRequirements requires URLs, but specifications requests type SoftwareSourceCodeApertaenhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 54/100
codemeta/codemeta-generator#92 · 4 commenti ·
-
enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
codemeta/codemeta-generator#86 · 1 commento ·
Tutte le issue di codemeta/codemeta-generator
Issue simili
-
area:models enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
status: ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
melodic-software/claude-code-plugins#14389 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100