From a2a02c4b1f8316109d7ac3338ff718c1d9b26385 Mon Sep 17 00:00:00 2001 From: Oktay Ekincioglu Date: Fri, 11 Sep 2026 15:23:56 +0100 Subject: [PATCH] BYOFS schema updates --- pom.xml | 2 +- .../json/schema/sjp.upload-case-document.json | 17 +++++++++++-- .../sjp.command.upload-case-document.json | 17 ++++++++++++- .../sjp.command.upload-case-document.json | 17 ++++++++++++- .../public.sjp.case-document-uploaded.json | 19 +++++++++++++-- ...ocgenerator.events.document-available.json | 24 +++++++++++++++++-- ...docgenerator.events.generation-failed.json | 17 ++++++++++++- .../sjp.events.case-document-uploaded.json | 17 ++++++++++++- 8 files changed, 119 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index 018c3f19a5..35cecfc50a 100644 --- a/pom.xml +++ b/pom.xml @@ -53,7 +53,7 @@ true file://${project.build.directory}/site 2.3.0 - 17.104.4 + 17.104.5-CHD-2786-SNAPSHOT ${coredomain.version} 3.0.0 2.10 diff --git a/sjp-command/sjp-command-api/src/raml/json/schema/sjp.upload-case-document.json b/sjp-command/sjp-command-api/src/raml/json/schema/sjp.upload-case-document.json index aa91169a30..4b3fea8e9f 100644 --- a/sjp-command/sjp-command-api/src/raml/json/schema/sjp.upload-case-document.json +++ b/sjp-command/sjp-command-api/src/raml/json/schema/sjp.upload-case-document.json @@ -4,9 +4,22 @@ "properties": { "caseDocument": { "type": "string" + }, + "caseDocumentUri": { + "type": "string", + "format": "uri" } }, - "required": [ - "caseDocument" + "oneOf": [ + { + "required": [ + "caseDocument" + ] + }, + { + "required": [ + "caseDocumentUri" + ] + } ] } diff --git a/sjp-command/sjp-command-controller/src/raml/json/schema/sjp.command.upload-case-document.json b/sjp-command/sjp-command-controller/src/raml/json/schema/sjp.command.upload-case-document.json index 175452af3e..42fe635272 100644 --- a/sjp-command/sjp-command-controller/src/raml/json/schema/sjp.command.upload-case-document.json +++ b/sjp-command/sjp-command-controller/src/raml/json/schema/sjp.command.upload-case-document.json @@ -9,13 +9,28 @@ "caseDocument": { "type": "string" }, + "caseDocumentUri": { + "type": "string", + "format": "uri" + }, "caseDocumentType": { "type": "string" } }, "required": [ "caseId", - "caseDocument", "caseDocumentType" + ], + "oneOf": [ + { + "required": [ + "caseDocument" + ] + }, + { + "required": [ + "caseDocumentUri" + ] + } ] } diff --git a/sjp-command/sjp-command-handler/src/raml/json/schema/sjp.command.upload-case-document.json b/sjp-command/sjp-command-handler/src/raml/json/schema/sjp.command.upload-case-document.json index 175452af3e..42fe635272 100644 --- a/sjp-command/sjp-command-handler/src/raml/json/schema/sjp.command.upload-case-document.json +++ b/sjp-command/sjp-command-handler/src/raml/json/schema/sjp.command.upload-case-document.json @@ -9,13 +9,28 @@ "caseDocument": { "type": "string" }, + "caseDocumentUri": { + "type": "string", + "format": "uri" + }, "caseDocumentType": { "type": "string" } }, "required": [ "caseId", - "caseDocument", "caseDocumentType" + ], + "oneOf": [ + { + "required": [ + "caseDocument" + ] + }, + { + "required": [ + "caseDocumentUri" + ] + } ] } diff --git a/sjp-event/sjp-event-processor/src/yaml/json/schema/public.sjp.case-document-uploaded.json b/sjp-event/sjp-event-processor/src/yaml/json/schema/public.sjp.case-document-uploaded.json index ddecadf7a9..aba067a2b6 100644 --- a/sjp-event/sjp-event-processor/src/yaml/json/schema/public.sjp.case-document-uploaded.json +++ b/sjp-event/sjp-event-processor/src/yaml/json/schema/public.sjp.case-document-uploaded.json @@ -6,12 +6,27 @@ "documentId": { "$ref": "http://justice.gov.uk/domain/core/common/definitions.json#/definitions/uuid" }, + "documentUri": { + "type": "string", + "format": "uri" + }, "caseId": { "$ref": "http://justice.gov.uk/domain/core/common/definitions.json#/definitions/uuid" } }, "required": [ - "documentId", "caseId" + ], + "oneOf": [ + { + "required": [ + "documentId" + ] + }, + { + "required": [ + "documentUri" + ] + } ] -} \ No newline at end of file +} diff --git a/sjp-event/sjp-event-processor/src/yaml/json/schema/public.systemdocgenerator.events.document-available.json b/sjp-event/sjp-event-processor/src/yaml/json/schema/public.systemdocgenerator.events.document-available.json index 7456749078..6d6af89147 100644 --- a/sjp-event/sjp-event-processor/src/yaml/json/schema/public.systemdocgenerator.events.document-available.json +++ b/sjp-event/sjp-event-processor/src/yaml/json/schema/public.systemdocgenerator.events.document-available.json @@ -6,6 +6,10 @@ "payloadFileServiceId": { "$ref": "http://justice.gov.uk/domain/core/common/definitions.json#/definitions/uuid" }, + "payloadFileUri": { + "type": "string", + "format": "uri" + }, "templateIdentifier": { "type": "string" }, @@ -19,6 +23,10 @@ "documentFileServiceId": { "$ref": "http://justice.gov.uk/domain/core/common/definitions.json#/definitions/uuid" }, + "destinationFileUri": { + "type": "string", + "format": "uri" + }, "generatedTime": { "type": "string", "format": "date-time" @@ -55,12 +63,24 @@ }, "additionalProperties": false, "required": [ - "payloadFileServiceId", "templateIdentifier", "conversionFormat", "requestedTime", - "documentFileServiceId", "generatedTime", "generateVersion" + ], + "oneOf": [ + { + "required": [ + "payloadFileServiceId", + "documentFileServiceId" + ] + }, + { + "required": [ + "payloadFileUri", + "destinationFileUri" + ] + } ] } diff --git a/sjp-event/sjp-event-processor/src/yaml/json/schema/public.systemdocgenerator.events.generation-failed.json b/sjp-event/sjp-event-processor/src/yaml/json/schema/public.systemdocgenerator.events.generation-failed.json index 61f66a7a24..f01e2f7c71 100644 --- a/sjp-event/sjp-event-processor/src/yaml/json/schema/public.systemdocgenerator.events.generation-failed.json +++ b/sjp-event/sjp-event-processor/src/yaml/json/schema/public.systemdocgenerator.events.generation-failed.json @@ -6,6 +6,10 @@ "payloadFileServiceId": { "$ref": "http://justice.gov.uk/domain/core/common/definitions.json#/definitions/uuid" }, + "payloadFileUri": { + "type": "string", + "format": "uri" + }, "templateIdentifier": { "type": "string" }, @@ -52,11 +56,22 @@ }, "additionalProperties": false, "required": [ - "payloadFileServiceId", "failedTime", "requestedTime", "templateIdentifier", "conversionFormat", "reason" + ], + "oneOf": [ + { + "required": [ + "payloadFileServiceId" + ] + }, + { + "required": [ + "payloadFileUri" + ] + } ] } diff --git a/sjp-event/sjp-event-processor/src/yaml/json/schema/sjp.events.case-document-uploaded.json b/sjp-event/sjp-event-processor/src/yaml/json/schema/sjp.events.case-document-uploaded.json index 82edff28a0..f7e1ffbe8e 100644 --- a/sjp-event/sjp-event-processor/src/yaml/json/schema/sjp.events.case-document-uploaded.json +++ b/sjp-event/sjp-event-processor/src/yaml/json/schema/sjp.events.case-document-uploaded.json @@ -10,6 +10,10 @@ "documentReference": { "type": "string" }, + "documentReferenceUri": { + "type": "string", + "format": "uri" + }, "documentType": { "type": "string" } @@ -17,7 +21,18 @@ "additionalProperties": false, "required": [ "caseId", - "documentReference", "documentType" + ], + "oneOf": [ + { + "required": [ + "documentReference" + ] + }, + { + "required": [ + "documentReferenceUri" + ] + } ] }