From 0afa40e5ba3c628182638d1f76ed28008c7a6b7a Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Tue, 17 Dec 2024 15:27:57 +0200 Subject: [PATCH] Restricted the `target_keys` object to contain only a single key value pair. Resolves #117 --- NEWS.md | 1 + v4.0.1/tasks-schema.json | 10 ++-------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/NEWS.md b/NEWS.md index a6e88c9..e43dc2e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,7 @@ This release contains the following non-breaking changes: * Added explicit checks of `round_id` format through a regex `pattern` check to the `round.round_id` property when `round.round_id_from_variable` is `false`. This provides upfront validation of the expected format of manual round IDs (i.e. those not source from a task ID) (#112). +* Restricted the `target_keys` object to contain only a single key value pair (if not `null`). This means that target keys can now only consist of a single value from a single task ID (#117). # v4.0.0 diff --git a/v4.0.1/tasks-schema.json b/v4.0.1/tasks-schema.json index feab874..0ecd9f3 100644 --- a/v4.0.1/tasks-schema.json +++ b/v4.0.1/tasks-schema.json @@ -1290,20 +1290,14 @@ { "target": "peak week hosp" }, - { - "target_variable": "hosp", - "target_outcome": "inc" - }, - { - "target_variable": "case", - "target_outcome": "peak week" - }, null ], "type": [ "object", "null" ], + "minProperties": 1, + "maxProperties": 1, "additionalProperties": { "type": "string" }