Skip to content

Commit 4966251

Browse files
committed
create common response file with taskID and objectID
1 parent f2a4845 commit 4966251

File tree

5 files changed

+23
-14
lines changed

5 files changed

+23
-14
lines changed

openapi_spec/paths/indexes/batch.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,9 @@ post:
4747
additionalProperties: false
4848
properties:
4949
taskID:
50-
type: integer
50+
$ref: '../../responses/common.yml#/taskID'
5151
objectIDs:
52-
type: array
53-
items:
54-
type: string
52+
$ref: '../../responses/common.yml#/objectIDs'
5553
'400':
5654
$ref: '../../responses/BadRequest.yml'
5755
'404':

openapi_spec/paths/indexes/multipleQueries.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,11 @@ post:
6969
additionalProperties: false
7070
properties:
7171
objectID:
72-
type: string
73-
example: objectID1
72+
$ref: '../../responses/common.yml#/objectID'
7473
nbHits:
7574
type: integer
7675
queryID:
77-
type: string
78-
pattern: '[a-f0-9]{32}'
79-
example: 43b15df305339e827f0ac0bdc5ebcaa7
76+
$ref: '../../responses/common.yml#/queryID'
8077
'400':
8178
$ref: '../../responses/BadRequest.yml'
8279
'404':

openapi_spec/paths/indexes/saveObject.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ post:
2727
createdAt:
2828
type: string
2929
taskID:
30-
type: integer
30+
$ref: '../../responses/common.yml#/taskID'
3131
objectID:
32-
type: string
32+
$ref: '../../responses/common.yml#/objectID'
3333
'400':
3434
$ref: '../../responses/BadRequest.yml'
3535
'404':

openapi_spec/paths/indexes/search.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,12 @@ post:
2626
additionalProperties: false
2727
properties:
2828
objectID:
29-
type: string
30-
example: objectID1
29+
$ref: '../../responses/common.yml#/objectID'
3130
nbHits:
3231
type: integer
3332
queryID:
3433
type: string
35-
pattern: '[a-f0-9]{32}'
34+
pattern: '^[a-f0-9]{32}$'
3635
example: 43b15df305339e827f0ac0bdc5ebcaa7
3736
'400':
3837
$ref: '../../responses/BadRequest.yml'

openapi_spec/responses/common.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
taskID:
2+
type: integer
3+
description: taskID of the indexing task to wait for.
4+
objectID:
5+
type: string
6+
description: Unique identifier of the object
7+
objectIDs:
8+
type: array
9+
items:
10+
type: string
11+
description: List of objectID
12+
queryID:
13+
type: string
14+
pattern: '^[a-f0-9]{32}$'
15+
example: 43b15df305339e827f0ac0bdc5ebcaa7

0 commit comments

Comments
 (0)