From 3387e526e7c27f7f36d1047b748fb56d02b7d479 Mon Sep 17 00:00:00 2001 From: Artem Tsybulko Date: Thu, 24 Oct 2024 11:37:48 +0300 Subject: [PATCH 1/6] SP-19172 - add format field to RawImageContainer --- p-ping.yml | 4 ++-- rt-raw-image.yml | 20 ++++++++++++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/p-ping.yml b/p-ping.yml index 8805fa13..610bbdee 100644 --- a/p-ping.yml +++ b/p-ping.yml @@ -16,11 +16,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/DeviceInfo" + $ref: "#/components/schemas/DeviceInfoDeprecated" components: schemas: - DeviceInfo: + DeviceInfoDeprecated: type: object properties: app-name: diff --git a/rt-raw-image.yml b/rt-raw-image.yml index 98124507..55ebd9ad 100644 --- a/rt-raw-image.yml +++ b/rt-raw-image.yml @@ -4,14 +4,26 @@ components: DocumentImageResult: title: "Document Image" + description: "Contains cropped and rotated with perspective compensation image of document. + Single input image can contain multiple document side/pages, which will be returned as separated results. + Most of coordinates in other types defined on that image" allOf: - type: object - description: "Contains cropped and rotated with perspective compensation image of document. - Single input image can contain multiple document side/pages, which will be returned as separated results. - Most of coordinates in other types defined on that image" required: - RawImageContainer properties: RawImageContainer: - $ref: "./common.yml#/components/schemas/ImageData" + $ref: "#/components/schemas/RawImageContainerFieldList" - $ref: "./rt.yml#/components/schemas/ResultItem" + + RawImageContainerFieldList: + title: "RawImageContainerFieldList" + allOf: + - type: object + required: + - format + properties: + format: + description: "Image format" + type: string + - $ref: "./common.yml#/components/schemas/ImageData" From b504c129ef05a46306cc29f21692df3b4d80c6a3 Mon Sep 17 00:00:00 2001 From: Artem Tsybulko Date: Fri, 15 Nov 2024 13:19:34 +0300 Subject: [PATCH 2/6] SP-19172 - update schemas --- common.yml | 3 +++ p-ping.yml | 4 ++-- rt-raw-image.yml | 14 +------------- rt.yml | 35 +++++++++++++++++++++-------------- 4 files changed, 27 insertions(+), 29 deletions(-) diff --git a/common.yml b/common.yml index cdda9da3..a8d8cbb7 100644 --- a/common.yml +++ b/common.yml @@ -122,6 +122,9 @@ components: properties: image: $ref: "#/components/schemas/ImageBase64" + format: + description: "Image format" + type: string ImageTransactionData: type: object diff --git a/p-ping.yml b/p-ping.yml index 610bbdee..8805fa13 100644 --- a/p-ping.yml +++ b/p-ping.yml @@ -16,11 +16,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/DeviceInfoDeprecated" + $ref: "#/components/schemas/DeviceInfo" components: schemas: - DeviceInfoDeprecated: + DeviceInfo: type: object properties: app-name: diff --git a/rt-raw-image.yml b/rt-raw-image.yml index 55ebd9ad..2fd18289 100644 --- a/rt-raw-image.yml +++ b/rt-raw-image.yml @@ -13,17 +13,5 @@ components: - RawImageContainer properties: RawImageContainer: - $ref: "#/components/schemas/RawImageContainerFieldList" + $ref: "./common.yml#/components/schemas/ImageData" - $ref: "./rt.yml#/components/schemas/ResultItem" - - RawImageContainerFieldList: - title: "RawImageContainerFieldList" - allOf: - - type: object - required: - - format - properties: - format: - description: "Image format" - type: string - - $ref: "./common.yml#/components/schemas/ImageData" diff --git a/rt.yml b/rt.yml index e3819565..a01f1420 100644 --- a/rt.yml +++ b/rt.yml @@ -110,28 +110,35 @@ components: discriminator: propertyName: result_type mapping: + 33: "StatusResult" + 36: "TextResult" 1: "DocumentImageResult" - 3: "TextDataResult" - 5: "DocBarCodeInfo" - 6: "GraphicsResult" - 8: "DocumentTypesCandidatesResult" + 16: "DocumentImageResult" + 37: "ImagesResult" 9: "ChosenDocumentTypeResult" - 15: "LexicalAnalysisResult" + 8: "DocumentTypesCandidatesResult" 17: "TextDataResult" + 3: "TextDataResult" 18: "TextDataResult" + 26: "TextDataResult" + 102: "TextDataResult" + 6: "GraphicsResult" 19: "GraphicsResult" + 32: "GraphicsResult" + 35: "GraphicsResult" + 38: "GraphicsResult" + 103: "GraphicsResult" + 15: "LexicalAnalysisResult" 20: "AuthenticityResult" - 30: "ImageQualityResult" - 33: "StatusResult" - 34: "AuthenticityResult" - 36: "TextResult" - 37: "ImagesResult" 39: "AuthenticityResult" - 49: "EncryptedRCLResult" - 50: "LicenseResult" + 34: "AuthenticityResult" + 30: "ImageQualityResult" 85: "DocumentPositionResult" - 102: "TextDataResult" - 103: "GraphicsResult" + 61: "DocumentPositionResult" + 62: "DocumentPositionResult" + 5: "DocBarCodeInfo" + 50: "LicenseResult" + 49: "EncryptedRCLResult" ContainerList: type: object From 3037ae77ad21a963b9d47a1630e4fd0714b17c76 Mon Sep 17 00:00:00 2001 From: Artem Tsybulko Date: Fri, 15 Nov 2024 13:58:23 +0300 Subject: [PATCH 3/6] SP-19172 - sort result_type mapping --- rt.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/rt.yml b/rt.yml index a01f1420..fa734020 100644 --- a/rt.yml +++ b/rt.yml @@ -110,35 +110,35 @@ components: discriminator: propertyName: result_type mapping: - 33: "StatusResult" - 36: "TextResult" 1: "DocumentImageResult" - 16: "DocumentImageResult" - 37: "ImagesResult" - 9: "ChosenDocumentTypeResult" + 3: "TextDataResult" + 5: "DocBarCodeInfo" + 6: "GraphicsResult" 8: "DocumentTypesCandidatesResult" + 9: "ChosenDocumentTypeResult" + 15: "LexicalAnalysisResult" + 16: "DocumentImageResult" 17: "TextDataResult" - 3: "TextDataResult" 18: "TextDataResult" - 26: "TextDataResult" - 102: "TextDataResult" - 6: "GraphicsResult" 19: "GraphicsResult" + 20: "AuthenticityResult" + 26: "TextDataResult" + 30: "ImageQualityResult" 32: "GraphicsResult" + 33: "StatusResult" + 34: "AuthenticityResult" 35: "GraphicsResult" + 36: "TextResult" + 37: "ImagesResult" 38: "GraphicsResult" - 103: "GraphicsResult" - 15: "LexicalAnalysisResult" - 20: "AuthenticityResult" 39: "AuthenticityResult" - 34: "AuthenticityResult" - 30: "ImageQualityResult" - 85: "DocumentPositionResult" + 49: "EncryptedRCLResult" + 50: "LicenseResult" 61: "DocumentPositionResult" 62: "DocumentPositionResult" - 5: "DocBarCodeInfo" - 50: "LicenseResult" - 49: "EncryptedRCLResult" + 85: "DocumentPositionResult" + 102: "TextDataResult" + 103: "GraphicsResult" ContainerList: type: object From 84b8b892ae76bb494cc70fd5b2e3aa821ee18177 Mon Sep 17 00:00:00 2001 From: Artem Tsybulko Date: Fri, 15 Nov 2024 14:40:52 +0300 Subject: [PATCH 4/6] SP-19172 - update result_type mapping --- rt.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/rt.yml b/rt.yml index fa734020..b1bc0378 100644 --- a/rt.yml +++ b/rt.yml @@ -122,20 +122,14 @@ components: 18: "TextDataResult" 19: "GraphicsResult" 20: "AuthenticityResult" - 26: "TextDataResult" 30: "ImageQualityResult" - 32: "GraphicsResult" 33: "StatusResult" 34: "AuthenticityResult" - 35: "GraphicsResult" 36: "TextResult" 37: "ImagesResult" - 38: "GraphicsResult" 39: "AuthenticityResult" 49: "EncryptedRCLResult" 50: "LicenseResult" - 61: "DocumentPositionResult" - 62: "DocumentPositionResult" 85: "DocumentPositionResult" 102: "TextDataResult" 103: "GraphicsResult" From e399a12e046a3b4e25c20e210892a8d9e55dd8fd Mon Sep 17 00:00:00 2001 From: Vladislav Yakimchik <31860804+vyakimchik@users.noreply.github.com> Date: Fri, 15 Nov 2024 14:45:12 +0300 Subject: [PATCH 5/6] Update rt-raw-image.yml --- rt-raw-image.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rt-raw-image.yml b/rt-raw-image.yml index 2fd18289..9023dc75 100644 --- a/rt-raw-image.yml +++ b/rt-raw-image.yml @@ -4,9 +4,7 @@ components: DocumentImageResult: title: "Document Image" - description: "Contains cropped and rotated with perspective compensation image of document. - Single input image can contain multiple document side/pages, which will be returned as separated results. - Most of coordinates in other types defined on that image" + description: "Contains document images after processing." allOf: - type: object required: From 1c99e2d91a9d5927788e587bd68eb817f92af6ce Mon Sep 17 00:00:00 2001 From: Ihar Kliashchou Date: Sat, 16 Nov 2024 12:00:45 +0300 Subject: [PATCH 6/6] Update rt-raw-image.yml --- rt-raw-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rt-raw-image.yml b/rt-raw-image.yml index 9023dc75..a16e6e12 100644 --- a/rt-raw-image.yml +++ b/rt-raw-image.yml @@ -4,7 +4,7 @@ components: DocumentImageResult: title: "Document Image" - description: "Contains document images after processing." + description: "Contains document image." allOf: - type: object required: