From ba0557575753ba79dd74b0051211e466dc722d7a Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 13 Feb 2024 16:45:48 +0300 Subject: [PATCH 1/2] SP-13620: Expand search 201 response schema --- search.yml | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/search.yml b/search.yml index ef86416..1e1cc66 100644 --- a/search.yml +++ b/search.yml @@ -28,7 +28,7 @@ paths: content: application/json: schema: - $ref: "#/definitions/PersonCreatedResponse" + $ref: "#/definitions/SearchResult" 400: $ref: "./identification.yml#/components/responses/SearchBadParamsException" @@ -59,21 +59,6 @@ definitions: items: type: string format: uuid - PersonCreatedResponse: - type: object - properties: - code: - type: integer - description: "Result code." - persons: - type: array - description: "Array of Person images." - items: - $ref: "#/definitions/SearchPerson" - metadata: - type: object - additionalProperties: true - description: "A free-form object containing person's extended attributes." RecognizeImage: allOf: - $ref: "./identification.yml#/components/schemas/Image" @@ -98,6 +83,35 @@ definitions: description: "Person data." items: $ref: "#/definitions/SearchPerson" + id: + type: string + format: uuid + description: "Person ID. The list of persons is sorted by decreasing ID value." + nullable: true + createdAt: + type: string + description: "Person creation date." + nullable: true + updatedAt: + type: string + description: "Person update date." + nullable: true + groups: + type: array + description: "List of groups this person belongs to." + nullable: true + items: + type: string + format: uuid + name: + type: string + description: "Person name." + nullable: true + metadata: + type: object + additionalProperties: true + description: "A free-form object containing person's extended attributes." + nullable: true SearchPerson: allOf: From 20aa26ea7c0603aff838e00b70111496550b1db8 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 13 Feb 2024 17:20:50 +0300 Subject: [PATCH 2/2] SP-13620: Expand search 201 response schema --- search.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/search.yml b/search.yml index 1e1cc66..25d4a7f 100644 --- a/search.yml +++ b/search.yml @@ -77,10 +77,10 @@ definitions: properties: code: type: integer - description: "Search result code." + description: "Result code. It is returned only with response 200." persons: type: array - description: "Person data." + description: "Array of Person images. It is returned only with response 200." items: $ref: "#/definitions/SearchPerson" id: @@ -110,7 +110,7 @@ definitions: metadata: type: object additionalProperties: true - description: "A free-form object containing person's extended attributes." + description: "A free-form object containing person's extended attributes. Available when a person is being created" nullable: true SearchPerson: