Skip to content

Commit

Permalink
create common response file with taskID and objectID
Browse files Browse the repository at this point in the history
  • Loading branch information
millotp committed Nov 10, 2021
1 parent f2a4845 commit 4966251
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 14 deletions.
6 changes: 2 additions & 4 deletions openapi_spec/paths/indexes/batch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,9 @@ post:
additionalProperties: false
properties:
taskID:
type: integer
$ref: '../../responses/common.yml#/taskID'
objectIDs:
type: array
items:
type: string
$ref: '../../responses/common.yml#/objectIDs'
'400':
$ref: '../../responses/BadRequest.yml'
'404':
Expand Down
7 changes: 2 additions & 5 deletions openapi_spec/paths/indexes/multipleQueries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,11 @@ post:
additionalProperties: false
properties:
objectID:
type: string
example: objectID1
$ref: '../../responses/common.yml#/objectID'
nbHits:
type: integer
queryID:
type: string
pattern: '[a-f0-9]{32}'
example: 43b15df305339e827f0ac0bdc5ebcaa7
$ref: '../../responses/common.yml#/queryID'
'400':
$ref: '../../responses/BadRequest.yml'
'404':
Expand Down
4 changes: 2 additions & 2 deletions openapi_spec/paths/indexes/saveObject.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ post:
createdAt:
type: string
taskID:
type: integer
$ref: '../../responses/common.yml#/taskID'
objectID:
type: string
$ref: '../../responses/common.yml#/objectID'
'400':
$ref: '../../responses/BadRequest.yml'
'404':
Expand Down
5 changes: 2 additions & 3 deletions openapi_spec/paths/indexes/search.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@ post:
additionalProperties: false
properties:
objectID:
type: string
example: objectID1
$ref: '../../responses/common.yml#/objectID'
nbHits:
type: integer
queryID:
type: string
pattern: '[a-f0-9]{32}'
pattern: '^[a-f0-9]{32}$'
example: 43b15df305339e827f0ac0bdc5ebcaa7
'400':
$ref: '../../responses/BadRequest.yml'
Expand Down
15 changes: 15 additions & 0 deletions openapi_spec/responses/common.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
taskID:
type: integer
description: taskID of the indexing task to wait for.
objectID:
type: string
description: Unique identifier of the object
objectIDs:
type: array
items:
type: string
description: List of objectID
queryID:
type: string
pattern: '^[a-f0-9]{32}$'
example: 43b15df305339e827f0ac0bdc5ebcaa7

0 comments on commit 4966251

Please sign in to comment.