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

feat(specs): add new realtime key to config endpoints [PRED-3615] #4481

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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'
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/"
- "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'
12 changes: 12 additions & 0 deletions specs/advanced-personalization/common/schemas/Features.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
features:
type: object
properties:
realtime:
$ref: '#/realtime'

realtime:
type: object
properties:
enabled:
type: bool
description: Whether the realtime personalization feature is enabled.
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/Features.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'
Loading