diff --git a/Dockerfile b/Dockerfile index 6e2c7c75..f624cca6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,8 @@ COPY package.json package-lock.json ./ RUN npm install COPY ./vite.config.ts ./vite.demo.config.ts ./extensions.json ./tsconfig.json ./tsconfig.node.json ./ COPY ./packages ./packages +COPY ./options_tester.cjs ./options_tester.cjs + RUN VITE_TARGET_ENVIRONMENT=${TARGET_ENVIRONMENT} npm run build RUN VITE_TARGET_ENVIRONMENT=${TARGET_ENVIRONMENT} npm run build:demo diff --git a/build.sh b/build.sh new file mode 100644 index 00000000..5b10f837 --- /dev/null +++ b/build.sh @@ -0,0 +1,2 @@ +tsc --resolveJsonModule --esModuleInterop options_tester.ts +mv options_tester.js options_tester.cjs \ No newline at end of file diff --git a/options_tester.cjs b/options_tester.cjs new file mode 100644 index 00000000..9fdfc808 --- /dev/null +++ b/options_tester.cjs @@ -0,0 +1,21 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var options_schema_json_1 = __importDefault(require("./packages/lib/src/interfaces/options.schema.json")); +var schemasafe_1 = require("@exodus/schemasafe"); +var options_json_1 = __importDefault(require("./packages/demo/public/options.json")); +console.log("Checking Lens options"); +var parse = (0, schemasafe_1.parser)(options_schema_json_1.default, { + includeErrors: true, + allErrors: true, +}); +var validJSON = parse(JSON.stringify(options_json_1.default)); +if (validJSON.valid === true) { + console.log("Options are valid"); +} +else if (typeof options_json_1.default === "object") { + console.error("Lens-Options are not conform with the JSON schema", validJSON.errors); + process.exit(1); +} diff --git a/options_tester.ts b/options_tester.ts new file mode 100644 index 00000000..296c6d26 --- /dev/null +++ b/options_tester.ts @@ -0,0 +1,21 @@ +import optionsSchema from "./packages/lib/src/interfaces/options.schema.json"; +import { parser } from "@exodus/schemasafe"; + +import options from "./packages/demo/public/options.json"; + +console.log("Checking Lens options"); + +const parse = parser(optionsSchema, { + includeErrors: true, + allErrors: true, +}); +const validJSON = parse(JSON.stringify(options)); +if (validJSON.valid === true) { + console.log("Options are valid"); +} else if (typeof options === "object") { + console.error( + "Lens-Options are not conform with the JSON schema", + validJSON.errors, + ); + process.exit(1); +} diff --git a/package-lock.json b/package-lock.json index 174d0715..165a14b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.1.0", "license": "MIT", "dependencies": { + "@exodus/schemasafe": "^1.3.0", "chart.js": "^4.4.0", "uuid": "^9.0.0" }, @@ -644,54 +645,6 @@ "node": ">=16" } }, - "node_modules/@esbuild/android-arm": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", - "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", - "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", - "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/@esbuild/darwin-arm64": { "version": "0.18.20", "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", @@ -708,294 +661,6 @@ "node": ">=12" } }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", - "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", - "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", - "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", - "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", - "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", - "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", - "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", - "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", - "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", - "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", - "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", - "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", - "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", - "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", - "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", - "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", - "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", - "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -1052,6 +717,11 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@exodus/schemasafe": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@exodus/schemasafe/-/schemasafe-1.3.0.tgz", + "integrity": "sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw==" + }, "node_modules/@hapi/hoek": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", diff --git a/package.json b/package.json index a3da007d..1151e188 100644 --- a/package.json +++ b/package.json @@ -30,9 +30,9 @@ "start": "npm run dev -s", "dev": "vite --config vite.demo.config.ts", "build": "vite build", - "build:demo": "vite build --config vite.demo.config.ts", + "build:demo": "node options_tester.cjs && vite build --config vite.demo.config.ts", "preview": "vite preview --config vite.demo.config.ts", - "check": "svelte-check --tsconfig ./tsconfig.json", + "check": "node options_tester.cjs && svelte-check --tsconfig ./tsconfig.json", "lint": "lint-staged", "watch": "rimraf dist && vite build --watch", "link": "wait-on dist/types.d.ts && cd dist/ && npm link", @@ -69,6 +69,7 @@ "wait-on": "^7.2.0" }, "dependencies": { + "@exodus/schemasafe": "^1.3.0", "chart.js": "^4.4.0", "uuid": "^9.0.0" }, diff --git a/packages/demo/public/options.json b/packages/demo/public/options.json index d5e74d62..15140254 100644 --- a/packages/demo/public/options.json +++ b/packages/demo/public/options.json @@ -172,8 +172,6 @@ { "stratifierCode": "Histologies", "stratumCode": "1" - }, - { } ] } diff --git a/packages/lib/src/components/Options.wc.svelte b/packages/lib/src/components/Options.wc.svelte index 85da93a3..5651ff73 100644 --- a/packages/lib/src/components/Options.wc.svelte +++ b/packages/lib/src/components/Options.wc.svelte @@ -17,11 +17,50 @@ import { catalogue } from "../stores/catalogue"; import { iconStore } from "../stores/icons"; import type { Criteria } from "../types/treeData"; + import optionsSchema from "../interfaces/options.schema.json"; + import catalogueSchema from "../interfaces/catalogue.schema.json"; + import { parser } from "@exodus/schemasafe"; import type { LensOptions } from "../types/options"; export let options: LensOptions = {}; export let catalogueData: Criteria[] = []; + /** + * Validate the options against the schema before passing them to the store + */ + + $: { + const parse = parser(optionsSchema, { + includeErrors: true, + allErrors: true, + }); + const validJSON = parse(JSON.stringify(options)); + if (validJSON.valid === true) { + $lensOptions = options; + } else if (typeof options === "object") { + console.error( + "Lens-Options are not conform with the JSON schema", + validJSON.errors, + ); + } + } + + $: { + const parse = parser(catalogueSchema, { + includeErrors: true, + allErrors: true, + }); + const validJSON = parse(JSON.stringify(catalogueData)); + if (validJSON.valid === true) { + $catalogue = catalogueData; + } else if (typeof catalogueData === "object") { + console.error( + "Catalogue is not conform with the JSON schema", + validJSON.errors, + ); + } + } + const updateIconStore = (options: LensOptions): void => { iconStore.update((store) => { if (typeof options === "object" && "iconOptions" in options) { diff --git a/packages/lib/src/components/search-bar/SearchBarComponent.wc.svelte b/packages/lib/src/components/search-bar/SearchBarComponent.wc.svelte index 5f148d2e..1f231cf6 100644 --- a/packages/lib/src/components/search-bar/SearchBarComponent.wc.svelte +++ b/packages/lib/src/components/search-bar/SearchBarComponent.wc.svelte @@ -326,8 +326,8 @@ diff --git a/packages/lib/src/interfaces/catalogue.schema.json b/packages/lib/src/interfaces/catalogue.schema.json new file mode 100644 index 00000000..e6e12456 --- /dev/null +++ b/packages/lib/src/interfaces/catalogue.schema.json @@ -0,0 +1,130 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Search Parameter Catalogue", + "description": "A catalogue of search parameters", + "type": "array", + "items": { + "$ref": "#/$defs/categoryItem" + }, + "$defs": { + "childCategories": { + "type": "array", + "items": { + "$ref": "#/$defs/categoryItem" + } + }, + "categoryItem": { + "type": "object", + "properties": { + "key": { + "type": "string", + "pattern": "^.+$" + }, + "name": { + "type": "string", + "pattern": "^.+$" + }, + "subCategoryName": { + "type": "string", + "pattern": "^.+$" + }, + "infoButtonText": { + "type": "array", + "description": "The text to display in the info button", + "items": { + "type": "string", + "pattern": "^.*$" + } + }, + "system": { + "type": "string", + "pattern": "^.*$" + }, + "fieldType": { + "enum": [ + "single-select", + "number", + "autocomplete" + ] + }, + "type": { + "enum": [ + "EQUALS", + "BETWEEN" + ] + }, + "childCategories": { + "$ref": "#/$defs/childCategories" + }, + "criteria": { + "$ref": "#/$defs/criteria" + } + }, + "additionalProperties": false, + "unevaluatedProperties": false, + "required": [ + "key", + "name" + ] + }, + "criteria": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "pattern": "^.+$" + }, + "name": { + "type": "string", + "pattern": "^.+$" + }, + "description": { + "type": "string", + "pattern": "^.*$" + }, + "infoButtonText": { + "type": "array", + "description": "The text to display in the info button", + "items": { + "type": "string", + "pattern": "^.+$" + } + }, + "aggregatedValue": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "pattern": "^.+$" + }, + "name": { + "type": "string", + "pattern": "^.+$" + } + }, + "additionalProperties": false, + "unevaluatedProperties": false, + "required": [ + "value", + "name" + ] + } + } + } + }, + "additionalProperties": false, + "unevaluatedProperties": false, + "required": [ + "key", + "name" + ] + } + } + } +} \ No newline at end of file diff --git a/packages/lib/src/interfaces/options.schema.json b/packages/lib/src/interfaces/options.schema.json new file mode 100644 index 00000000..d455c696 --- /dev/null +++ b/packages/lib/src/interfaces/options.schema.json @@ -0,0 +1,243 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Lens Options", + "description": "The options for the lens", + "type": "object", + "properties": { + "iconOptions": { + "type": "object", + "properties": { + "infoUrl": { + "type": "string", + "pattern": "^.+$", + "description": "The icon to use for the info button" + }, + "deleteUrl": { + "type": "string", + "pattern": "^.+$", + "description": "The icon to use for the info button" + }, + "selectAll": { + "type": "object", + "properties": { + "text": { + "type": "string", + "pattern": "^.+$", + "description": "The text to display for the select all button" + } + }, + "additionalProperties": false, + "unevaluatedProperties": false, + "required": [] + } + }, + "additionalProperties": false, + "unevaluatedProperties": false, + "required": [] + }, + "chartOptions": { + "type": "object", + "patternProperties": { + "^.+$": { + "type": "object", + "properties": { + "legendMapping": { + "type": "object", + "patternProperties": { + "^.+$": { + "type": "string", + "pattern": "^.+$" + } + }, + "additionalProperties": false, + "unevaluatedProperties": false, + "required": [] + }, + "hintText": { + "type": "array", + "items": { + "type": "string", + "pattern": "^.+$", + "description": "The hint text to display as overlay of the info button" + } + }, + "aggregations": { + "type": "array", + "description": "add strings of other data keys to include in the chart", + "items": { + "type": "string", + "pattern": "^.+$" + } + }, + "accumulatedValues": { + "type": "array", + "description": "aggregate values of other data keys to include in the chart", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "pattern": "^.+$", + "description": "The name to be displayed in the chart" + }, + "values": { + "type": "array", + "items": { + "type": "string", + "pattern": "^.+$", + "description": "The data key to be aggregated" + } + } + }, + "additionalProperties": false, + "unevaluatedProperties": false, + "required": [] + } + }, + "tooltips": { + "type": "object", + "patternProperties": { + "^.+$": { + "type": "string", + "pattern": "^.+$", + "description": "The tooltip to display while hovering over the chart data" + } + }, + "additionalProperties": false, + "unevaluatedProperties": false, + "required": [] + } + }, + "additionalProperties": false, + "unevaluatedProperties": false, + "required": [] + } + }, + "additionalProperties": false, + "unevaluatedProperties": false, + "required": [] + }, + "tableOptions": { + "type": "object", + "properties": { + "headerData": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "the title of the column", + "pattern": "^.+$" + }, + "dataKey": { + "type": "string", + "description": "a single key to display in the table", + "pattern": "^.+$" + }, + "aggregatedDataKeys": { + "type": "array", + "description": "an array of keys to aggregate and display in the table as single value", + "items": { + "type": "object", + "properties": { + "groupCode": { + "type": "string", + "pattern": "^.+$" + }, + "stratifierCode": { + "type": "string", + "pattern": "^.+$" + }, + "stratumCode": { + "type": "string", + "pattern": "^.+$" + } + }, + "additionalProperties": false, + "unevaluatedProperties": false, + "required": [] + } + } + }, + "additionalProperties": false, + "unevaluatedProperties": false, + "required": [ + "title" + ] + } + }, + "claimedText": { + "type": "string", + "pattern": "^.+$", + "description": "The text to be displayed when query is being executed" + } + }, + "additionalProperties": false, + "unevaluatedProperties": false, + "required": ["headerData"] + }, + "resultSummaryOptions": { + "type": "object", + "properties": { + "title": { + "type": "string", + "pattern": "^.+$" + }, + "infoButtonText": { + "type": "string", + "pattern": "^.+$" + }, + "dataTypes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "pattern": "^.+$" + }, + "dataKey": { + "type": "string", + "pattern": "^.+$" + }, + "aggregatedDataKeys": { + "type": "array", + "description": "an array of keys to aggregate and display in the result summary as single value", + "items": { + "type": "object", + "properties": { + "groupCode": { + "type": "string", + "pattern": "^.+$" + }, + "stratifierCode": { + "type": "string", + "pattern": "^.+$" + }, + "stratumCode": { + "type": "string", + "pattern": "^.+$" + } + }, + "additionalProperties": false, + "unevaluatedProperties": false, + "required": [] + } + } + }, + "additionalProperties": false, + "unevaluatedProperties": false, + "required": [] + } + } + }, + "additionalProperties": false, + "unevaluatedProperties": false, + "required": [] + } + }, + "additionalProperties": false, + "unevaluatedProperties": false, + "required": [] +} \ No newline at end of file