From fc9a3031e62a0ebe43fc65b2b1e1af0c7aedbbaa Mon Sep 17 00:00:00 2001 From: Jon Marston Date: Wed, 18 Dec 2024 16:20:26 +0000 Subject: [PATCH 1/3] EM-1528: update the JSON-schema to allow an optional 'focus' field within the notification-event. This field is created from dataref, which may be missing. --- signal-schemas/fhirsignal.schema.json | 7 ++++--- signal-schemas/fhirsignal.schema.json.yaml | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/signal-schemas/fhirsignal.schema.json b/signal-schemas/fhirsignal.schema.json index 5f3607f..c98747d 100644 --- a/signal-schemas/fhirsignal.schema.json +++ b/signal-schemas/fhirsignal.schema.json @@ -162,9 +162,8 @@ }, "part": { "type": "array", - "minItems": 3, + "minItems": 2, "maxItems": 3, - "items": false, "prefixItems": [ { "type": "object", @@ -201,7 +200,9 @@ "name", "valueInstant" ] - }, + } + ], + "items": [ { "type": "object", "description": "Resource on an API of the publishing service to retrieve full details of the event (or subject record)", diff --git a/signal-schemas/fhirsignal.schema.json.yaml b/signal-schemas/fhirsignal.schema.json.yaml index 942ba96..8eda1b3 100644 --- a/signal-schemas/fhirsignal.schema.json.yaml +++ b/signal-schemas/fhirsignal.schema.json.yaml @@ -114,9 +114,8 @@ $defs: const: notification-event part: type: array - minItems: 3 + minItems: 2 maxItems: 3 - items: false prefixItems: - type: object description: Note this is a fixed value @@ -141,6 +140,7 @@ $defs: required: - name - valueInstant + items: - type: object description: Resource on an API of the publishing service to retrieve full details of the event (or subject record) properties: From 24ed8adf5ee4f168a8553e51f44d28a09f4cf430 Mon Sep 17 00:00:00 2001 From: Jon Marston Date: Mon, 23 Dec 2024 16:38:06 +0000 Subject: [PATCH 2/3] EM-1528: fix an schema format - 'items' cannot be a list. --- signal-schemas/fhirsignal.schema.json | 56 +++++++++++----------- signal-schemas/fhirsignal.schema.json.yaml | 32 ++++++------- 2 files changed, 43 insertions(+), 45 deletions(-) diff --git a/signal-schemas/fhirsignal.schema.json b/signal-schemas/fhirsignal.schema.json index c98747d..1955434 100644 --- a/signal-schemas/fhirsignal.schema.json +++ b/signal-schemas/fhirsignal.schema.json @@ -202,36 +202,34 @@ ] } ], - "items": [ - { - "type": "object", - "description": "Resource on an API of the publishing service to retrieve full details of the event (or subject record)", - "properties": { - "name": { - "const": "focus" - }, - "valueReference": { - "type": "object", - "properties": { - "reference": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.service.nhs.uk/register-with-a-gp-surgery/applications/bd468854-4cd5-4e57-9dde-e5a482d50605" - ] - } - }, - "required": [ - "reference" - ] - } + "items": { + "type": "object", + "description": "Resource on an API of the publishing service to retrieve full details of the event (or subject record)", + "properties": { + "name": { + "const": "focus" }, - "required": [ - "name", - "valueReference" - ] - } - ] + "valueReference": { + "type": "object", + "properties": { + "reference": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.service.nhs.uk/register-with-a-gp-surgery/applications/bd468854-4cd5-4e57-9dde-e5a482d50605" + ] + } + }, + "required": [ + "reference" + ] + } + }, + "required": [ + "name", + "valueReference" + ] + } } }, "required": [ diff --git a/signal-schemas/fhirsignal.schema.json.yaml b/signal-schemas/fhirsignal.schema.json.yaml index 8eda1b3..f0b76e4 100644 --- a/signal-schemas/fhirsignal.schema.json.yaml +++ b/signal-schemas/fhirsignal.schema.json.yaml @@ -141,24 +141,24 @@ $defs: - name - valueInstant items: - - type: object - description: Resource on an API of the publishing service to retrieve full details of the event (or subject record) + type: object + description: Resource on an API of the publishing service to retrieve full details of the event (or subject record) + properties: + name: + const: focus + valueReference: + type: object properties: - name: - const: focus - valueReference: - type: object - properties: - reference: - type: string - format: uri - examples: - - 'https://api.service.nhs.uk/register-with-a-gp-surgery/applications/bd468854-4cd5-4e57-9dde-e5a482d50605' - required: - - reference + reference: + type: string + format: uri + examples: + - 'https://api.service.nhs.uk/register-with-a-gp-surgery/applications/bd468854-4cd5-4e57-9dde-e5a482d50605' required: - - name - - valueReference + - reference + required: + - name + - valueReference required: - name - part From 9741dfecf818a286049781ec5db09941805e4a33 Mon Sep 17 00:00:00 2001 From: Jon Marston Date: Mon, 30 Dec 2024 13:43:02 +0000 Subject: [PATCH 3/3] EM-1528: remove dataref from the required field list in the schema. --- .../components/schemas/cloudevents/baseMnsCloudEventSignal.yaml | 1 - .../schemas/cloudevents/gpregChangeGpRequestSignal.yaml | 1 - .../components/schemas/cloudevents/patientflagsChangeSignal.yaml | 1 - 3 files changed, 3 deletions(-) diff --git a/specification/components/schemas/cloudevents/baseMnsCloudEventSignal.yaml b/specification/components/schemas/cloudevents/baseMnsCloudEventSignal.yaml index cb70d1e..8765d63 100644 --- a/specification/components/schemas/cloudevents/baseMnsCloudEventSignal.yaml +++ b/specification/components/schemas/cloudevents/baseMnsCloudEventSignal.yaml @@ -46,7 +46,6 @@ required: - specversion - type - time -- dataref example: specversion: '1.0' id: 236a1d4a-5d69-4fa9-9c7f-e72bf505aa5b diff --git a/specification/components/schemas/cloudevents/gpregChangeGpRequestSignal.yaml b/specification/components/schemas/cloudevents/gpregChangeGpRequestSignal.yaml index abae57f..96440c5 100644 --- a/specification/components/schemas/cloudevents/gpregChangeGpRequestSignal.yaml +++ b/specification/components/schemas/cloudevents/gpregChangeGpRequestSignal.yaml @@ -43,7 +43,6 @@ required: - specversion - type - time -- dataref - subject definitions: iddef: diff --git a/specification/components/schemas/cloudevents/patientflagsChangeSignal.yaml b/specification/components/schemas/cloudevents/patientflagsChangeSignal.yaml index 654f18a..1c73585 100644 --- a/specification/components/schemas/cloudevents/patientflagsChangeSignal.yaml +++ b/specification/components/schemas/cloudevents/patientflagsChangeSignal.yaml @@ -43,7 +43,6 @@ required: - specversion - type - time -- dataref - subject definitions: iddef: