diff --git a/dotcom-rendering/src/model/editions-crossword-schema.json b/dotcom-rendering/src/model/editions-crossword-schema.json index 82e1a0b11b2..05c014698e4 100644 --- a/dotcom-rendering/src/model/editions-crossword-schema.json +++ b/dotcom-rendering/src/model/editions-crossword-schema.json @@ -1,346 +1,180 @@ { "type": "object", "properties": { - "quick": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "number": { - "type": "number" - }, - "date": { - "type": "string" - }, - "dimensions": { - "type": "object", - "properties": { - "cols": { - "type": "number" - }, - "rows": { - "type": "number" - } + "crosswords": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" }, - "required": [ - "cols", - "rows" - ] - }, - "entries": { - "type": "array", - "items": { + "type": { + "type": "string" + }, + "number": { + "type": "number" + }, + "date": { + "type": "string" + }, + "dimensions": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "number": { + "cols": { "type": "number" }, - "humanNumber": { - "type": "string" - }, - "direction": { - "enum": [ - "across", - "down" - ], - "type": "string" - }, - "position": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - }, - "required": [ - "x", - "y" - ] - }, - "separatorLocations": { - "type": "object", - "properties": { - ",": { - "type": "array", - "items": { - "type": "number" - } - }, - "-": { - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "length": { + "rows": { "type": "number" - }, - "clue": { - "type": "string" - }, - "group": { - "type": "array", - "items": { - "type": "string" - } - }, - "solution": { - "type": "string" - }, - "format": { - "type": "string" } }, "required": [ - "clue", - "direction", - "format", - "group", - "humanNumber", - "id", - "length", - "number", - "position", - "separatorLocations", - "solution" + "cols", + "rows" ] - } - }, - "solutionAvailable": { - "type": "boolean" - }, - "hasNumbers": { - "type": "boolean" - }, - "randomCluesOrdering": { - "type": "boolean" - }, - "instructions": { - "type": "string" - }, - "creator": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "webUrl": { - "type": "string" - } - }, - "required": [ - "name", - "webUrl" - ] - }, - "pdf": { - "type": "string" - }, - "annotatedSolution": { - "type": "string" - }, - "dateSolutionAvailable": { - "type": "string" - } - }, - "required": [ - "date", - "dateSolutionAvailable", - "dimensions", - "entries", - "hasNumbers", - "name", - "number", - "pdf", - "randomCluesOrdering", - "solutionAvailable", - "type" - ] - }, - "cryptic": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "number": { - "type": "number" - }, - "date": { - "type": "string" - }, - "dimensions": { - "type": "object", - "properties": { - "cols": { - "type": "number" - }, - "rows": { - "type": "number" - } }, - "required": [ - "cols", - "rows" - ] - }, - "entries": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "number": { - "type": "number" - }, - "humanNumber": { - "type": "string" - }, - "direction": { - "enum": [ - "across", - "down" - ], - "type": "string" - }, - "position": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - } + "entries": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - "required": [ - "x", - "y" - ] - }, - "separatorLocations": { - "type": "object", - "properties": { - ",": { - "type": "array", - "items": { + "number": { + "type": "number" + }, + "humanNumber": { + "type": "string" + }, + "direction": { + "enum": [ + "across", + "down" + ], + "type": "string" + }, + "position": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { "type": "number" } }, - "-": { - "type": "array", - "items": { - "type": "number" + "required": [ + "x", + "y" + ] + }, + "separatorLocations": { + "type": "object", + "properties": { + ",": { + "type": "array", + "items": { + "type": "number" + } + }, + "-": { + "type": "array", + "items": { + "type": "number" + } } } - } - }, - "length": { - "type": "number" - }, - "clue": { - "type": "string" - }, - "group": { - "type": "array", - "items": { + }, + "length": { + "type": "number" + }, + "clue": { + "type": "string" + }, + "group": { + "type": "array", + "items": { + "type": "string" + } + }, + "solution": { + "type": "string" + }, + "format": { "type": "string" } }, - "solution": { + "required": [ + "clue", + "direction", + "format", + "group", + "humanNumber", + "id", + "length", + "number", + "position", + "separatorLocations", + "solution" + ] + } + }, + "solutionAvailable": { + "type": "boolean" + }, + "hasNumbers": { + "type": "boolean" + }, + "randomCluesOrdering": { + "type": "boolean" + }, + "instructions": { + "type": "string" + }, + "creator": { + "type": "object", + "properties": { + "name": { "type": "string" }, - "format": { + "webUrl": { "type": "string" } }, "required": [ - "clue", - "direction", - "format", - "group", - "humanNumber", - "id", - "length", - "number", - "position", - "separatorLocations", - "solution" + "name", + "webUrl" ] - } - }, - "solutionAvailable": { - "type": "boolean" - }, - "hasNumbers": { - "type": "boolean" - }, - "randomCluesOrdering": { - "type": "boolean" - }, - "instructions": { - "type": "string" - }, - "creator": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "webUrl": { - "type": "string" - } }, - "required": [ - "name", - "webUrl" - ] - }, - "pdf": { - "type": "string" - }, - "annotatedSolution": { - "type": "string" + "pdf": { + "type": "string" + }, + "annotatedSolution": { + "type": "string" + }, + "dateSolutionAvailable": { + "type": "string" + } }, - "dateSolutionAvailable": { - "type": "string" - } - }, - "required": [ - "date", - "dateSolutionAvailable", - "dimensions", - "entries", - "hasNumbers", - "name", - "number", - "pdf", - "randomCluesOrdering", - "solutionAvailable", - "type" - ] + "required": [ + "date", + "dateSolutionAvailable", + "dimensions", + "entries", + "hasNumbers", + "name", + "number", + "pdf", + "randomCluesOrdering", + "solutionAvailable", + "type" + ] + } } }, "required": [ - "cryptic", - "quick" + "crosswords" ], "$schema": "http://json-schema.org/draft-07/schema#" } \ No newline at end of file diff --git a/dotcom-rendering/src/types/editionsCrossword.ts b/dotcom-rendering/src/types/editionsCrossword.ts index 7950e21f2e9..67edf717f16 100644 --- a/dotcom-rendering/src/types/editionsCrossword.ts +++ b/dotcom-rendering/src/types/editionsCrossword.ts @@ -1,6 +1,5 @@ export type FEEditionsCrosswords = { - quick: FEEditionsCrossword; - cryptic: FEEditionsCrossword; + crosswords: FEEditionsCrossword[]; }; type FECrosswordEntry = {