Skip to content

publicationYear type in JSON output is int whenever schema says it to be a regex matching string #1280

@yarikoptic

Description

@yarikoptic

Discovered in the course of the exploration of the "datacite metadata schema life-cycle" in

ATM datacite fabric returns records with publicationYear as int, although original schema in XSD (https://github.com/datacite/schema/blob/e39faa8ee9b28ac4b5806b5b77daa1a1d0c304f4/source/meta/kernel-4/metadata.xsd#L679) states it to be "YearType" to be a string, or in Documentation (https://datacite-metadata-schema.readthedocs.io/en/4.5/properties/publicationyear/#publicationyear) does not state it to be numeric; and even JSON examples (e.g. https://github.com/datacite/schema/blob/e39faa8ee9b28ac4b5806b5b77daa1a1d0c304f4/source/json/kernel-4.3/example/datacite-example-video-v4.json#L46) have it as string.

Even if I see more sense for it to be a numeric, with a reasonable range defined for validation, I think returned value should conform to the original schema and thus be a string across different serializations.

Or, alternatively -- is there a JSON model of "datacite output records" (as opposed to input)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions