Skip to content

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.0 and ...-3.0, at https://w3id.org/codemeta/3.0 and /4.0, and files use them interchangeably. The parser accepts any @context string that names CodeMeta and rejects structured JSON-LD context objects.
  • Files write the JSON-LD keywords with and without the @: type/id and @type/@id both appear (JSON-LD 1.1 aliases the bare spellings). Both map to the same fields.
  • @context can 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: programmingLanguage carries a ComputerLanguage object, and softwareSuggestions carries SoftwareApplication objects. Named R dependency lists reach softwareRequirements as a keyed object ({"1": {...}, "2": {...}}) whose entries may be null. The parser accepts objects and strings, flattens the keyed form in key order, and drops null entries.
  • CodeMeta renames terms across versions: CodeMeta 2.0 spells the continuous integration URL contIntegration, 3.0 renamed it to continuousIntegration. The parser reads either spelling into continuous_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, has audience. 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 @context and @type; everything else is optional and None when absent.

CITATION.cff

  • cff-version values in the wild do not follow the published version series: the kani repository declares 1.0.0, which the format never released. The parser checks the 1.2.3 shape 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-citation has publisher: Association for Computational Linguistics. The entity fields (publisher, conference, institution, database-provider, location) accept both forms.
  • The 1.2.0 schema sets additionalProperties: false at the top level, and files violate it: the imodels repository carries journal at 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.0 loads as the float 1.0. The string fields turn such numbers back into "1.0".
  • The schema requires orcid values to match https://orcid.org/<12 digits with check digit>, but older files use http:// URLs or bare ids. The parser enforces the 1.2.0 pattern, so those fail validation.
  • A date-released written as an unquoted YAML date arrives as a datetime.date object 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-names for a person, name for 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.0 and carry 1.3.0 terms: the cffconvert repository's CITATION.cff carries relation on identifiers and top-level contributors, which the 1.2.0 schema does not define. The parser rejects such files, as with any unknown key.