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

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

Open
yarikoptic opened this issue Nov 19, 2024 · 0 comments

Comments

@yarikoptic
Copy link

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)?

@yarikoptic yarikoptic changed the title publicationYear type in JSON output is int whenever schema does not say it to be non-string publicationYear type in JSON output is int whenever schema says it to be a regex matching string Nov 19, 2024
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

No branches or pull requests

1 participant