Skip to content

Commit 7ca3c2d

Browse files
Merge pull request #87 from regulaforensics/SP-13620/Expand_search_201_response
SP-13620: Expand search 201 response schema
2 parents 3cbad72 + 20aa26e commit 7ca3c2d

1 file changed

Lines changed: 32 additions & 18 deletions

File tree

search.yml

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ paths:
2828
content:
2929
application/json:
3030
schema:
31-
$ref: "#/definitions/PersonCreatedResponse"
31+
$ref: "#/definitions/SearchResult"
3232
400:
3333
$ref: "./identification.yml#/components/responses/SearchBadParamsException"
3434

@@ -59,21 +59,6 @@ definitions:
5959
items:
6060
type: string
6161
format: uuid
62-
PersonCreatedResponse:
63-
type: object
64-
properties:
65-
code:
66-
type: integer
67-
description: "Result code."
68-
persons:
69-
type: array
70-
description: "Array of Person images."
71-
items:
72-
$ref: "#/definitions/SearchPerson"
73-
metadata:
74-
type: object
75-
additionalProperties: true
76-
description: "A free-form object containing person's extended attributes."
7762
RecognizeImage:
7863
allOf:
7964
- $ref: "./identification.yml#/components/schemas/Image"
@@ -92,12 +77,41 @@ definitions:
9277
properties:
9378
code:
9479
type: integer
95-
description: "Search result code."
80+
description: "Result code. It is returned only with response 200."
9681
persons:
9782
type: array
98-
description: "Person data."
83+
description: "Array of Person images. It is returned only with response 200."
9984
items:
10085
$ref: "#/definitions/SearchPerson"
86+
id:
87+
type: string
88+
format: uuid
89+
description: "Person ID. The list of persons is sorted by decreasing ID value."
90+
nullable: true
91+
createdAt:
92+
type: string
93+
description: "Person creation date."
94+
nullable: true
95+
updatedAt:
96+
type: string
97+
description: "Person update date."
98+
nullable: true
99+
groups:
100+
type: array
101+
description: "List of groups this person belongs to."
102+
nullable: true
103+
items:
104+
type: string
105+
format: uuid
106+
name:
107+
type: string
108+
description: "Person name."
109+
nullable: true
110+
metadata:
111+
type: object
112+
additionalProperties: true
113+
description: "A free-form object containing person's extended attributes. Available when a person is being created"
114+
nullable: true
101115

102116
SearchPerson:
103117
allOf:

0 commit comments

Comments
 (0)