Skip to content

Commit

Permalink
more fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
millotp committed Nov 9, 2021
1 parent 7cf934a commit 47fc15d
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 55 deletions.
50 changes: 24 additions & 26 deletions openapi_spec/paths/indexes/batch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,31 @@ post:
content:
application/json:
schema:
allOf:
- $ref: "../../schemas/SearchParams.yml"
- type: object
properties:
requests:
type: array
items:
title: operation
type: object
properties:
requests:
type: array
items:
title: operation
type: object
additionalProperties: false
properties:
action:
type: string
enum:
- "addObject"
- "updateObject"
- "partialUpdateObject"
- "partialUpdateObjectNoCreate"
- "deleteObject"
- "delete"
- "clear"
description: type of operation
body:
type: object
additionalProperties: false
properties:
action:
type: string
enum:
- "addObject"
- "updateObject"
- "partialUpdateObject"
- "partialUpdateObjectNoCreate"
- "deleteObject"
- "delete"
- "clear"
description: type of operation
body:
type: object
# this could be a long oneOf with every possibilities
additionalProperties: true
description: arguments to the operation (depends on the type of the operation)
# this could be a long oneOf with every possibilities
additionalProperties: true
description: arguments to the operation (depends on the type of the operation)
responses:
"200":
description: OK
Expand Down
4 changes: 3 additions & 1 deletion openapi_spec/paths/indexes/saveObject.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ post:
type: object
additionalProperties: false
properties:
createdAt:
type: string
taskID:
type: number
type: integer
objectID:
type: string
"400":
Expand Down
62 changes: 34 additions & 28 deletions openapi_spec/paths/indexes/searchMulti.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,41 @@ post:
content:
application/json:
schema:
type: array
items:
title: multipleQueries
type: object
additionalProperties: false
properties:
indexName:
type: string
example: products
description: The Algolia index name
query:
type: string
description: The query to search for
type:
type: string
enum: [default, facet]
default: default
description: Perform a search query with `default`, will search for facet values if `facet` is given
facet:
type: string
description: The `facet` name
params:
type: object
additionalProperties: false
properties:
requests:
type: array
items:
title: multipleQueries
type: object
additionalProperties: true
description: A key-value mapping of additional search parameters
example:
filters: "in_stock:true"
required:
- indexName
additionalProperties: false
properties:
indexName:
type: string
example: products
description: The Algolia index name
query:
type: string
description: The query to search for
type:
type: string
enum: [default, facet]
default: default
description: Perform a search query with `default`, will search for facet values if `facet` is given
facet:
type: string
description: The `facet` name
params:
type: string
description: A query string of search parameters
required:
- indexName
strategy:
type: string
enum: ["none", "stopIfEnoughMatches"]
required:
- requests
responses:
"200":
description: OK
Expand Down

0 comments on commit 47fc15d

Please sign in to comment.