Upstream quirks
This page lists where real codemeta.json and CITATION.cff files drift
from their published specifications. The facts come from real files in
public repositories, the published CodeMeta 2.0, 3.0, and 4.0 context
files, and the CFF 1.2.0 JSON Schema; each entry says what
bibliofabric.codemeta does about it.
codemeta.json
- The context URL is not one string. Published contexts answer at
https://doi.org/10.5063/schema/codemeta-2.0and...-3.0, athttps://w3id.org/codemeta/3.0and/4.0, and files use them interchangeably. The parser accepts any@contextstring that names CodeMeta and rejects structured JSON-LD context objects. - Files write the JSON-LD keywords with and without the
@:type/idand@type/@idboth appear (JSON-LD 1.1 aliases the bare spellings). Both map to the same fields. @contextcan be an array: rcrossref's codemeta.json, generated by codemetar, carries["http://purl.org/codemeta/2.0", "http://schema.org"]. The parser accepts an array when one string entry names CodeMeta and stores that entry; a structured context object still raises.- codemetar fills dependency terms with objects, not strings:
programmingLanguagecarries aComputerLanguageobject, andsoftwareSuggestionscarriesSoftwareApplicationobjects. Named R dependency lists reachsoftwareRequirementsas a keyed object ({"1": {...}, "2": {...}}) whose entries may benull. The parser accepts objects and strings, flattens the keyed form in key order, and dropsnullentries. - CodeMeta renames terms across versions: CodeMeta 2.0 spells the
continuous integration URL
contIntegration, 3.0 renamed it tocontinuousIntegration. The parser reads either spelling intocontinuous_integration, and its field list covers the union of the published contexts, so a 2.0-era file parses like a current one. - Files carry schema.org keys that are not CodeMeta terms. Parsl's
codemeta.json, for example, hasaudience. The parser rejects such keys instead of absorbing them, because the point of the vocabulary is to catch drift. - schema.org dates allow year or year-month forms, and schema.org properties allow a single object where files usually carry lists. The model requires full ISO dates and wraps single objects into lists.
- CodeMeta publishes no required-property list, so the parser requires
only
@contextand@type; everything else is optional andNonewhen absent.
CITATION.cff
cff-versionvalues in the wild do not follow the published version series: the kani repository declares1.0.0, which the format never released. The parser checks the1.2.3shape and validates the body against the 1.2.0 schema, so older files parse when their keys fit.- CFF 1.0.x files write plain strings where the 1.2.0 schema wants an
entity object: kani's
preferred-citationhaspublisher: Association for Computational Linguistics. The entity fields (publisher,conference,institution,database-provider,location) accept both forms. - The 1.2.0 schema sets
additionalProperties: falseat the top level, and files violate it: the imodels repository carriesjournalat the top level, which belongs on a reference. The parser rejects such keys, naming the offending key in the message. - Unquoted YAML scalars become numbers:
version: 1.0loads as the float1.0. The string fields turn such numbers back into"1.0". - The schema requires
orcidvalues to matchhttps://orcid.org/<12 digits with check digit>, but older files usehttp://URLs or bare ids. The parser enforces the 1.2.0 pattern, so those fail validation. - A
date-releasedwritten as an unquoted YAML date arrives as adatetime.dateobject and parses the same as a quoted string. - An author mapping fits whichever side of the person/entity split
carries its keys:
given-names/family-namesfor a person,namefor an entity. A mapping with only shared keys (an email and an ORCID, say) parses as a person. - Files can declare
cff-version: 1.2.0and carry 1.3.0 terms: the cffconvert repository'sCITATION.cffcarriesrelationon identifiers and top-levelcontributors, which the 1.2.0 schema does not define. The parser rejects such files, as with any unknown key.