{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/BioImageTools/zarr-convention-provenance/refs/tags/v0.2.0/schema.json", "title": "provenance Zarr convention", "description": "The processing steps that produced or modified a Zarr node. Validates a Zarr v3 node document (zarr.json) or a bare attributes object (a Zarr v2 .zattrs).", "anyOf": [{ "$ref": "#/$defs/zarr_v3_node" }, { "$ref": "#/$defs/attributes" }], "$defs": { "zarr_v3_node": { "type": "object", "required": ["zarr_format", "node_type", "attributes"], "properties": { "zarr_format": { "type": "integer" }, "node_type": { "type": "string", "enum": ["array", "group"] }, "attributes": { "$ref": "#/$defs/attributes" } } }, "attributes": { "type": "object", "required": ["zarr_conventions", "provenance:steps"], "properties": { "zarr_conventions": { "type": "array", "contains": { "$ref": "#/$defs/convention_metadata" } }, "provenance:steps": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/step" } } } }, "convention_metadata": { "type": "object", "anyOf": [{ "required": ["schema_url"] }, { "required": ["spec_url"] }, { "required": ["uuid"] }], "properties": { "schema_url": { "const": "https://raw.githubusercontent.com/BioImageTools/zarr-convention-provenance/refs/tags/v0.2.0/schema.json" }, "spec_url": { "const": "https://github.com/BioImageTools/zarr-convention-provenance/blob/v0.2.0/README.md" }, "uuid": { "const": "0d4ef942-0f74-4187-ae72-016ddf083fe1" }, "name": { "const": "provenance:" }, "description": { "type": "string" } }, "additionalProperties": false }, "step": { "type": "object", "required": ["software"], "properties": { "software": { "$ref": "#/$defs/software" }, "name": { "type": "string", "minLength": 1 }, "category": { "type": "string", "minLength": 1 }, "category_terms": { "type": "array", "items": { "$ref": "#/$defs/term" } }, "description": { "type": "string" }, "parameters": { "type": "object" }, "inputs": { "type": "array", "items": { "$ref": "#/$defs/data_reference" } }, "outputs": { "type": "array", "items": { "$ref": "#/$defs/data_reference" } }, "started": { "$ref": "#/$defs/date_time" }, "ended": { "$ref": "#/$defs/date_time" }, "environment": { "$ref": "#/$defs/data_reference" } } }, "software": { "type": "object", "required": ["name", "version"], "properties": { "name": { "type": "string", "minLength": 1 }, "version": { "type": "string", "minLength": 1 }, "entry_point": { "type": "string", "minLength": 1 }, "uri": { "type": "string", "format": "uri" } } }, "data_reference": { "type": "object", "anyOf": [{ "required": ["path"] }, { "required": ["uri"] }, { "required": ["id"] }], "properties": { "path": { "type": "string", "minLength": 1 }, "uri": { "type": "string", "format": "uri" }, "id": { "type": "string", "minLength": 1 }, "name": { "type": "string" }, "type": { "$ref": "#/$defs/term" }, "format": { "$ref": "#/$defs/term" }, "checksum": { "$ref": "#/$defs/checksum" } } }, "term": { "type": "object", "properties": { "uri": { "type": "string", "format": "uri" }, "label": { "type": "string", "minLength": 1 }, "ontology": { "type": "string", "minLength": 1 } } }, "checksum": { "type": "string", "pattern": "^[a-z0-9-]+:[0-9a-f]+$" }, "date_time": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$" } } }