diff options
Diffstat (limited to 'timeline.schema.json')
-rw-r--r-- | timeline.schema.json | 57 |
1 files changed, 30 insertions, 27 deletions
diff --git a/timeline.schema.json b/timeline.schema.json index 2d8c6ff..75c5265 100644 --- a/timeline.schema.json +++ b/timeline.schema.json @@ -2,6 +2,22 @@ "$ref": "#/definitions/timeline", "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { + "anySlide": { + "anyOf": [ + { + "$ref": "#/definitions/slide" + }, + { + "$ref": "#/definitions/delaySlide" + }, + { + "$ref": "#/definitions/speedChangeSlide" + }, + { + "$ref": "#/definitions/loopSlide" + } + ] + }, "delaySlide": { "additionalProperties": false, "properties": { @@ -22,7 +38,7 @@ "type": "string" }, "type": { - "$ref": "#/definitions/keyframeTypes" + "$ref": "#/definitions/slideTypes" } }, "required": [ @@ -34,15 +50,6 @@ ], "type": "object" }, - "keyframeTypes": { - "enum": [ - "default", - "delay", - "speedChange", - "loop" - ], - "type": "string" - }, "loopSlide": { "additionalProperties": false, "properties": { @@ -70,7 +77,7 @@ "type": "string" }, "type": { - "$ref": "#/definitions/keyframeTypes" + "$ref": "#/definitions/slideTypes" } }, "required": [ @@ -113,7 +120,7 @@ "type": "string" }, "type": { - "$ref": "#/definitions/keyframeTypes" + "$ref": "#/definitions/slideTypes" } }, "required": [ @@ -124,6 +131,15 @@ ], "type": "object" }, + "slideTypes": { + "enum": [ + "default", + "delay", + "speedChange", + "loop" + ], + "type": "string" + }, "speedChangeSlide": { "additionalProperties": false, "properties": { @@ -144,7 +160,7 @@ "type": "number" }, "type": { - "$ref": "#/definitions/keyframeTypes" + "$ref": "#/definitions/slideTypes" } }, "required": [ @@ -173,20 +189,7 @@ }, "slides": { "items": { - "anyOf": [ - { - "$ref": "#/definitions/slide" - }, - { - "$ref": "#/definitions/delaySlide" - }, - { - "$ref": "#/definitions/speedChangeSlide" - }, - { - "$ref": "#/definitions/loopSlide" - } - ] + "$ref": "#/definitions/anySlide" }, "type": "array" } |