Skip to content

Commit f8cee69

Browse files
author
Samuel Bodin
authored
fix(spec): finish tags (#483)
1 parent 89e2b2f commit f8cee69

16 files changed

+169
-82
lines changed

netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[build]
22
command="BUNDLE_WITH_DOC=true DOCKER=true yarn cli build specs all && yarn website:build"
33
publish="website/build"
4-
ignore="git diff --quiet $COMMIT_REF $CACHED_COMMIT_REF -- website/"
4+
ignore="git diff --quiet $COMMIT_REF $CACHED_COMMIT_REF -- website/ specs/"
55

66
[build.environment]
77
YARN_VERSION = "3.1.1"

specs/personalization/paths/deleteUserProfile.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
delete:
2+
tags:
3+
- profiles
24
operationId: deleteUserProfile
3-
description: Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means that if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile. It might take a couple hours before for the deletion request to be fully processed.
4-
summary: Delete the user profile and all its associated data.
5+
summary: Delete a user profile.
6+
description: |
7+
Delete the user profile and all its associated data.
8+
9+
Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile.
10+
11+
It might take a couple hours for the deletion request to be fully processed.
512
parameters:
613
- $ref: '../common/parameters.yml#/UserToken'
714
responses:
@@ -21,7 +28,7 @@ delete:
2128
$ref: '../common/parameters.yml#/userToken'
2229
deletedUntil:
2330
type: string
24-
description: A date until which the data can safely be considered as deleted for the given user. Any data received after the deletedUntil date will start building a new user profile.
31+
description: A date until which the data can safely be considered as deleted for the given user. Any data received after the `deletedUntil` date will start building a new user profile.
2532
'400':
2633
$ref: '../../common/responses/BadRequest.yml'
2734
'402':

specs/personalization/paths/getUserTokenProfile.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
get:
2+
tags:
3+
- profiles
24
operationId: getUserTokenProfile
3-
description: The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes.
4-
summary: Get the user profile built from Personalization strategy.
5+
summary: Get a user profile.
6+
description: |
7+
Get the user profile built from Personalization strategy.
8+
9+
The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes.
510
parameters:
611
- $ref: '../common/parameters.yml#/UserToken'
712
responses:

specs/personalization/paths/personalizationStrategy.yml

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,31 @@
1+
get:
2+
tags:
3+
- strategies
4+
operationId: getPersonalizationStrategy
5+
summary: Get the current strategy.
6+
description: The strategy contains information on the events and facets that impact user profiles and personalized search results.
7+
responses:
8+
'200':
9+
description: OK
10+
content:
11+
application/json:
12+
schema:
13+
$ref: '../common/schemas/personalizationStrategy.yml#/personalizationStrategyParams'
14+
'400':
15+
$ref: '../../common/responses/BadRequest.yml'
16+
'402':
17+
$ref: '../../common/responses/FeatureNotEnabled.yml'
18+
'403':
19+
$ref: '../../common/responses/MethodNotAllowed.yml'
20+
'404':
21+
$ref: '../../common/responses/IndexNotFound.yml'
22+
123
post:
24+
tags:
25+
- strategies
226
operationId: setPersonalizationStrategy
27+
summary: Set a new strategy.
328
description: A strategy defines the events and facets that impact user profiles and personalized search results.
4-
summary: Set a new personalization strategy.
529
requestBody:
630
required: true
731
content:
@@ -31,22 +55,3 @@ post:
3155
$ref: '../../common/responses/MethodNotAllowed.yml'
3256
'404':
3357
$ref: '../../common/responses/IndexNotFound.yml'
34-
get:
35-
operationId: getPersonalizationStrategy
36-
description: The strategy contains information on the events and facets that impact user profiles and personalized search results.
37-
summary: Get the current personalization strategy.
38-
responses:
39-
'200':
40-
description: OK
41-
content:
42-
application/json:
43-
schema:
44-
$ref: '../common/schemas/personalizationStrategy.yml#/personalizationStrategyParams'
45-
'400':
46-
$ref: '../../common/responses/BadRequest.yml'
47-
'402':
48-
$ref: '../../common/responses/FeatureNotEnabled.yml'
49-
'403':
50-
$ref: '../../common/responses/MethodNotAllowed.yml'
51-
'404':
52-
$ref: '../../common/responses/IndexNotFound.yml'

specs/personalization/spec.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ servers:
2020
security:
2121
- appId: []
2222
apiKey: []
23+
tags:
24+
- name: profiles
25+
x-displayName: Profiles
26+
description: Manage users' profiles.
27+
- name: strategies
28+
x-displayName: Strategies
29+
description: Manage personalization strategies.
30+
x-tagGroups:
31+
- name: General
32+
tags:
33+
- profiles
34+
- strategies
2335
paths:
2436
# ######################
2537
# ### Custom request ###

specs/predict/paths/fetchUserProfile.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
post:
2+
tags:
3+
- profiles
24
operationId: fetchUserProfile
35
description: Get predictions, properties (raw, computed or custom) and segments (computed or custom) for a user profile.
46
summary: Get user profile.

specs/predict/spec.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ servers:
2020
security:
2121
- appId: []
2222
apiKey: []
23+
tags:
24+
- name: profiles
25+
x-displayName: Profiles
26+
description: Manage users' profiles.
27+
x-tagGroups:
28+
- name: General
29+
tags:
30+
- profiles
2331
paths:
2432
# ######################
2533
# ### Custom request ###

specs/query-suggestions/paths/getConfigurationStatus.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
get:
2+
tags:
3+
- configurations
24
operationId: getConfigStatus
5+
summary: Get configuration status.
36
description: >
47
Get the status of a Query Suggestion's index.
58
69
The status includes whether the Query Suggestions index is currently in the process of being built, and the last build time.
7-
summary: Get the status of a Query Suggestion's index.
810
parameters:
911
- $ref: '../../common/parameters.yml#/IndexName'
1012
responses:

specs/query-suggestions/paths/getLogFile.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
get:
2+
tags:
3+
- advanced
24
operationId: getLogFile
5+
summary: Get a log file.
36
description: Get the log file of the last build of a single Query Suggestion index.
4-
summary: Get the log file of the last build of a single Query Suggestion index.
57
parameters:
68
- $ref: '../../common/parameters.yml#/IndexName'
79
responses:

specs/query-suggestions/paths/qsConfig.yml

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,35 @@
1+
get:
2+
tags:
3+
- configurations
4+
operationId: getConfig
5+
summary: Get a single configuration.
6+
description: Get the configuration of a single Query Suggestions index.
7+
parameters:
8+
- $ref: '../../common/parameters.yml#/IndexName'
9+
responses:
10+
'200':
11+
description: OK
12+
content:
13+
application/json:
14+
schema:
15+
$ref: '../common/schemas/QuerySuggestionsIndex.yml#/QuerySuggestionsIndex'
16+
'400':
17+
$ref: '../../common/responses/BadRequest.yml'
18+
'401':
19+
$ref: '../../common/responses/Unauthorized.yml'
20+
'403':
21+
$ref: '../../common/responses/MethodNotAllowed.yml'
22+
'404':
23+
$ref: '../../common/responses/IndexNotFound.yml'
24+
'500':
25+
$ref: '../../common/responses/InternalError.yml'
26+
127
put:
28+
tags:
29+
- configurations
230
operationId: updateConfig
31+
summary: Update a configuration.
332
description: Update the configuration of a Query Suggestions index.
4-
summary: Update the configuration of a Query Suggestions index.
533
parameters:
634
- $ref: '../../common/parameters.yml#/IndexName'
735
requestBody:
@@ -19,14 +47,16 @@ put:
1947
$ref: '../../common/responses/InternalError.yml'
2048

2149
delete:
50+
tags:
51+
- configurations
2252
operationId: deleteConfig
53+
summary: Delete a configuration.
2354
description: >
2455
Delete a configuration of a Query Suggestion's index.
2556
2657
By deleting a configuraton, you stop all updates to the underlying query suggestion index.
2758
2859
Note that when doing this, the underlying index does not change - existing suggestions remain untouched.
29-
summary: Delete a configuration of a Query Suggestion's index.
3060
parameters:
3161
- $ref: '../../common/parameters.yml#/IndexName'
3262
responses:
@@ -38,27 +68,3 @@ delete:
3868
$ref: '../../common/responses/MethodNotAllowed.yml'
3969
'500':
4070
$ref: '../../common/responses/InternalError.yml'
41-
42-
get:
43-
operationId: getConfig
44-
description: Get the configuration of a single Query Suggestions index.
45-
summary: Get the configuration of a single Query Suggestions index.
46-
parameters:
47-
- $ref: '../../common/parameters.yml#/IndexName'
48-
responses:
49-
'200':
50-
description: OK
51-
content:
52-
application/json:
53-
schema:
54-
$ref: '../common/schemas/QuerySuggestionsIndex.yml#/QuerySuggestionsIndex'
55-
'400':
56-
$ref: '../../common/responses/BadRequest.yml'
57-
'401':
58-
$ref: '../../common/responses/Unauthorized.yml'
59-
'403':
60-
$ref: '../../common/responses/MethodNotAllowed.yml'
61-
'404':
62-
$ref: '../../common/responses/IndexNotFound.yml'
63-
'500':
64-
$ref: '../../common/responses/InternalError.yml'
Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,12 @@
1-
post:
2-
operationId: createConfig
3-
description: Create a configuration of a Query Suggestions index. There's a limit of 100 configurations per application.
4-
summary: Create a configuration of a Query Suggestions index.
5-
requestBody:
6-
required: true
7-
content:
8-
application/json:
9-
schema:
10-
$ref: '../common/parameters.yml#/QuerySuggestionsIndexWithIndexParam'
11-
responses:
12-
'200':
13-
$ref: '../../common/responses/Success.yml'
14-
'400':
15-
$ref: '../../common/responses/BadRequest.yml'
16-
'401':
17-
$ref: '../../common/responses/Unauthorized.yml'
18-
'403':
19-
$ref: '../../common/responses/MethodNotAllowed.yml'
20-
'422':
21-
$ref: '../../common/responses/StatusUnprocessableEntity.yml'
22-
'500':
23-
$ref: '../../common/responses/InternalError.yml'
24-
251
get:
2+
tags:
3+
- configurations
264
operationId: getAllConfigs
5+
summary: List configurations.
276
description: >
287
Get all the configurations of Query Suggestions.
298
309
For each index, you get a block of JSON with a list of its configuration settings.
31-
summary: Get all the configurations of Query Suggestions.
3210
responses:
3311
'200':
3412
description: OK
@@ -46,3 +24,29 @@ get:
4624
$ref: '../../common/responses/StatusUnprocessableEntity.yml'
4725
'500':
4826
$ref: '../../common/responses/InternalError.yml'
27+
28+
post:
29+
tags:
30+
- configurations
31+
operationId: createConfig
32+
summary: Create a configuration.
33+
description: Create a configuration of a Query Suggestions index. There's a limit of 100 configurations per application.
34+
requestBody:
35+
required: true
36+
content:
37+
application/json:
38+
schema:
39+
$ref: '../common/parameters.yml#/QuerySuggestionsIndexWithIndexParam'
40+
responses:
41+
'200':
42+
$ref: '../../common/responses/Success.yml'
43+
'400':
44+
$ref: '../../common/responses/BadRequest.yml'
45+
'401':
46+
$ref: '../../common/responses/Unauthorized.yml'
47+
'403':
48+
$ref: '../../common/responses/MethodNotAllowed.yml'
49+
'422':
50+
$ref: '../../common/responses/StatusUnprocessableEntity.yml'
51+
'500':
52+
$ref: '../../common/responses/InternalError.yml'

specs/query-suggestions/spec.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,20 @@ servers:
2020
security:
2121
- appId: []
2222
apiKey: []
23+
tags:
24+
- name: advanced
25+
x-displayName: Advanced
26+
description: Advanced operations.
27+
- name: configurations
28+
x-displayName: Configurations
29+
description: Manage Query Suggestions configurations.
30+
x-tagGroups:
31+
- name: General
32+
tags:
33+
- configurations
34+
- name: Others
35+
tags:
36+
- advanced
2337
paths:
2438
# ######################
2539
# ### Custom request ###

specs/recommend/paths/getRecommendations.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
post:
2+
tags:
3+
- recommendations
24
operationId: getRecommendations
3-
description: Returns recommendations for a specific model and objectID.
4-
summary: Returns recommendations for a specific model and objectID.
5+
summary: Get results.
6+
description: Returns recommendations or trending results, for a specific model and `objectID`.
57
requestBody:
68
required: true
79
content:

specs/recommend/spec.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ servers:
3333
security:
3434
- appId: []
3535
apiKey: []
36+
tags:
37+
- name: recommendations
38+
x-displayName: Recommendations & Trending
39+
description: Manage recommendations.
40+
x-tagGroups:
41+
- name: General
42+
tags:
43+
- recommendations
3644
paths:
3745
# ######################
3846
# ### Custom request ###

specs/sources/paths/ingest/postUrl.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
post:
2+
tags:
3+
- jobs
24
operationId: postIngestUrl
3-
summary: Create a new ingestion job via URL.
5+
summary: Create fetch URL job.
46
description: Add an ingestion job that will fetch data from an URL.
57
requestBody:
68
required: true

specs/sources/spec.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ servers:
2020
security:
2121
- appId: []
2222
apiKey: []
23+
tags:
24+
- name: jobs
25+
x-displayName: Jobs
26+
description: Manage jobs.
27+
x-tagGroups:
28+
- name: General
29+
tags:
30+
- jobs
2331
paths:
2432
# ######################
2533
# ### Custom request ###

0 commit comments

Comments
 (0)