From 04f896d2cf0d75fa97b3a59c3a3bc215e34fcceb Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Thu, 6 Oct 2022 14:50:48 +0100 Subject: [PATCH] Duration, Height and Width should be a positive integer --- schema/iiif_3_0.json | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/schema/iiif_3_0.json b/schema/iiif_3_0.json index dbe958c..104d50d 100644 --- a/schema/iiif_3_0.json +++ b/schema/iiif_3_0.json @@ -23,6 +23,10 @@ }, "additionalProperties": false }, + "dimension": { + "type": "integer", + "exclusiveMinimum": 0 + }, "keyValueString": { "type": "object", "properties": { @@ -59,7 +63,7 @@ }, "duration": { "type": "number", - "minimum": 0 + "exclusiveMinimum": 0 }, "external": { "type": "array", @@ -138,15 +142,9 @@ "type": { "type": "string" }, - "height": { - "type": "integer" - }, - "width": { - "type": "integer" - }, - "duration": { - "$ref": "#/types/duration" - }, + "height": { "$ref": "#/types/dimension" }, + "width": { "$ref": "#/types/dimension" }, + "duration": { "$ref": "#/types/duration" }, "language": { "type": "string"}, "service": { "$ref": "#/classes/service" }, "format": { "$ref": "#/types/format" }, @@ -531,15 +529,9 @@ "pattern": "^Canvas$", "default": "Canvas" }, - "height": { - "type": "integer" - }, - "width": { - "type": "integer" - }, - "duration": { - "$ref": "#/types/duration" - }, + "height": { "$ref": "#/types/dimension" }, + "width": { "$ref": "#/types/dimension" }, + "duration": { "$ref": "#/types/duration" }, "metadata": { "$ref": "#/classes/metadata" }, "summary": { "$ref": "#/types/lngString" }, "requiredStatement": { "$ref": "#/types/keyValueString" },