From d7db13a02eede35d5e25f47986bb02e48970167a Mon Sep 17 00:00:00 2001 From: James Mockett <1166188+jamesmockett@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:20:14 +0100 Subject: [PATCH] Update schemas --- .../src/model/article-schema.json | 378 +++++++++--------- dotcom-rendering/src/model/block-schema.json | 378 +++++++++--------- 2 files changed, 378 insertions(+), 378 deletions(-) diff --git a/dotcom-rendering/src/model/article-schema.json b/dotcom-rendering/src/model/article-schema.json index 0456d862156..9218fdea6bc 100644 --- a/dotcom-rendering/src/model/article-schema.json +++ b/dotcom-rendering/src/model/article-schema.json @@ -474,6 +474,9 @@ "definitions": { "FEElement": { "anyOf": [ + { + "$ref": "#/definitions/AdPlaceholderBlockElement" + }, { "$ref": "#/definitions/AudioAtomBlockElement" }, @@ -498,9 +501,6 @@ { "$ref": "#/definitions/ChartAtomBlockElement" }, - { - "$ref": "#/definitions/QuizAtomBlockElement" - }, { "$ref": "#/definitions/CodeBlockElement" }, @@ -547,16 +547,13 @@ "$ref": "#/definitions/InteractiveAtomBlockElement" }, { - "$ref": "#/definitions/InteractiveBlockElement" - }, - { - "$ref": "#/definitions/ItemLinkBlockElement" + "$ref": "#/definitions/InteractiveContentsBlockElement" }, { - "$ref": "#/definitions/AdPlaceholderBlockElement" + "$ref": "#/definitions/InteractiveBlockElement" }, { - "$ref": "#/definitions/InteractiveContentsBlockElement" + "$ref": "#/definitions/ItemLinkBlockElement" }, { "$ref": "#/definitions/KeyTakeawaysBlockElement" @@ -594,6 +591,9 @@ { "$ref": "#/definitions/QABlockElement" }, + { + "$ref": "#/definitions/QuizAtomBlockElement" + }, { "$ref": "#/definitions/RichLinkBlockElement" }, @@ -748,6 +748,18 @@ } ] }, + "AdPlaceholderBlockElement": { + "type": "object", + "properties": { + "_type": { + "type": "string", + "const": "model.dotcomrendering.pageElements.AdPlaceholderBlockElement" + } + }, + "required": [ + "_type" + ] + }, "AudioAtomBlockElement": { "type": "object", "properties": { @@ -1516,142 +1528,6 @@ "url" ] }, - "QuizAtomBlockElement": { - "type": "object", - "properties": { - "_type": { - "type": "string", - "const": "model.dotcomrendering.pageElements.QuizAtomBlockElement" - }, - "elementId": { - "type": "string" - }, - "quizType": { - "enum": [ - "knowledge", - "personality" - ], - "type": "string" - }, - "id": { - "type": "string" - }, - "questions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "text": { - "type": "string" - }, - "answers": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "text": { - "type": "string" - }, - "revealText": { - "type": "string" - }, - "isCorrect": { - "type": "boolean" - }, - "answerBuckets": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "answerBuckets", - "id", - "isCorrect", - "text" - ] - } - }, - "imageUrl": { - "type": "string" - }, - "imageAlt": { - "type": "string" - } - }, - "required": [ - "answers", - "id", - "text" - ] - } - }, - "resultBuckets": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "description", - "id", - "title" - ] - } - }, - "resultGroups": { - "type": "array", - "items": { - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "shareText": { - "type": "string" - }, - "minScore": { - "type": "number" - }, - "id": { - "type": "string" - } - }, - "required": [ - "id", - "minScore", - "shareText", - "title" - ] - } - } - }, - "required": [ - "_type", - "elementId", - "id", - "questions", - "quizType", - "resultBuckets", - "resultGroups" - ] - }, "CodeBlockElement": { "type": "object", "properties": { @@ -2320,46 +2196,38 @@ "url" ] }, - "InteractiveBlockElement": { + "InteractiveContentsBlockElement": { "type": "object", "properties": { "_type": { "type": "string", - "const": "model.dotcomrendering.pageElements.InteractiveBlockElement" + "const": "model.dotcomrendering.pageElements.InteractiveContentsBlockElement" }, "elementId": { "type": "string" }, - "url": { - "type": "string" - }, - "isMandatory": { - "type": "boolean" - }, - "scriptUrl": { - "type": "string" - }, - "alt": { - "type": "string" - }, - "role": { - "$ref": "#/definitions/RoleType" + "subheadingLinks": { + "type": "array", + "items": { + "$ref": "#/definitions/SubheadingBlockElement" + } }, - "caption": { + "endDocumentElementId": { "type": "string" } }, "required": [ "_type", - "elementId" + "elementId", + "subheadingLinks" ] }, - "ItemLinkBlockElement": { + "SubheadingBlockElement": { "type": "object", "properties": { "_type": { "type": "string", - "const": "model.dotcomrendering.pageElements.ItemLinkBlockElement" + "const": "model.dotcomrendering.pageElements.SubheadingBlockElement" }, "elementId": { "type": "string" @@ -2374,50 +2242,46 @@ "html" ] }, - "AdPlaceholderBlockElement": { - "type": "object", - "properties": { - "_type": { - "type": "string", - "const": "model.dotcomrendering.pageElements.AdPlaceholderBlockElement" - } - }, - "required": [ - "_type" - ] - }, - "InteractiveContentsBlockElement": { + "InteractiveBlockElement": { "type": "object", "properties": { "_type": { "type": "string", - "const": "model.dotcomrendering.pageElements.InteractiveContentsBlockElement" + "const": "model.dotcomrendering.pageElements.InteractiveBlockElement" }, "elementId": { "type": "string" }, - "subheadingLinks": { - "type": "array", - "items": { - "$ref": "#/definitions/SubheadingBlockElement" - } + "url": { + "type": "string" }, - "endDocumentElementId": { + "isMandatory": { + "type": "boolean" + }, + "scriptUrl": { + "type": "string" + }, + "alt": { + "type": "string" + }, + "role": { + "$ref": "#/definitions/RoleType" + }, + "caption": { "type": "string" } }, "required": [ "_type", - "elementId", - "subheadingLinks" + "elementId" ] }, - "SubheadingBlockElement": { + "ItemLinkBlockElement": { "type": "object", "properties": { "_type": { "type": "string", - "const": "model.dotcomrendering.pageElements.SubheadingBlockElement" + "const": "model.dotcomrendering.pageElements.ItemLinkBlockElement" }, "elementId": { "type": "string" @@ -2930,6 +2794,142 @@ "title" ] }, + "QuizAtomBlockElement": { + "type": "object", + "properties": { + "_type": { + "type": "string", + "const": "model.dotcomrendering.pageElements.QuizAtomBlockElement" + }, + "elementId": { + "type": "string" + }, + "quizType": { + "enum": [ + "knowledge", + "personality" + ], + "type": "string" + }, + "id": { + "type": "string" + }, + "questions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "text": { + "type": "string" + }, + "answers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "text": { + "type": "string" + }, + "revealText": { + "type": "string" + }, + "isCorrect": { + "type": "boolean" + }, + "answerBuckets": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "answerBuckets", + "id", + "isCorrect", + "text" + ] + } + }, + "imageUrl": { + "type": "string" + }, + "imageAlt": { + "type": "string" + } + }, + "required": [ + "answers", + "id", + "text" + ] + } + }, + "resultBuckets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "description", + "id", + "title" + ] + } + }, + "resultGroups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "shareText": { + "type": "string" + }, + "minScore": { + "type": "number" + }, + "id": { + "type": "string" + } + }, + "required": [ + "id", + "minScore", + "shareText", + "title" + ] + } + } + }, + "required": [ + "_type", + "elementId", + "id", + "questions", + "quizType", + "resultBuckets", + "resultGroups" + ] + }, "RichLinkBlockElement": { "type": "object", "properties": { diff --git a/dotcom-rendering/src/model/block-schema.json b/dotcom-rendering/src/model/block-schema.json index 20c257943ad..d4077bdf063 100644 --- a/dotcom-rendering/src/model/block-schema.json +++ b/dotcom-rendering/src/model/block-schema.json @@ -78,6 +78,9 @@ "definitions": { "FEElement": { "anyOf": [ + { + "$ref": "#/definitions/AdPlaceholderBlockElement" + }, { "$ref": "#/definitions/AudioAtomBlockElement" }, @@ -102,9 +105,6 @@ { "$ref": "#/definitions/ChartAtomBlockElement" }, - { - "$ref": "#/definitions/QuizAtomBlockElement" - }, { "$ref": "#/definitions/CodeBlockElement" }, @@ -151,16 +151,13 @@ "$ref": "#/definitions/InteractiveAtomBlockElement" }, { - "$ref": "#/definitions/InteractiveBlockElement" - }, - { - "$ref": "#/definitions/ItemLinkBlockElement" + "$ref": "#/definitions/InteractiveContentsBlockElement" }, { - "$ref": "#/definitions/AdPlaceholderBlockElement" + "$ref": "#/definitions/InteractiveBlockElement" }, { - "$ref": "#/definitions/InteractiveContentsBlockElement" + "$ref": "#/definitions/ItemLinkBlockElement" }, { "$ref": "#/definitions/KeyTakeawaysBlockElement" @@ -198,6 +195,9 @@ { "$ref": "#/definitions/QABlockElement" }, + { + "$ref": "#/definitions/QuizAtomBlockElement" + }, { "$ref": "#/definitions/RichLinkBlockElement" }, @@ -352,6 +352,18 @@ } ] }, + "AdPlaceholderBlockElement": { + "type": "object", + "properties": { + "_type": { + "type": "string", + "const": "model.dotcomrendering.pageElements.AdPlaceholderBlockElement" + } + }, + "required": [ + "_type" + ] + }, "AudioAtomBlockElement": { "type": "object", "properties": { @@ -1120,142 +1132,6 @@ "url" ] }, - "QuizAtomBlockElement": { - "type": "object", - "properties": { - "_type": { - "type": "string", - "const": "model.dotcomrendering.pageElements.QuizAtomBlockElement" - }, - "elementId": { - "type": "string" - }, - "quizType": { - "enum": [ - "knowledge", - "personality" - ], - "type": "string" - }, - "id": { - "type": "string" - }, - "questions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "text": { - "type": "string" - }, - "answers": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "text": { - "type": "string" - }, - "revealText": { - "type": "string" - }, - "isCorrect": { - "type": "boolean" - }, - "answerBuckets": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "answerBuckets", - "id", - "isCorrect", - "text" - ] - } - }, - "imageUrl": { - "type": "string" - }, - "imageAlt": { - "type": "string" - } - }, - "required": [ - "answers", - "id", - "text" - ] - } - }, - "resultBuckets": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "description", - "id", - "title" - ] - } - }, - "resultGroups": { - "type": "array", - "items": { - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "shareText": { - "type": "string" - }, - "minScore": { - "type": "number" - }, - "id": { - "type": "string" - } - }, - "required": [ - "id", - "minScore", - "shareText", - "title" - ] - } - } - }, - "required": [ - "_type", - "elementId", - "id", - "questions", - "quizType", - "resultBuckets", - "resultGroups" - ] - }, "CodeBlockElement": { "type": "object", "properties": { @@ -1924,46 +1800,38 @@ "url" ] }, - "InteractiveBlockElement": { + "InteractiveContentsBlockElement": { "type": "object", "properties": { "_type": { "type": "string", - "const": "model.dotcomrendering.pageElements.InteractiveBlockElement" + "const": "model.dotcomrendering.pageElements.InteractiveContentsBlockElement" }, "elementId": { "type": "string" }, - "url": { - "type": "string" - }, - "isMandatory": { - "type": "boolean" - }, - "scriptUrl": { - "type": "string" - }, - "alt": { - "type": "string" - }, - "role": { - "$ref": "#/definitions/RoleType" + "subheadingLinks": { + "type": "array", + "items": { + "$ref": "#/definitions/SubheadingBlockElement" + } }, - "caption": { + "endDocumentElementId": { "type": "string" } }, "required": [ "_type", - "elementId" + "elementId", + "subheadingLinks" ] }, - "ItemLinkBlockElement": { + "SubheadingBlockElement": { "type": "object", "properties": { "_type": { "type": "string", - "const": "model.dotcomrendering.pageElements.ItemLinkBlockElement" + "const": "model.dotcomrendering.pageElements.SubheadingBlockElement" }, "elementId": { "type": "string" @@ -1978,50 +1846,46 @@ "html" ] }, - "AdPlaceholderBlockElement": { - "type": "object", - "properties": { - "_type": { - "type": "string", - "const": "model.dotcomrendering.pageElements.AdPlaceholderBlockElement" - } - }, - "required": [ - "_type" - ] - }, - "InteractiveContentsBlockElement": { + "InteractiveBlockElement": { "type": "object", "properties": { "_type": { "type": "string", - "const": "model.dotcomrendering.pageElements.InteractiveContentsBlockElement" + "const": "model.dotcomrendering.pageElements.InteractiveBlockElement" }, "elementId": { "type": "string" }, - "subheadingLinks": { - "type": "array", - "items": { - "$ref": "#/definitions/SubheadingBlockElement" - } + "url": { + "type": "string" }, - "endDocumentElementId": { + "isMandatory": { + "type": "boolean" + }, + "scriptUrl": { + "type": "string" + }, + "alt": { + "type": "string" + }, + "role": { + "$ref": "#/definitions/RoleType" + }, + "caption": { "type": "string" } }, "required": [ "_type", - "elementId", - "subheadingLinks" + "elementId" ] }, - "SubheadingBlockElement": { + "ItemLinkBlockElement": { "type": "object", "properties": { "_type": { "type": "string", - "const": "model.dotcomrendering.pageElements.SubheadingBlockElement" + "const": "model.dotcomrendering.pageElements.ItemLinkBlockElement" }, "elementId": { "type": "string" @@ -2534,6 +2398,142 @@ "title" ] }, + "QuizAtomBlockElement": { + "type": "object", + "properties": { + "_type": { + "type": "string", + "const": "model.dotcomrendering.pageElements.QuizAtomBlockElement" + }, + "elementId": { + "type": "string" + }, + "quizType": { + "enum": [ + "knowledge", + "personality" + ], + "type": "string" + }, + "id": { + "type": "string" + }, + "questions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "text": { + "type": "string" + }, + "answers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "text": { + "type": "string" + }, + "revealText": { + "type": "string" + }, + "isCorrect": { + "type": "boolean" + }, + "answerBuckets": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "answerBuckets", + "id", + "isCorrect", + "text" + ] + } + }, + "imageUrl": { + "type": "string" + }, + "imageAlt": { + "type": "string" + } + }, + "required": [ + "answers", + "id", + "text" + ] + } + }, + "resultBuckets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "description", + "id", + "title" + ] + } + }, + "resultGroups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "shareText": { + "type": "string" + }, + "minScore": { + "type": "number" + }, + "id": { + "type": "string" + } + }, + "required": [ + "id", + "minScore", + "shareText", + "title" + ] + } + } + }, + "required": [ + "_type", + "elementId", + "id", + "questions", + "quizType", + "resultBuckets", + "resultGroups" + ] + }, "RichLinkBlockElement": { "type": "object", "properties": {