Stream: dev

Topic: What is collection JSON Schema good for?


view this post on Zulip Balázs Pataki (Mar 03 2026 at 18:31):

So, we can retrieve the JSON Schema for a collection like this:

https://guides.dataverse.org/en/latest/api/native-api.html#retrieve-a-dataset-json-schema-for-a-collection

However, the JSON Schema it returns is very minimal and doesn’t seem sufficient to properly validate even the smallest possible dataset. It includes the names of required properties, but that alone isn’t enough to make a JSON document valid. For example, the schema specifies that the author property must be present, but it doesn’t define that it is an object that should contain an authorName property.

What I was actually hoping for is a JSON Schema that defines every property of every metadata block enabled for a given collection. That way, I could validate Dataverse native-API JSON documents (e.g., https://dataverse.harvard.edu/api/datasets/export?exporter=dataverse_json&persistentId=doi%3A10.7910/DVN/RUDR3T), or use the schema to correctly author such JSON files for later upload.

I would expect something similar to the data returned by the /api/dataverses/root/metadatablocks?returnDatasetFieldTypes=true endpoint, which is used in the SPA as well, I think.

view this post on Zulip Philip Durbin 🚀 (Mar 03 2026 at 19:03):

So, @Oliver Bertuch originally asked for this feature in https://github.com/IQSS/dataverse-pm/issues/26 and I think the request made sense: "As a system integrator, I would appreciate a JSON Schema for validating my dataset JSON before uploading via API".

Then it got broken up into sub issues and implemented in a few PRs. Oliver, what do you think? Did you get what you asked for? What is JSON Schema you can download from a collection good for?


Last updated: Apr 03 2026 at 06:08 UTC