From 4fb90775a49c454f87bfa9bc914325579a9b22a0 Mon Sep 17 00:00:00 2001 From: kschneider84 <77678452+kschneider84@users.noreply.github.com> Date: Thu, 18 Dec 2025 08:32:24 +0100 Subject: [PATCH 1/8] Define report schema in more detail --- public/openapi/participant-api.json | 63 +++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 3 deletions(-) diff --git a/public/openapi/participant-api.json b/public/openapi/participant-api.json index 05ef731..d4ab844 100644 --- a/public/openapi/participant-api.json +++ b/public/openapi/participant-api.json @@ -3619,7 +3619,21 @@ "PaginationInfos": { "type": "object", "description": "Pagination information", - "additionalProperties": true + "properties": { + "totalCount": { + "type": "integer" + }, + "currentPage": { + "type": "integer" + }, + "totalPages": { + "type": "integer" + }, + "pageSize": { + "type": "integer" + } + }, + "additionalProperties": false }, "SubmissionHistory": { "type": "object", @@ -3628,8 +3642,51 @@ }, "Report": { "type": "object", - "description": "report object", - "additionalProperties": true + "description": "Report object", + "properties": { + "id": { + "type": "string", + "description": "MongoDB ObjectID as hex string" + }, + "key": { + "type": "string" + }, + "participantID": { + "type": "string", + }, + "responseID": { + "type": "string" + }, + "timestamp": { + "type": "integer", + "description": "Unix timestamp" + }, + "modifiedAt": { + "type": "string", + "format": "date-time" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { "type": "string" }, + "value": { "type": "string" }, + "dtype": { + "type": "string", + "enum": ["string", "float", "int", "string", "rawMessage", "keyList"] + } + } + } + } + }, + "required": [ + "key", + "participantID", + "responseID", + "timestamp" + ], + "additionalProperties": false }, "Participant": { "type": "object", From e2a719597c678baef08916e614e90a845a3081a9 Mon Sep 17 00:00:00 2001 From: kschneider84 <77678452+kschneider84@users.noreply.github.com> Date: Thu, 18 Dec 2025 15:57:47 +0100 Subject: [PATCH 2/8] adjust required report parameter in management API --- public/openapi/management-api.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/public/openapi/management-api.json b/public/openapi/management-api.json index c058c75..80249a7 100644 --- a/public/openapi/management-api.json +++ b/public/openapi/management-api.json @@ -830,7 +830,13 @@ } }, "additionalProperties": false, - "description": "Report object" + "description": "Report object", + "required": [ + "key", + "participantID", + "responseID", + "timestamp" + ] }, "ReportData": { "type": "object", From 2db9aea683c46414c12b1ff60d9b98e2d538fee3 Mon Sep 17 00:00:00 2001 From: kschneider84 <77678452+kschneider84@users.noreply.github.com> Date: Thu, 18 Dec 2025 16:19:48 +0100 Subject: [PATCH 3/8] Adjust report schema of management API zu participant API --- public/openapi/management-api.json | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/public/openapi/management-api.json b/public/openapi/management-api.json index 80249a7..19f672a 100644 --- a/public/openapi/management-api.json +++ b/public/openapi/management-api.json @@ -803,7 +803,7 @@ "properties": { "id": { "type": "string", - "description": "ObjectID" + "description": "MongoDB ObjectID as hex string" }, "key": { "type": "string" @@ -815,7 +815,8 @@ "type": "string" }, "timestamp": { - "type": "integer" + "type": "integer", + "description": "Unix timestamp" }, "modifiedAt": { "type": "string", @@ -824,8 +825,7 @@ "data": { "type": "array", "items": { - "type": "object", - "additionalProperties": true + "$ref": "#/components/schemas/ReportData" } } }, @@ -841,15 +841,12 @@ "ReportData": { "type": "object", "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string" - }, - "dtype": { - "type": "string" - } + "key": { "type": "string" }, + "value": { "type": "string" }, + "dtype": { + "type": "string", + "enum": ["string", "float", "int", "string", "rawMessage", "keyList"] + } }, "additionalProperties": false }, From d2d7407e438fcd358fb846b01605f3312021fc0f Mon Sep 17 00:00:00 2001 From: kschneider84 <77678452+kschneider84@users.noreply.github.com> Date: Fri, 19 Dec 2025 08:27:51 +0100 Subject: [PATCH 4/8] fix typo --- public/openapi/management-api.json | 2 +- public/openapi/participant-api.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/openapi/management-api.json b/public/openapi/management-api.json index 19f672a..3f047ae 100644 --- a/public/openapi/management-api.json +++ b/public/openapi/management-api.json @@ -845,7 +845,7 @@ "value": { "type": "string" }, "dtype": { "type": "string", - "enum": ["string", "float", "int", "string", "rawMessage", "keyList"] + "enum": ["date", "float", "int", "string", "rawMessage", "keyList"] } }, "additionalProperties": false diff --git a/public/openapi/participant-api.json b/public/openapi/participant-api.json index d4ab844..d076fa6 100644 --- a/public/openapi/participant-api.json +++ b/public/openapi/participant-api.json @@ -3652,7 +3652,7 @@ "type": "string" }, "participantID": { - "type": "string", + "type": "string" }, "responseID": { "type": "string" @@ -3674,7 +3674,7 @@ "value": { "type": "string" }, "dtype": { "type": "string", - "enum": ["string", "float", "int", "string", "rawMessage", "keyList"] + "enum": ["date", "float", "int", "string", "rawMessage", "keyList"] } } } From caa4359a45de8341646cfcc5130c0390c080628a Mon Sep 17 00:00:00 2001 From: kschneider84 <77678452+kschneider84@users.noreply.github.com> Date: Fri, 19 Dec 2025 08:38:03 +0100 Subject: [PATCH 5/8] Add modifiedAt to report attributes --- content/docs/participant-management/reports.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/docs/participant-management/reports.mdx b/content/docs/participant-management/reports.mdx index ca2340e..12229d0 100644 --- a/content/docs/participant-management/reports.mdx +++ b/content/docs/participant-management/reports.mdx @@ -38,6 +38,10 @@ A "report" is a data entry for a participant with the following fields in the da type: 'number', required: true, }, + modifiedAt: { + description: 'Date-time format of the last modification of the report', + type: 'string' + }, data: { description: 'Optional list of key/value data points attached to the report', type: 'Array (optional)', From e03c6ac127b1b21e63ff5713bc2519d9e71b975c Mon Sep 17 00:00:00 2001 From: kschneider84 <77678452+kschneider84@users.noreply.github.com> Date: Fri, 19 Dec 2025 11:19:30 +0100 Subject: [PATCH 6/8] Change responseID to not required --- public/openapi/management-api.json | 1 - public/openapi/participant-api.json | 1 - 2 files changed, 2 deletions(-) diff --git a/public/openapi/management-api.json b/public/openapi/management-api.json index 3f047ae..a30d82a 100644 --- a/public/openapi/management-api.json +++ b/public/openapi/management-api.json @@ -834,7 +834,6 @@ "required": [ "key", "participantID", - "responseID", "timestamp" ] }, diff --git a/public/openapi/participant-api.json b/public/openapi/participant-api.json index d076fa6..e0f1438 100644 --- a/public/openapi/participant-api.json +++ b/public/openapi/participant-api.json @@ -3683,7 +3683,6 @@ "required": [ "key", "participantID", - "responseID", "timestamp" ], "additionalProperties": false From d596afff5d10826852e78a6e77ffa41a0296dfae Mon Sep 17 00:00:00 2001 From: kschneider84 <77678452+kschneider84@users.noreply.github.com> Date: Mon, 22 Dec 2025 08:24:44 +0100 Subject: [PATCH 7/8] add additonalProperties attribute --- public/openapi/management-api.json | 3 ++- public/openapi/participant-api.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/public/openapi/management-api.json b/public/openapi/management-api.json index a30d82a..a9f21e9 100644 --- a/public/openapi/management-api.json +++ b/public/openapi/management-api.json @@ -844,7 +844,8 @@ "value": { "type": "string" }, "dtype": { "type": "string", - "enum": ["date", "float", "int", "string", "rawMessage", "keyList"] + "enum": ["date", "float", "int", "string", "rawMessage", "keyList"], + "additionalProperties": false } }, "additionalProperties": false diff --git a/public/openapi/participant-api.json b/public/openapi/participant-api.json index e0f1438..6d8365f 100644 --- a/public/openapi/participant-api.json +++ b/public/openapi/participant-api.json @@ -3674,7 +3674,8 @@ "value": { "type": "string" }, "dtype": { "type": "string", - "enum": ["date", "float", "int", "string", "rawMessage", "keyList"] + "enum": ["date", "float", "int", "string", "rawMessage", "keyList"], + "additionalProperties": false } } } From 7efb892b9a1839b8fc5e7a738f5a31ab0eb14d7a Mon Sep 17 00:00:00 2001 From: kschneider84 <77678452+kschneider84@users.noreply.github.com> Date: Mon, 22 Dec 2025 08:35:10 +0100 Subject: [PATCH 8/8] fix syntax bug --- public/openapi/management-api.json | 3 +-- public/openapi/participant-api.json | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/public/openapi/management-api.json b/public/openapi/management-api.json index a9f21e9..a30d82a 100644 --- a/public/openapi/management-api.json +++ b/public/openapi/management-api.json @@ -844,8 +844,7 @@ "value": { "type": "string" }, "dtype": { "type": "string", - "enum": ["date", "float", "int", "string", "rawMessage", "keyList"], - "additionalProperties": false + "enum": ["date", "float", "int", "string", "rawMessage", "keyList"] } }, "additionalProperties": false diff --git a/public/openapi/participant-api.json b/public/openapi/participant-api.json index 6d8365f..d590f32 100644 --- a/public/openapi/participant-api.json +++ b/public/openapi/participant-api.json @@ -3674,10 +3674,10 @@ "value": { "type": "string" }, "dtype": { "type": "string", - "enum": ["date", "float", "int", "string", "rawMessage", "keyList"], - "additionalProperties": false + "enum": ["date", "float", "int", "string", "rawMessage", "keyList"] } - } + }, + "additionalProperties": false } } },