From 4b5dbec747c44b4d83a194075db601620f7bc659 Mon Sep 17 00:00:00 2001 From: robin Date: Sun, 23 Jul 2023 21:09:31 +0000 Subject: [PATCH] hopefully final changes --- schemas/api-config/dashboard.json | 65 ++++++++++++------------------- 1 file changed, 25 insertions(+), 40 deletions(-) diff --git a/schemas/api-config/dashboard.json b/schemas/api-config/dashboard.json index 6c1ab46..d32d5c9 100644 --- a/schemas/api-config/dashboard.json +++ b/schemas/api-config/dashboard.json @@ -13,7 +13,8 @@ { "$ref": "#/definitions/swiper" }, { "$ref": "#/definitions/graph" }, { "$ref": "#/definitions/table" }, - { "$ref": "#/definitions/reference" } + { "$ref": "#/definitions/reference" }, + { "$ref": "#/definitions/comparison" } ] } }, @@ -64,9 +65,14 @@ "required": ["type", "elements"], "additionalProperties": false }, + "comparison": { + "$ref": "#/definitions/graph" + }, + "graph": { "type": "object", "properties": { + "class": { "type": "string" }, "type": { "type": "string", "enum": ["graph"] }, "containerProps": { "$ref": "#/definitions/containerProps" }, "title": { @@ -216,44 +222,29 @@ "items": { "type": "string" } }, "additionalApiParams": { - "type": "array", - "items": { "$ref": "#/definitions/apiParams" } + "type": "object", + "properties": { + "offset": { "type": "number" }, + "limit": { "type": "number" }, + "sort": { "type": "string" }, + "filter": { + "type": "object", + "additionalProperties": true + }, + "projection": { "type": "string" }, + "count": { "type": "number", "enum": [1] } + }, + "additionalProperties": false } }, "required": ["type", "columns"], "additionalProperties": false }, - "apiParams": { - "type": "object", - "properties": { - "offset": { "type": "number" }, - "limit": { "type": "number" }, - "sort": { "type": "string" }, - "filter": { - "type": "object", - "additionalProperties": true - }, - "projection": { "type": "string" }, - "count": { "type": "number", "enum": [1] } - }, - "additionalProperties": false - }, + "reference": { "type": "object", "properties": { "type": { "type": "string", "enum": ["reference"] }, - "title": { - "oneOf": [ - { - "type": "object", - "properties": { - "de": { "type": "string" }, - "en": { "type": "string" } - } - }, - { "type": "string" } - ] - }, "newPageRef": { "type": "boolean" }, "collection": { "type": "string" }, "style": { @@ -265,21 +256,17 @@ }, "subNavigation": { "type": "number" } }, - "required": ["type", "title"], + "required": ["type"], "additionalProperties": false }, "minorItem": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": ["graph", "table", "reference"] - }, "collection": { "type": "string" }, "subNavigation": { "type": "number" }, "newPageRef": { "type": "boolean" } }, - "required": ["type", "collection", "subNavigation"], + "required": ["collection"], "additionalProperties": false }, @@ -299,11 +286,9 @@ "default": { "type": "string" }, "small": { "type": "string" }, "large": { "type": "string" } - }, - "required": ["default", "small", "large"] + } } - }, - "required": ["breakBefore", "breakAfter", "size"] + } } }, "additionalProperties": false