File tree Expand file tree Collapse file tree 12 files changed +126
-0
lines changed Expand file tree Collapse file tree 12 files changed +126
-0
lines changed Original file line number Diff line number Diff line change 98
98
$ref : ' paths/stopABTest.yml'
99
99
/2/abtests/schedule :
100
100
$ref : ' paths/scheduleABTest.yml'
101
+
102
+ # ###############
103
+ # ### Helpers ###
104
+ # ###############
105
+ /setAlgoliaApiKey :
106
+ $ref : ' ../common/helpers/setAlgoliaApiKey.yml#/method'
Original file line number Diff line number Diff line change @@ -165,3 +165,9 @@ paths:
165
165
# ########################
166
166
/2/status :
167
167
$ref : ' paths/status/getStatus.yml'
168
+
169
+ # ###############
170
+ # ### Helpers ###
171
+ # ###############
172
+ /setAlgoliaApiKey :
173
+ $ref : ' ../common/helpers/setAlgoliaApiKey.yml#/method'
Original file line number Diff line number Diff line change
1
+ method :
2
+ get :
3
+ x-helper : true
4
+ x-asynchronous-helper : false
5
+ tags :
6
+ - Api Key
7
+ operationId : setAlgoliaApiKey
8
+ summary : Switch the API key used to authenticate requests
9
+ description : |
10
+ Switch the API key used to authenticate requests.
11
+ parameters :
12
+ - in : query
13
+ name : apiKey
14
+ description : API key to be used from now on.
15
+ required : true
16
+ schema :
17
+ type : string
18
+ responses :
19
+ ' 200 ' :
20
+ description : OK
21
+ content :
22
+ application/json :
23
+ schema :
24
+ type : string
25
+ ' 400 ' :
26
+ $ref : ' ../../common/responses/IndexNotFound.yml'
Original file line number Diff line number Diff line change @@ -191,3 +191,9 @@ paths:
191
191
$ref : ' paths/runs/events/events.yml'
192
192
/1/runs/{runID}/events/{eventID} :
193
193
$ref : ' paths/runs/events/eventID.yml'
194
+
195
+ # ###############
196
+ # ### Helpers ###
197
+ # ###############
198
+ /setAlgoliaApiKey :
199
+ $ref : ' ../common/helpers/setAlgoliaApiKey.yml#/method'
Original file line number Diff line number Diff line change @@ -100,3 +100,9 @@ paths:
100
100
101
101
/1/usertokens/{userToken} :
102
102
$ref : ' paths/deleteUserToken.yml'
103
+
104
+ # ###############
105
+ # ### Helpers ###
106
+ # ###############
107
+ /setAlgoliaApiKey :
108
+ $ref : ' ../common/helpers/setAlgoliaApiKey.yml#/method'
Original file line number Diff line number Diff line change 97
97
$ref : ' paths/getReachability.yml'
98
98
/1/infrastructure/{metric}/period/{period} :
99
99
$ref : ' paths/getMetrics.yml'
100
+
101
+ # ###############
102
+ # ### Helpers ###
103
+ # ###############
104
+ /setAlgoliaApiKey :
105
+ $ref : ' ../common/helpers/setAlgoliaApiKey.yml#/method'
Original file line number Diff line number Diff line change 92
92
$ref : ' paths/deleteUserProfile.yml'
93
93
/1/strategies/personalization :
94
94
$ref : ' paths/personalizationStrategy.yml'
95
+
96
+ # ###############
97
+ # ### Helpers ###
98
+ # ###############
99
+ /setAlgoliaApiKey :
100
+ $ref : ' ../common/helpers/setAlgoliaApiKey.yml#/method'
Original file line number Diff line number Diff line change 92
92
$ref : ' paths/getConfigurationStatus.yml'
93
93
/1/logs/{indexName} :
94
94
$ref : ' paths/getLogFile.yml'
95
+
96
+ # ###############
97
+ # ### Helpers ###
98
+ # ###############
99
+ /setAlgoliaApiKey :
100
+ $ref : ' ../common/helpers/setAlgoliaApiKey.yml#/method'
Original file line number Diff line number Diff line change @@ -131,3 +131,9 @@ paths:
131
131
132
132
/1/indexes/{indexName}/{model}/recommend/rules/search :
133
133
$ref : ' paths/searchRecommendRules.yml'
134
+
135
+ # ###############
136
+ # ### Helpers ###
137
+ # ###############
138
+ /setAlgoliaApiKey :
139
+ $ref : ' ../common/helpers/setAlgoliaApiKey.yml#/method'
Original file line number Diff line number Diff line change @@ -387,3 +387,6 @@ paths:
387
387
388
388
/partialUpdateObjects :
389
389
$ref : ' helpers/partialUpdateObjects.yml#/method'
390
+
391
+ /setAlgoliaApiKey :
392
+ $ref : ' ../common/helpers/setAlgoliaApiKey.yml#/method'
Original file line number Diff line number Diff line change 63
63
$ref : ' paths/statistic.yml'
64
64
/1/usage/{statistic}/{indexName} :
65
65
$ref : ' paths/statisticIndex.yml'
66
+
67
+ # ###############
68
+ # ### Helpers ###
69
+ # ###############
70
+ /setAlgoliaApiKey :
71
+ $ref : ' ../common/helpers/setAlgoliaApiKey.yml#/method'
Original file line number Diff line number Diff line change
1
+ [
2
+ {
3
+ "testName" : " switch API key" ,
4
+ "steps" : [
5
+ {
6
+ "type" : " createClient" ,
7
+ "parameters" : {
8
+ "appId" : " test-app-id" ,
9
+ "apiKey" : " test-api-key"
10
+ }
11
+ },
12
+ {
13
+ "type" : " method" ,
14
+ "method" : " customGet" ,
15
+ "parameters" : {
16
+ "path" : " check-api-key"
17
+ },
18
+ "expected" : {
19
+ "type" : " response" ,
20
+ "match" : " test-api-key"
21
+ }
22
+ },
23
+ {
24
+ "type" : " method" ,
25
+ "method" : " setAlgoliaApiKey" ,
26
+ "parameters" : {
27
+ "apiKey" : " updated-api-key"
28
+ }
29
+ },
30
+ {
31
+ "type" : " method" ,
32
+ "method" : " customGet" ,
33
+ "parameters" : {
34
+ "path" : " check-api-key"
35
+ },
36
+ "expected" : {
37
+ "type" : " response" ,
38
+ "match" : " updated-api-key"
39
+ }
40
+ }
41
+ ]
42
+ }
43
+ ]
You can’t perform that action at this time.
0 commit comments