Skip to content
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
description: Feature not enabled.
content:
application/json:
schema:
$ref: '../schemas/ErrorResponses.yml#/featureNotEnabled'
13 changes: 13 additions & 0 deletions specs/advanced-personalization/common/schemas/Configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,16 @@ status:
$ref: '../enums.yml#/errorCodes'
lastUpdatedAt:
type: string

features:
type: object
properties:
realtime:
$ref: '#/realtime'

realtime:
type: object
properties:
enabled:
type: boolean
description: Whether the realtime personalization feature is enabled.
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ configurationObject:
$ref: './Configuration.yml#/profileType'
status:
$ref: './Configuration.yml#/status'
required: [indices, personalzationReRanking, profileType, status]
features:
$ref: './Configuration.yml#/features'
required: [indices, personalzationReRanking, profileType, status, features]
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ unauthorized:
description: HTTP status code for an authorization error.
enum: [401]

paymentRequired:
type: integer
description: HTTP status code for a payment required error.
enum: [402]

notFound:
type: integer
description: HTTP status code for a not found error.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ unauthorized:
description: Details about the response, such as error messages.
enum: [Unauthorized]

featureNotEnabled:
type: string
description: Details about the response, such as error messages.
enum:
- "Predictive profiles are not allowed for this app. Please contact support to upgrade your plan: https://support.algolia.com/"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we use the link https://alg.li/support in the doc and spec to refer to support, is this another support page ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the link that the short URL redirects to. I can make a note to use this in our API responses, but it won't be a priority.

- "Realtime Personalization is not allowed for this app. Please contact support to upgrade your plan: https://support.algolia.com/"

genericNotFound:
type: string
description: Details about the response, such as error messages.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,11 @@ internalServerError:
$ref: './ErrorCodes.yml#/internalServerError'
message:
$ref: './ErrorMessages.yml#/internalServerError'

featureNotEnabled:
type: object
properties:
status:
$ref: './ErrorCodes.yml#/paymentRequired'
message:
$ref: './ErrorMessages.yml#/featureNotEnabled'
6 changes: 5 additions & 1 deletion specs/advanced-personalization/paths/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ put:
$ref: '../common/schemas/Configuration.yml#/personalizationReRanking'
profileType:
$ref: '../common/schemas/Configuration.yml#/profileType'
required: [indices, personalizationReRanking, profileType]
features:
$ref: '../common/schemas/Configuration.yml#/features'
required: [indices, personalizationReRanking, profileType, features]
responses:
'200':
description: OK
Expand All @@ -94,5 +96,7 @@ put:
$ref: '../common/responses/BadRequest.yml'
'401':
$ref: '../common/responses/Unauthorized.yml'
'402':
$ref: '../common/responses/FeatureNotEnabled.yml'
'500':
$ref: '../common/responses/InternalServerError.yml'