From eb2d99747e63d5710bd713c184743699a4242dff Mon Sep 17 00:00:00 2001 From: Sebastien Besson Date: Mon, 31 Jan 2022 16:34:48 +0000 Subject: [PATCH 1/2] Add example of dataset with missing scale element --- 0.4/examples/invalid/missing_scale.json | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 0.4/examples/invalid/missing_scale.json diff --git a/0.4/examples/invalid/missing_scale.json b/0.4/examples/invalid/missing_scale.json new file mode 100644 index 00000000..ed863677 --- /dev/null +++ b/0.4/examples/invalid/missing_scale.json @@ -0,0 +1,30 @@ +{ + "multiscales": [ + { + "axes": [ + { + "name": "y", + "type": "space", + "units": "micrometer" + }, + { + "name": "x", + "type": "space", + "units": "micrometer" + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "translation": [1, 1], + "type": "translation" + } + ] + } + ], + "version": "0.4" + } + ] +} \ No newline at end of file From b993d8b0ac59d3dfa129d51e9cadf53941eee0c6 Mon Sep 17 00:00:00 2001 From: Sebastien Besson Date: Mon, 31 Jan 2022 16:35:07 +0000 Subject: [PATCH 2/2] Add containment requirement for scale element in coordinateTransformations --- 0.4/schemas/image.schema | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/0.4/schemas/image.schema b/0.4/schemas/image.schema index 4b728f14..4558d7f0 100644 --- a/0.4/schemas/image.schema +++ b/0.4/schemas/image.schema @@ -26,6 +26,24 @@ "coordinateTransformations": { "type": "array", "minItems": 1, + "contains": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "scale" + ] + }, + "scale": { + "type": "array", + "minItems": 2, + "items": { + "type": "number" + } + } + } + }, "items": { "oneOf": [ {