From e074006363f6f6c02f5a8928db2b7e0dd5388bf4 Mon Sep 17 00:00:00 2001 From: simonlabarere Date: Tue, 3 Mar 2026 13:51:41 +0000 Subject: [PATCH 1/4] CCM-14511: Add PDS Source Change Number to Message Status Callback --- .../schemas/components/MessageStatus.yaml | 5 +++++ specification/schemas/types/Metadata.yaml | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 specification/schemas/types/Metadata.yaml diff --git a/specification/schemas/components/MessageStatus.yaml b/specification/schemas/components/MessageStatus.yaml index 9ec05ebe4..10182e932 100644 --- a/specification/schemas/components/MessageStatus.yaml +++ b/specification/schemas/components/MessageStatus.yaml @@ -43,6 +43,11 @@ properties: example: '2023-11-17T14:27:51.413Z' routingPlan: $ref: ../types/RoutingPlan.yaml + metadata: + type: array + minItems: 0 + items: + $ref: ../types/Metadata.yaml required: - messageId - messageReference diff --git a/specification/schemas/types/Metadata.yaml b/specification/schemas/types/Metadata.yaml new file mode 100644 index 000000000..bdbb4bb8a --- /dev/null +++ b/specification/schemas/types/Metadata.yaml @@ -0,0 +1,15 @@ +type: object +additionalProperties: false +properties: + version: + type: string + description: The Source Change Number + example: '2' + queriedAt: + type: date-time + description: The timestamp when the source was queried + example: '2023-11-17T14:27:51.413Z' + source: + type: string + description: This identifies the source of the metadata. This is a free text field and can be used to identify the system that provided the metadata. + example: 'pds' From 4b3ead38d88c07586a6337752a0bda4a2ed29375 Mon Sep 17 00:00:00 2001 From: simonlabarere Date: Thu, 5 Mar 2026 13:29:59 +0000 Subject: [PATCH 2/4] CCM-14511: Address review comments --- specification/schemas/components/MessageStatus.yaml | 2 +- specification/schemas/types/Metadata.yaml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/specification/schemas/components/MessageStatus.yaml b/specification/schemas/components/MessageStatus.yaml index 10182e932..0a89c165a 100644 --- a/specification/schemas/components/MessageStatus.yaml +++ b/specification/schemas/components/MessageStatus.yaml @@ -45,7 +45,7 @@ properties: $ref: ../types/RoutingPlan.yaml metadata: type: array - minItems: 0 + minItems: 1 items: $ref: ../types/Metadata.yaml required: diff --git a/specification/schemas/types/Metadata.yaml b/specification/schemas/types/Metadata.yaml index bdbb4bb8a..3aeb107f0 100644 --- a/specification/schemas/types/Metadata.yaml +++ b/specification/schemas/types/Metadata.yaml @@ -3,7 +3,7 @@ additionalProperties: false properties: version: type: string - description: The Source Change Number + description: The version identifier of the source data at the time it was queried example: '2' queriedAt: type: date-time @@ -13,3 +13,6 @@ properties: type: string description: This identifies the source of the metadata. This is a free text field and can be used to identify the system that provided the metadata. example: 'pds' +required: + - queriedAt + - source From 46ee3a9e399fa64f8702d0a240b8bfb64617912d Mon Sep 17 00:00:00 2001 From: Ian Hodges Date: Tue, 17 Mar 2026 10:00:37 +0000 Subject: [PATCH 3/4] CCM-14512 Add channel metadata to get message and channel callbacks (#1052) --- .../messages/2WL3wwFhpZ6blJNIoh747bDEFNv.json | 9 +++++- .../messages/2WL3ydEEk37IzREoWRhuAdolFCE.json | 9 +++++- .../messages/2WL3zxCY9e5vm2VP1ZfYMb53WPF.json | 9 +++++- .../messages/2WL4GEeFVxXG9S57nRlefBwwKxp.json | 9 +++++- .../messages/2WL4JXrfauCaQnSFbAujoImSKwo.json | 9 +++++- .../messages/2WL4JtCiOe7l2TT4szwPjNJah3z.json | 9 +++++- .../messages/2WL4LuyNMtoGAsJQIpTxZLl8e3e.json | 9 +++++- .../messages/2WL4MOuSeCTODDAScFG7KIq9a5r.json | 9 +++++- .../messages/2WL4W9RgbuLLByXdR77H8vjKSDd.json | 9 +++++- .../messages/2WL4xcWKvz4F32g0htBEl8DINzn.json | 9 +++++- .../messages/2WL50w41YaZXcyFCNT346LY8rlz.json | 8 ++++- .../messages/2WL54x0XQjCbWeE5lN0DKQZcokU.json | 8 ++++- .../messages/2WL5TWl7F7PondWbZ1vctlEtOZ3.json | 27 ++++++++++++++-- .../messages/2WL5eDefrbW31uw1il84WdF8ndH.json | 27 ++++++++++++++-- .../messages/2WL5eYSWGzCHlGmzNxuqVusPxDg.json | 27 ++++++++++++++-- .../messages/2WL5f8j4XVxUPgd3OOqXVYvVFIW.json | 27 ++++++++++++++-- .../messages/2bBBpsiMl2rnQt99qm6JLZ6w1vq.json | 27 ++++++++++------ .../messages/2n7C5wdJ9JSOSeCJTyd50GvtZeR.json | 18 +++++++++-- .../schemas/components/SupplierStatus.yaml | 9 ++++++ .../schemas/enums/ChannelMetadataLabel.yaml | 6 ++++ .../schemas/responses/MessageBatch.yaml | 11 +++++++ .../schemas/responses/MessageCreated.yaml | 12 +++++++ .../schemas/responses/MessageResponse.yaml | 32 +++++++++++++++++++ .../responses/NhsAppAccDetailsResponse.yaml | 12 +++++++ .../schemas/types/ChannelMetadata.yaml | 23 +++++++++++++ specification/schemas/types/Links.yaml | 2 ++ specification/schemas/types/RoutingPlan.yaml | 4 +++ 27 files changed, 335 insertions(+), 35 deletions(-) create mode 100644 specification/schemas/enums/ChannelMetadataLabel.yaml create mode 100644 specification/schemas/types/ChannelMetadata.yaml diff --git a/sandbox/messages/2WL3wwFhpZ6blJNIoh747bDEFNv.json b/sandbox/messages/2WL3wwFhpZ6blJNIoh747bDEFNv.json index bb2c0b485..ceb1ae2c8 100644 --- a/sandbox/messages/2WL3wwFhpZ6blJNIoh747bDEFNv.json +++ b/sandbox/messages/2WL3wwFhpZ6blJNIoh747bDEFNv.json @@ -26,7 +26,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "a1b2c3d4", + "source": "pds", + "label": "recipient_contact" + } + ] } ], "timestamps": { diff --git a/sandbox/messages/2WL3ydEEk37IzREoWRhuAdolFCE.json b/sandbox/messages/2WL3ydEEk37IzREoWRhuAdolFCE.json index c78048986..1bdaa1ceb 100644 --- a/sandbox/messages/2WL3ydEEk37IzREoWRhuAdolFCE.json +++ b/sandbox/messages/2WL3ydEEk37IzREoWRhuAdolFCE.json @@ -25,7 +25,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "e5f6g7h8", + "source": "pds", + "label": "recipient_contact" + } + ] } ], "timestamps": { diff --git a/sandbox/messages/2WL3zxCY9e5vm2VP1ZfYMb53WPF.json b/sandbox/messages/2WL3zxCY9e5vm2VP1ZfYMb53WPF.json index 0413f41f2..a66d277fb 100644 --- a/sandbox/messages/2WL3zxCY9e5vm2VP1ZfYMb53WPF.json +++ b/sandbox/messages/2WL3zxCY9e5vm2VP1ZfYMb53WPF.json @@ -25,7 +25,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "i9j0k1l2", + "source": "pds", + "label": "recipient_contact" + } + ] } ], "timestamps": { diff --git a/sandbox/messages/2WL4GEeFVxXG9S57nRlefBwwKxp.json b/sandbox/messages/2WL4GEeFVxXG9S57nRlefBwwKxp.json index 94a302fa1..5a5aa7b7e 100644 --- a/sandbox/messages/2WL4GEeFVxXG9S57nRlefBwwKxp.json +++ b/sandbox/messages/2WL4GEeFVxXG9S57nRlefBwwKxp.json @@ -24,7 +24,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "m3n4o5p6", + "source": "pds", + "label": "recipient_contact" + } + ] } ], "timestamps": { diff --git a/sandbox/messages/2WL4JXrfauCaQnSFbAujoImSKwo.json b/sandbox/messages/2WL4JXrfauCaQnSFbAujoImSKwo.json index cde74988b..3e965ed9f 100644 --- a/sandbox/messages/2WL4JXrfauCaQnSFbAujoImSKwo.json +++ b/sandbox/messages/2WL4JXrfauCaQnSFbAujoImSKwo.json @@ -24,7 +24,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "q7r8s9t0", + "source": "pds", + "label": "recipient_contact" + } + ] } ], "timestamps": { diff --git a/sandbox/messages/2WL4JtCiOe7l2TT4szwPjNJah3z.json b/sandbox/messages/2WL4JtCiOe7l2TT4szwPjNJah3z.json index d13bd79b8..0542877d3 100644 --- a/sandbox/messages/2WL4JtCiOe7l2TT4szwPjNJah3z.json +++ b/sandbox/messages/2WL4JtCiOe7l2TT4szwPjNJah3z.json @@ -30,7 +30,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "u1v2w3x4", + "source": "pds", + "label": "recipient_contact" + } + ] } ], "timestamps": { diff --git a/sandbox/messages/2WL4LuyNMtoGAsJQIpTxZLl8e3e.json b/sandbox/messages/2WL4LuyNMtoGAsJQIpTxZLl8e3e.json index a8ab59ffd..101dc06fc 100644 --- a/sandbox/messages/2WL4LuyNMtoGAsJQIpTxZLl8e3e.json +++ b/sandbox/messages/2WL4LuyNMtoGAsJQIpTxZLl8e3e.json @@ -24,7 +24,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "y5z6a7b8", + "source": "pds", + "label": "recipient_contact" + } + ] } ], "timestamps": { diff --git a/sandbox/messages/2WL4MOuSeCTODDAScFG7KIq9a5r.json b/sandbox/messages/2WL4MOuSeCTODDAScFG7KIq9a5r.json index 681291bc8..558cd802c 100644 --- a/sandbox/messages/2WL4MOuSeCTODDAScFG7KIq9a5r.json +++ b/sandbox/messages/2WL4MOuSeCTODDAScFG7KIq9a5r.json @@ -30,7 +30,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "c9d0e1f2", + "source": "pds", + "label": "recipient_contact" + } + ] } ], "timestamps": { diff --git a/sandbox/messages/2WL4W9RgbuLLByXdR77H8vjKSDd.json b/sandbox/messages/2WL4W9RgbuLLByXdR77H8vjKSDd.json index ef06f33c1..0286b0b00 100644 --- a/sandbox/messages/2WL4W9RgbuLLByXdR77H8vjKSDd.json +++ b/sandbox/messages/2WL4W9RgbuLLByXdR77H8vjKSDd.json @@ -30,7 +30,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "a1b2c3d4", + "source": "pds", + "label": "recipient_contact" + } + ] } ], "timestamps": { diff --git a/sandbox/messages/2WL4xcWKvz4F32g0htBEl8DINzn.json b/sandbox/messages/2WL4xcWKvz4F32g0htBEl8DINzn.json index 77a479b51..fbf50db6b 100644 --- a/sandbox/messages/2WL4xcWKvz4F32g0htBEl8DINzn.json +++ b/sandbox/messages/2WL4xcWKvz4F32g0htBEl8DINzn.json @@ -30,7 +30,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "e5f6g7h8", + "source": "pds", + "label": "recipient_contact" + } + ] } ], "timestamps": { diff --git a/sandbox/messages/2WL50w41YaZXcyFCNT346LY8rlz.json b/sandbox/messages/2WL50w41YaZXcyFCNT346LY8rlz.json index 674d07d56..84d211b17 100644 --- a/sandbox/messages/2WL50w41YaZXcyFCNT346LY8rlz.json +++ b/sandbox/messages/2WL50w41YaZXcyFCNT346LY8rlz.json @@ -30,7 +30,13 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "source": "pds", + "label": "recipient_contact" + } + ] } ], "timestamps": { diff --git a/sandbox/messages/2WL54x0XQjCbWeE5lN0DKQZcokU.json b/sandbox/messages/2WL54x0XQjCbWeE5lN0DKQZcokU.json index c5d32e86f..dc7ba9e24 100644 --- a/sandbox/messages/2WL54x0XQjCbWeE5lN0DKQZcokU.json +++ b/sandbox/messages/2WL54x0XQjCbWeE5lN0DKQZcokU.json @@ -30,7 +30,13 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "source": "pds", + "label": "recipient_contact" + } + ] } ], "timestamps": { diff --git a/sandbox/messages/2WL5TWl7F7PondWbZ1vctlEtOZ3.json b/sandbox/messages/2WL5TWl7F7PondWbZ1vctlEtOZ3.json index 68a604a21..f1d0196a2 100644 --- a/sandbox/messages/2WL5TWl7F7PondWbZ1vctlEtOZ3.json +++ b/sandbox/messages/2WL5TWl7F7PondWbZ1vctlEtOZ3.json @@ -39,7 +39,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "q7r8s9t0", + "source": "pds", + "label": "recipient_contact" + } + ] }, { "type": "sms", @@ -53,7 +60,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "u1v2w3x4", + "source": "pds", + "label": "recipient_contact" + } + ] }, { "type": "letter", @@ -67,7 +81,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "y5z6a7b8", + "source": "pds", + "label": "recipient_contact" + } + ] } ], "timestamps": { diff --git a/sandbox/messages/2WL5eDefrbW31uw1il84WdF8ndH.json b/sandbox/messages/2WL5eDefrbW31uw1il84WdF8ndH.json index 9343c851a..c104b3576 100644 --- a/sandbox/messages/2WL5eDefrbW31uw1il84WdF8ndH.json +++ b/sandbox/messages/2WL5eDefrbW31uw1il84WdF8ndH.json @@ -42,7 +42,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "c9d0e1f2", + "source": "pds", + "label": "recipient_contact" + } + ] }, { "type": "sms", @@ -56,7 +63,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "g3h4i5j6", + "source": "pds", + "label": "recipient_contact" + } + ] }, { "type": "letter", @@ -70,7 +84,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "k7l8m9n0", + "source": "pds", + "label": "recipient_contact" + } + ] } ], "timestamps": { diff --git a/sandbox/messages/2WL5eYSWGzCHlGmzNxuqVusPxDg.json b/sandbox/messages/2WL5eYSWGzCHlGmzNxuqVusPxDg.json index 7e13d4aff..51e4e22e7 100644 --- a/sandbox/messages/2WL5eYSWGzCHlGmzNxuqVusPxDg.json +++ b/sandbox/messages/2WL5eYSWGzCHlGmzNxuqVusPxDg.json @@ -45,7 +45,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "o1p2q3r4", + "source": "pds", + "label": "recipient_contact" + } + ] }, { "type": "sms", @@ -60,7 +67,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "s5t6u7v8", + "source": "pds", + "label": "recipient_contact" + } + ] }, { "type": "letter", @@ -74,7 +88,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "w9x0y1z2", + "source": "pds", + "label": "recipient_contact" + } + ] } ], "timestamps": { diff --git a/sandbox/messages/2WL5f8j4XVxUPgd3OOqXVYvVFIW.json b/sandbox/messages/2WL5f8j4XVxUPgd3OOqXVYvVFIW.json index d695ab6e6..d7a5d5629 100644 --- a/sandbox/messages/2WL5f8j4XVxUPgd3OOqXVYvVFIW.json +++ b/sandbox/messages/2WL5f8j4XVxUPgd3OOqXVYvVFIW.json @@ -45,7 +45,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "a3b4c5d6", + "source": "pds", + "label": "recipient_contact" + } + ] }, { "type": "sms", @@ -63,7 +70,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "e7f8g9h0", + "source": "pds", + "label": "recipient_contact" + } + ] }, { "type": "letter", @@ -78,7 +92,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "i1j2k3l4", + "source": "pds", + "label": "recipient_contact" + } + ] } ], "timestamps": { diff --git a/sandbox/messages/2bBBpsiMl2rnQt99qm6JLZ6w1vq.json b/sandbox/messages/2bBBpsiMl2rnQt99qm6JLZ6w1vq.json index be8d31583..f27c40013 100644 --- a/sandbox/messages/2bBBpsiMl2rnQt99qm6JLZ6w1vq.json +++ b/sandbox/messages/2bBBpsiMl2rnQt99qm6JLZ6w1vq.json @@ -4,8 +4,8 @@ "id": "2bBBpsiMl2rnQt99qm6JLZ6w1vq", "attributes": { "routingPlan": { - "id" : "b838b13c-f98c-4def-93f0-515d4e4f4ee1", - "version" : "1", + "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", + "version": "1", "name": "routing-plan-name", "createdDate": "2022-01-01T00:00:00.000Z" }, @@ -26,11 +26,18 @@ "created": "2023-10-09T10:31:59Z", "failed": "2023-10-09T10:52:12Z" }, - "routingPlan" : { - "id" : "9ba00d23-cd6f-4aca-8688-00abc85a7980", - "type" : "override", - "version" : "5" - } + "routingPlan": { + "id": "9ba00d23-cd6f-4aca-8688-00abc85a7980", + "type": "override", + "version": "5" + }, + "metadata": [ + { + "id": "a1b2c3d4", + "source": "pds", + "label": "recipient_contact" + } + ] } ], "timestamps": { @@ -42,7 +49,9 @@ { "queriedAt": "2023-10-09T10:31:59Z", "version": "23", - "labels":["sms"], + "labels": [ + "sms" + ], "source": "pds" } ] @@ -51,4 +60,4 @@ "self": "%PATH_ROOT%" } } -} +} \ No newline at end of file diff --git a/sandbox/messages/2n7C5wdJ9JSOSeCJTyd50GvtZeR.json b/sandbox/messages/2n7C5wdJ9JSOSeCJTyd50GvtZeR.json index 3ccda67eb..8ffa45641 100644 --- a/sandbox/messages/2n7C5wdJ9JSOSeCJTyd50GvtZeR.json +++ b/sandbox/messages/2n7C5wdJ9JSOSeCJTyd50GvtZeR.json @@ -43,7 +43,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "m5n6o7p8", + "source": "pds", + "label": "recipient_contact" + } + ] }, { "type": "letter", @@ -58,7 +65,14 @@ "id": "b838b13c-f98c-4def-93f0-515d4e4f4ee1", "version": "1", "type": "original" - } + }, + "metadata": [ + { + "id": "q9r0s1t2", + "source": "pds", + "label": "recipient_contact" + } + ] } ], "timestamps": { diff --git a/specification/schemas/components/SupplierStatus.yaml b/specification/schemas/components/SupplierStatus.yaml index fc804ab7f..aecfa14ea 100644 --- a/specification/schemas/components/SupplierStatus.yaml +++ b/specification/schemas/components/SupplierStatus.yaml @@ -1,5 +1,10 @@ type: object title: CallbackRequest +required: + - type + - attributes + - links + - meta properties: type: type: string @@ -44,9 +49,13 @@ properties: example: '2023-11-17T14:27:51.413Z' retryCount: $ref: ../../snippets/RetryCount.yaml + metadata: + $ref: ../types/ChannelMetadata.yaml required: - messageId - messageReference + - cascadeType + - cascadeOrder - channel - channelStatus - timestamp diff --git a/specification/schemas/enums/ChannelMetadataLabel.yaml b/specification/schemas/enums/ChannelMetadataLabel.yaml new file mode 100644 index 000000000..8e3aca3f1 --- /dev/null +++ b/specification/schemas/enums/ChannelMetadataLabel.yaml @@ -0,0 +1,6 @@ +title: Enum_ChannelMetadataLabel +description: The label associated with the metadata for this channel at the time this response was generated. +type: string +enum: + - recipient_contact +example: recipient_contact diff --git a/specification/schemas/responses/MessageBatch.yaml b/specification/schemas/responses/MessageBatch.yaml index 2c31800a7..f3046db1b 100644 --- a/specification/schemas/responses/MessageBatch.yaml +++ b/specification/schemas/responses/MessageBatch.yaml @@ -5,6 +5,10 @@ properties: data: type: object additionalProperties: false + required: + - type + - id + - attributes properties: type: $ref: ../enums/EnumMessageBatch.yaml @@ -15,6 +19,10 @@ properties: attributes: type: object additionalProperties: false + required: + - messageBatchReference + - routingPlan + - messages properties: messageBatchReference: type: string @@ -29,6 +37,9 @@ properties: type: object title: Message additionalProperties: false + required: + - messageReference + - id properties: messageReference: $ref: ../../snippets/MessageReferenceSnippet.yaml diff --git a/specification/schemas/responses/MessageCreated.yaml b/specification/schemas/responses/MessageCreated.yaml index 096274a73..dbdca2fed 100644 --- a/specification/schemas/responses/MessageCreated.yaml +++ b/specification/schemas/responses/MessageCreated.yaml @@ -5,6 +5,11 @@ properties: data: type: object additionalProperties: false + required: + - type + - id + - attributes + - links properties: type: $ref: ../enums/EnumMessage.yaml @@ -14,6 +19,11 @@ properties: attributes: type: object additionalProperties: false + required: + - messageReference + - messageStatus + - timestamps + - routingPlan properties: messageReference: $ref: ../types/MessageReference.yaml @@ -23,6 +33,8 @@ properties: timestamps: type: object additionalProperties: false + required: + - created properties: created: type: string diff --git a/specification/schemas/responses/MessageResponse.yaml b/specification/schemas/responses/MessageResponse.yaml index deca0978b..8b2b5d5c9 100644 --- a/specification/schemas/responses/MessageResponse.yaml +++ b/specification/schemas/responses/MessageResponse.yaml @@ -5,6 +5,11 @@ properties: data: type: object additionalProperties: false + required: + - type + - id + - attributes + - links properties: type: $ref: ../enums/EnumMessage.yaml @@ -13,6 +18,11 @@ properties: attributes: type: object additionalProperties: false + required: + - messageReference + - messageStatus + - timestamps + - routingPlan properties: messageReference: $ref: ../types/MessageReference.yaml @@ -40,6 +50,13 @@ properties: items: type: object additionalProperties: false + required: + - type + - cascadeType + - cascadeOrder + - channelStatus + - timestamps + - routingPlan properties: type: $ref: ../enums/ChannelType.yaml @@ -72,6 +89,8 @@ properties: timestamps: type: object additionalProperties: false + required: + - created properties: created: type: string @@ -92,6 +111,9 @@ properties: type: object additionalProperties: false description: The routing plan that this channel was generated from. + required: + - id + - type properties: id: type: string @@ -105,9 +127,13 @@ properties: type: description: Identifies if this is the original routing plan that was requested, or if a conditional override has been used. $ref: ../enums/RoutingPlanType.yaml + metadata: + $ref: ../types/ChannelMetadata.yaml timestamps: type: object additionalProperties: false + required: + - created properties: created: type: string @@ -142,6 +168,9 @@ properties: items: type: object additionalProperties: false + required: + - queriedAt + - source properties: version: description: This is the version of the document that was received from this source. @@ -176,6 +205,9 @@ properties: data: type: object additionalProperties: false + required: + - type + - id properties: type: $ref: ../enums/EnumMessageBatch.yaml diff --git a/specification/schemas/responses/NhsAppAccDetailsResponse.yaml b/specification/schemas/responses/NhsAppAccDetailsResponse.yaml index 62dfdeb0a..4c810d998 100644 --- a/specification/schemas/responses/NhsAppAccDetailsResponse.yaml +++ b/specification/schemas/responses/NhsAppAccDetailsResponse.yaml @@ -5,6 +5,10 @@ properties: data: type: object additionalProperties: false + required: + - type + - id + - attributes properties: type: $ref: ../enums/TypeNhsAppAccounts.yaml @@ -14,12 +18,17 @@ properties: attributes: type: object additionalProperties: false + required: + - accounts properties: accounts: type: array items: type: object additionalProperties: false + required: + - nhsNumber + - notificationsEnabled properties: nhsNumber: description: The patient's NHS number. @@ -32,6 +41,9 @@ properties: type: object additionalProperties: false description: Contains links to related objects. + required: + - last + - self properties: last: type: string diff --git a/specification/schemas/types/ChannelMetadata.yaml b/specification/schemas/types/ChannelMetadata.yaml new file mode 100644 index 000000000..bdf1f2384 --- /dev/null +++ b/specification/schemas/types/ChannelMetadata.yaml @@ -0,0 +1,23 @@ +type: array +minItems: 0 +description: |- + This array includes a list of all metadata lookups done for this channel within the system. + + Currently only PDS is used for lookups. +items: + type: object + additionalProperties: false + required: + - source + - label + properties: + id: + type: string + description: The source’s identifier for the metadata. + example: y5z6a7b8 + source: + type: string + description: The source of the metadata. + example: pds + label: + $ref: ../enums/ChannelMetadataLabel.yaml \ No newline at end of file diff --git a/specification/schemas/types/Links.yaml b/specification/schemas/types/Links.yaml index c86b717d4..39125f11d 100644 --- a/specification/schemas/types/Links.yaml +++ b/specification/schemas/types/Links.yaml @@ -1,6 +1,8 @@ type: object additionalProperties: false description: Contains links to related objects. +required: + - self properties: self: type: string diff --git a/specification/schemas/types/RoutingPlan.yaml b/specification/schemas/types/RoutingPlan.yaml index 0741116f0..6080b8869 100644 --- a/specification/schemas/types/RoutingPlan.yaml +++ b/specification/schemas/types/RoutingPlan.yaml @@ -1,5 +1,9 @@ type: object additionalProperties: false +required: + - id + - name + - createdDate properties: id: type: string From a5964304cbf694e011f0db023054c23e9a33ea07 Mon Sep 17 00:00:00 2001 From: "scott.fullerton1" Date: Thu, 26 Mar 2026 11:12:27 +0000 Subject: [PATCH 4/4] +minor