Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(java): spec for one of #157

Merged
merged 3 commits into from
Mar 3, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions specs/analytics/common/schemas/getTopHits.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
getTopHitsResponse:
topHitsResponse:
type: object
additionalProperties: false
required:
Expand All @@ -19,7 +19,7 @@ getTopHitsResponse:
count:
$ref: ../../../common/parameters.yml#/count

getTopHitsResponseWithAnalytics:
topHitsResponseWithAnalytics:
type: object
additionalProperties: false
required:
Expand Down Expand Up @@ -54,3 +54,8 @@ getTopHitsResponseWithAnalytics:
$ref: '../parameters.yml#/clickCount'
conversionCount:
$ref: '../parameters.yml#/conversionCount'

getTopHitsResponse:
oneOf:
- $ref: '#/topHitsResponse'
- $ref: '#/topHitsResponseWithAnalytics'
9 changes: 7 additions & 2 deletions specs/analytics/common/schemas/getTopSearches.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
getTopSearchesResponse:
topSearchesResponse:
type: object
additionalProperties: false
required:
Expand All @@ -22,7 +22,7 @@ getTopSearchesResponse:
nbHits:
$ref: ../../../search/common/schemas/SearchResponse.yml#/nbHits

getTopSearchesResponseWithAnalytics:
topSearchesResponseWithAnalytics:
type: object
additionalProperties: false
required:
Expand Down Expand Up @@ -63,3 +63,8 @@ getTopSearchesResponseWithAnalytics:
$ref: '../parameters.yml#/conversionCount'
nbHits:
$ref: ../../../search/common/schemas/SearchResponse.yml#/nbHits

getTopSearchesResponse:
oneOf:
- $ref: '#/topSearchesResponse'
- $ref: '#/topSearchesResponseWithAnalytics'
4 changes: 1 addition & 3 deletions specs/analytics/paths/search/getTopHits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ get:
content:
application/json:
schema:
oneOf:
- $ref: '../../common/schemas/getTopHits.yml#/getTopHitsResponse'
- $ref: '../../common/schemas/getTopHits.yml#/getTopHitsResponseWithAnalytics'
$ref: '../../common/schemas/getTopHits.yml#/getTopHitsResponse'
'400':
$ref: ../../../common/responses/BadRequest.yml
'402':
Expand Down
4 changes: 1 addition & 3 deletions specs/analytics/paths/search/getTopSearches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ get:
content:
application/json:
schema:
oneOf:
- $ref: '../../common/schemas/getTopSearches.yml#/getTopSearchesResponse'
- $ref: '../../common/schemas/getTopSearches.yml#/getTopSearchesResponseWithAnalytics'
$ref: '../../common/schemas/getTopSearches.yml#/getTopSearchesResponse'
'400':
$ref: ../../../common/responses/BadRequest.yml
'402':
Expand Down
20 changes: 12 additions & 8 deletions specs/bundled/analytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ components:
type: integer
description: Number of hits that the search query matched.
example: 20
getTopSearchesResponse:
getTopSearchesResponseSimple:
type: object
additionalProperties: false
required:
Expand Down Expand Up @@ -202,6 +202,10 @@ components:
$ref: '#/components/schemas/conversionCount'
nbHits:
$ref: '#/components/schemas/nbHits'
getTopSearchesResponse:
oneOf:
- $ref: '#/components/schemas/getTopSearchesResponseSimple'
- $ref: '#/components/schemas/getTopSearchesResponseWithAnalytics'
ErrorBase:
description: Error.
type: object
Expand All @@ -216,7 +220,7 @@ components:
hit:
description: The hit.
type: string
getTopHitsResponse:
getTopHitsResponseSimple:
type: object
additionalProperties: false
required:
Expand Down Expand Up @@ -271,6 +275,10 @@ components:
$ref: '#/components/schemas/clickCount'
conversionCount:
$ref: '#/components/schemas/conversionCount'
getTopHitsResponse:
oneOf:
- $ref: '#/components/schemas/getTopHitsResponseSimple'
- $ref: '#/components/schemas/getTopHitsResponseWithAnalytics'
attribute:
description: The attribute.
type: string
Expand Down Expand Up @@ -439,9 +447,7 @@ paths:
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/getTopSearchesResponse'
- $ref: '#/components/schemas/getTopSearchesResponseWithAnalytics'
$ref: '#/components/schemas/getTopSearchesResponse'
'400':
$ref: '#/components/responses/BadRequest'
'402':
Expand Down Expand Up @@ -765,9 +771,7 @@ paths:
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/getTopHitsResponse'
- $ref: '#/components/schemas/getTopHitsResponseWithAnalytics'
$ref: '#/components/schemas/getTopHitsResponse'
'400':
$ref: '#/components/responses/BadRequest'
'402':
Expand Down
16 changes: 9 additions & 7 deletions specs/bundled/recommend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ components:
type: integer
description: Specify the page to retrieve.
default: 0
aroundRadius:
description: Define the maximum radius for a geo search (in meters).
oneOf:
- type: integer
minimum: 1
- type: string
enum:
- all
baseSearchParams:
type: object
additionalProperties: false
Expand Down Expand Up @@ -115,13 +123,7 @@ components:
from the requester's IP address.
default: false
aroundRadius:
description: Define the maximum radius for a geo search (in meters).
oneOf:
- type: integer
minimum: 1
- type: string
enum:
- all
$ref: '#/components/schemas/aroundRadius'
aroundPrecision:
type: integer
description: >-
Expand Down
114 changes: 62 additions & 52 deletions specs/bundled/search.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,7 @@ components:
description: The dictionary to search in.
required: true
schema:
enum:
- plurals
- stopwords
- compounds
type: string
$ref: '#/components/schemas/dictionaryType'
Page:
in: query
name: page
Expand Down Expand Up @@ -145,6 +141,14 @@ components:
type: integer
description: Specify the page to retrieve.
default: 0
aroundRadius:
description: Define the maximum radius for a geo search (in meters).
oneOf:
- type: integer
minimum: 1
- type: string
enum:
- all
baseSearchParams:
type: object
additionalProperties: false
Expand Down Expand Up @@ -235,13 +239,7 @@ components:
from the requester's IP address.
default: false
aroundRadius:
description: Define the maximum radius for a geo search (in meters).
oneOf:
- type: integer
minimum: 1
- type: string
enum:
- all
$ref: '#/components/schemas/aroundRadius'
aroundPrecision:
type: integer
description: >-
Expand Down Expand Up @@ -987,6 +985,17 @@ components:
updatedAt:
type: string
description: Date of last update (ISO-8601 format).
builtInOperationType:
type: string
enum:
- Increment
- Decrement
- Add
- Remove
- AddUnique
- IncrementFrom
- IncrementSet
description: The operation to apply on the attribute.
builtInOperation:
type: object
description: >-
Expand All @@ -995,16 +1004,7 @@ components:
additionalProperties: false
properties:
_operation:
type: string
enum:
- Increment
- Decrement
- Add
- Remove
- AddUnique
- IncrementFrom
- IncrementSet
description: The operation to apply on the attribute.
$ref: '#/components/schemas/builtInOperationType'
value:
type: string
description: >-
Expand All @@ -1013,6 +1013,10 @@ components:
required:
- _operation
- value
attributeOrBuiltInOperation:
oneOf:
- $ref: '#/components/schemas/attribute'
- $ref: '#/components/schemas/builtInOperation'
action:
type: string
enum:
Expand Down Expand Up @@ -1183,6 +1187,23 @@ components:
required:
- hits
- nbHits
acl:
type: string
enum:
- addObject
- analytics
- browse
- deleteObject
- deleteIndex
- editSettings
- listIndexes
- logs
- personalization
- recommendation
- search
- seeUnretrievableAttributes
- settings
- usage
apiKey:
type: object
description: Api Key object.
Expand All @@ -1193,22 +1214,7 @@ components:
description: Set of permissions associated with the key.
default: []
items:
type: string
enum:
- addObject
- analytics
- browse
- deleteObject
- deleteIndex
- editSettings
- listIndexes
- logs
- personalization
- recommendation
- search
- seeUnretrievableAttributes
- settings
- usage
$ref: '#/components/schemas/acl'
description:
type: string
description: >-
Expand Down Expand Up @@ -1501,6 +1507,12 @@ components:
type: integer
default: 20
description: Maximum number of hits in a page. Minimum is 1, maximum is 1000.
dictionaryType:
type: string
enum:
- plurals
- stopwords
- compounds
dictionaryAction:
type: string
enum:
Expand Down Expand Up @@ -1651,6 +1663,14 @@ components:
type: array
items:
$ref: '#/components/schemas/source'
logType:
type: string
enum:
- all
- query
- build
- error
default: all
operationType:
type: string
enum:
Expand Down Expand Up @@ -2296,15 +2316,12 @@ paths:
application/json:
schema:
type: array
additionalProperties: false
items:
type: object
title: attributeToUpdate
description: Attribute to update.
additionalProperties:
oneOf:
- $ref: '#/components/schemas/attribute'
- $ref: '#/components/schemas/builtInOperation'
$ref: '#/components/schemas/attributeOrBuiltInOperation'
responses:
'200':
$ref: '#/components/responses/UpdatedAtWithObjectId'
Expand Down Expand Up @@ -2338,7 +2355,7 @@ paths:
requests:
type: array
items:
title: operation
title: Operation
type: object
additionalProperties: false
properties:
Expand Down Expand Up @@ -2393,7 +2410,7 @@ paths:
requests:
type: array
items:
title: Operation.
title: OperationIndexName
type: object
additionalProperties: false
properties:
Expand Down Expand Up @@ -3870,20 +3887,13 @@ paths:
schema:
type: string
nullable: true
default: null
- name: type
in: query
description: >-
Type of log entries to retrieve. When omitted, all log entries are
retrieved.
schema:
type: string
enum:
- all
- query
- build
- error
default: all
$ref: '#/components/schemas/logType'
responses:
'200':
description: OK
Expand Down
Loading