From b16c3da31d31659799ace75a67e7378e62b6e163 Mon Sep 17 00:00:00 2001 From: Davide Vacca Date: Thu, 14 Nov 2024 17:26:16 +0100 Subject: [PATCH] Remove document property for reports where it's not applicable --- schemas/reports/definitions.yaml | 24 +++++++++++++++---- schemas/reports/document_report.yaml | 1 + schemas/reports/document_video_report.yaml | 1 + ...video_with_address_information_report.yaml | 1 + ...ument_with_address_information_report.yaml | 1 + ...ument_with_driver_verification_report.yaml | 1 + ...th_driving_licence_information_report.yaml | 1 + .../facial_similarity_motion_report.yaml | 1 + ...al_similarity_photo_fully_auto_report.yaml | 1 + .../facial_similarity_photo_report.yaml | 1 + .../facial_similarity_video_report.yaml | 1 + schemas/reports/report_document.yaml | 8 ------- 12 files changed, 29 insertions(+), 13 deletions(-) delete mode 100644 schemas/reports/report_document.yaml diff --git a/schemas/reports/definitions.yaml b/schemas/reports/definitions.yaml index cc03ada9..6af0847f 100644 --- a/schemas/reports/definitions.yaml +++ b/schemas/reports/definitions.yaml @@ -24,15 +24,29 @@ report_shared: type: string format: uuid description: The ID of the check to which the report belongs. Read-only. - documents: - type: array - description: Array of objects with document ids that were used in the Onfido engine. [ONLY POPULATED FOR DOCUMENT AND FACIAL SIMILARITY REPORTS] - items: - $ref: report_document.yaml name: $ref: "#/report_name" description: The name of the report type. +document_report_shared: + type: object + properties: + documents: + type: array + description: Array of objects with document ids that were used in the Onfido engine. + items: + $ref: "#/document_report_document" + +document_report_document: + type: object + required: + - id + properties: + id: + type: string + format: uuid + description: ID of uploaded document to use. + facial_similarity_report_shared: properties: live_photos: diff --git a/schemas/reports/document_report.yaml b/schemas/reports/document_report.yaml index 6c4b239c..fb9fcb37 100644 --- a/schemas/reports/document_report.yaml +++ b/schemas/reports/document_report.yaml @@ -1,5 +1,6 @@ allOf: - $ref: definitions.yaml#/report_shared + - $ref: definitions.yaml#/document_report_shared - type: object properties: breakdown: diff --git a/schemas/reports/document_video_report.yaml b/schemas/reports/document_video_report.yaml index 6c4b239c..fb9fcb37 100644 --- a/schemas/reports/document_video_report.yaml +++ b/schemas/reports/document_video_report.yaml @@ -1,5 +1,6 @@ allOf: - $ref: definitions.yaml#/report_shared + - $ref: definitions.yaml#/document_report_shared - type: object properties: breakdown: diff --git a/schemas/reports/document_video_with_address_information_report.yaml b/schemas/reports/document_video_with_address_information_report.yaml index 6c4b239c..fb9fcb37 100644 --- a/schemas/reports/document_video_with_address_information_report.yaml +++ b/schemas/reports/document_video_with_address_information_report.yaml @@ -1,5 +1,6 @@ allOf: - $ref: definitions.yaml#/report_shared + - $ref: definitions.yaml#/document_report_shared - type: object properties: breakdown: diff --git a/schemas/reports/document_with_address_information_report.yaml b/schemas/reports/document_with_address_information_report.yaml index 6c4b239c..fb9fcb37 100644 --- a/schemas/reports/document_with_address_information_report.yaml +++ b/schemas/reports/document_with_address_information_report.yaml @@ -1,5 +1,6 @@ allOf: - $ref: definitions.yaml#/report_shared + - $ref: definitions.yaml#/document_report_shared - type: object properties: breakdown: diff --git a/schemas/reports/document_with_driver_verification_report.yaml b/schemas/reports/document_with_driver_verification_report.yaml index 311d302e..732bd5d3 100644 --- a/schemas/reports/document_with_driver_verification_report.yaml +++ b/schemas/reports/document_with_driver_verification_report.yaml @@ -1,5 +1,6 @@ allOf: - $ref: definitions.yaml#/report_shared + - $ref: definitions.yaml#/document_report_shared - type: object properties: breakdown: diff --git a/schemas/reports/document_with_driving_licence_information_report.yaml b/schemas/reports/document_with_driving_licence_information_report.yaml index 6c4b239c..fb9fcb37 100644 --- a/schemas/reports/document_with_driving_licence_information_report.yaml +++ b/schemas/reports/document_with_driving_licence_information_report.yaml @@ -1,5 +1,6 @@ allOf: - $ref: definitions.yaml#/report_shared + - $ref: definitions.yaml#/document_report_shared - type: object properties: breakdown: diff --git a/schemas/reports/facial_similarity_motion_report.yaml b/schemas/reports/facial_similarity_motion_report.yaml index 7daa9177..126e928c 100644 --- a/schemas/reports/facial_similarity_motion_report.yaml +++ b/schemas/reports/facial_similarity_motion_report.yaml @@ -1,5 +1,6 @@ allOf: - $ref: definitions.yaml#/report_shared + - $ref: definitions.yaml#/document_report_shared - $ref: definitions.yaml#/facial_similarity_report_shared - type: object properties: diff --git a/schemas/reports/facial_similarity_photo_fully_auto_report.yaml b/schemas/reports/facial_similarity_photo_fully_auto_report.yaml index 31bd2810..635fd639 100644 --- a/schemas/reports/facial_similarity_photo_fully_auto_report.yaml +++ b/schemas/reports/facial_similarity_photo_fully_auto_report.yaml @@ -1,5 +1,6 @@ allOf: - $ref: definitions.yaml#/report_shared + - $ref: definitions.yaml#/document_report_shared - $ref: definitions.yaml#/facial_similarity_report_shared - type: object properties: diff --git a/schemas/reports/facial_similarity_photo_report.yaml b/schemas/reports/facial_similarity_photo_report.yaml index fec3bdb2..664d617a 100644 --- a/schemas/reports/facial_similarity_photo_report.yaml +++ b/schemas/reports/facial_similarity_photo_report.yaml @@ -1,5 +1,6 @@ allOf: - $ref: definitions.yaml#/report_shared + - $ref: definitions.yaml#/document_report_shared - $ref: definitions.yaml#/facial_similarity_report_shared - type: object properties: diff --git a/schemas/reports/facial_similarity_video_report.yaml b/schemas/reports/facial_similarity_video_report.yaml index 7f112861..cdeba3d1 100644 --- a/schemas/reports/facial_similarity_video_report.yaml +++ b/schemas/reports/facial_similarity_video_report.yaml @@ -1,5 +1,6 @@ allOf: - $ref: definitions.yaml#/report_shared + - $ref: definitions.yaml#/document_report_shared - $ref: definitions.yaml#/facial_similarity_report_shared - type: object properties: diff --git a/schemas/reports/report_document.yaml b/schemas/reports/report_document.yaml deleted file mode 100644 index c112670c..00000000 --- a/schemas/reports/report_document.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: object -required: - - id -properties: - id: - type: string - format: uuid - description: ID of uploaded document to use.