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(specs): more flexible custom methods #2889

Merged
merged 7 commits into from
Mar 21, 2024
Merged
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
2 changes: 1 addition & 1 deletion specs/abtesting/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ paths:
# ######################
# ### Custom request ###
# ######################
/1{path}:
/{path}:
$ref: '../common/paths/customRequest.yml'

/2/abtests:
Expand Down
2 changes: 1 addition & 1 deletion specs/analytics/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ paths:
# ######################
# ### Custom request ###
# ######################
/1{path}:
/{path}:
$ref: '../common/paths/customRequest.yml'

# ##################################
Expand Down
2 changes: 1 addition & 1 deletion specs/ingestion/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ paths:
# ######################
# ### Custom request ###
# ######################
/1{path}:
/{path}:
$ref: '../common/paths/customRequest.yml'

# authentications API.
Expand Down
2 changes: 1 addition & 1 deletion specs/insights/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ paths:
# ######################
# ### Custom request ###
# ######################
/1{path}:
/{path}:
$ref: '../common/paths/customRequest.yml'

/1/events:
Expand Down
2 changes: 1 addition & 1 deletion specs/monitoring/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ paths:
# ######################
# ### Custom request ###
# ######################
/1{path}:
/{path}:
$ref: '../common/paths/customRequest.yml'

/1/status:
Expand Down
2 changes: 1 addition & 1 deletion specs/personalization/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ paths:
# ######################
# ### Custom request ###
# ######################
/1{path}:
/{path}:
$ref: '../common/paths/customRequest.yml'

/1/profiles/personalization/{userToken}:
Expand Down
2 changes: 1 addition & 1 deletion specs/query-suggestions/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ paths:
# ######################
# ### Custom request ###
# ######################
/1{path}:
/{path}:
$ref: '../common/paths/customRequest.yml'

/1/configs:
Expand Down
4 changes: 2 additions & 2 deletions specs/recommend/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ paths:
# ######################
# ### Custom request ###
# ######################
/1{path}:
/{path}:
$ref: '../common/paths/customRequest.yml'

/1/indexes/*/recommendations:
Expand All @@ -62,4 +62,4 @@ paths:
$ref: 'paths/getRecommendStatus.yml'

/1/indexes/{indexName}/{model}/recommend/rules/search:
$ref: 'paths/searchRecommendRules.yml'
$ref: 'paths/searchRecommendRules.yml'
2 changes: 1 addition & 1 deletion specs/search/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ paths:
# ######################
# ### Custom request ###
# ######################
/1{path}:
/{path}:
$ref: '../common/paths/customRequest.yml'

# ########################
Expand Down
2 changes: 1 addition & 1 deletion tests/CTS/client/analytics/parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"object": "$client",
"path": "customPost",
"parameters": {
"path": "/test"
"path": "test"
},
"expected": {
"type": "host",
Expand Down
6 changes: 3 additions & 3 deletions tests/CTS/client/common/commonApi.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"object": "$client",
"path": "customPost",
"parameters": {
"path": "/test"
"path": "1/test"
},
"expected": {
"type": "userAgent",
Expand All @@ -24,7 +24,7 @@
"object": "$client",
"path": "customGet",
"parameters": {
"path": "/test"
"path": "1/test"
},
"expected": {
"type": "timeouts",
Expand All @@ -44,7 +44,7 @@
"object": "$client",
"path": "customPost",
"parameters": {
"path": "/test"
"path": "1/test"
},
"expected": {
"type": "timeouts",
Expand Down
2 changes: 1 addition & 1 deletion tests/CTS/client/insights/parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"object": "$client",
"path": "customDelete",
"parameters": {
"path": "/test"
"path": "test"
},
"expected": {
"type": "host",
Expand Down
2 changes: 1 addition & 1 deletion tests/CTS/client/monitoring/parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"object": "$client",
"path": "customDelete",
"parameters": {
"path": "/test"
"path": "test"
},
"expected": {
"type": "host",
Expand Down
4 changes: 2 additions & 2 deletions tests/CTS/client/recommend/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"object": "$client",
"path": "customGet",
"parameters": {
"path": "/test"
"path": "test"
},
"expected": {
"type": "host",
Expand All @@ -42,7 +42,7 @@
"object": "$client",
"path": "customPost",
"parameters": {
"path": "/test"
"path": "test"
},
"expected": {
"type": "host",
Expand Down
8 changes: 4 additions & 4 deletions tests/CTS/client/search/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"object": "$client",
"path": "customGet",
"parameters": {
"path": "/test"
"path": "test"
},
"expected": {
"type": "host",
Expand All @@ -42,7 +42,7 @@
"object": "$client",
"path": "customPost",
"parameters": {
"path": "/test"
"path": "test"
},
"expected": {
"type": "host",
Expand Down Expand Up @@ -78,7 +78,7 @@
"object": "$client",
"path": "customGet",
"parameters": {
"path": "/test/retry"
"path": "1/test/retry"
},
"expected": {
"type": "response",
Expand Down Expand Up @@ -113,7 +113,7 @@
"object": "$client",
"path": "customPost",
"parameters": {
"path": "/test/gzip",
"path": "1/test/gzip",
"parameters": {},
"body": {
"message": "this is a compressed body"
Expand Down
8 changes: 4 additions & 4 deletions tests/CTS/requests/common/customDelete.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
{
"testName": "allow del method for a custom path with minimal parameters",
"parameters": {
"path": "/test/minimal"
"path": "test/minimal"
},
"request": {
"path": "/1/test/minimal",
"path": "/test/minimal",
"method": "DELETE"
}
},
{
"testName": "allow del method for a custom path with all parameters",
"parameters": {
"path": "/test/all",
"path": "test/all",
"parameters": {
"query": "parameters"
}
},
"request": {
"path": "/1/test/all",
"path": "/test/all",
"method": "DELETE",
"queryParameters": {
"query": "parameters"
Expand Down
12 changes: 6 additions & 6 deletions tests/CTS/requests/common/customGet.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
{
"testName": "allow get method for a custom path with minimal parameters",
"parameters": {
"path": "/test/minimal"
"path": "test/minimal"
},
"request": {
"path": "/1/test/minimal",
"path": "/test/minimal",
"method": "GET"
}
},
{
"testName": "allow get method for a custom path with all parameters",
"parameters": {
"path": "/test/all",
"path": "test/all",
"parameters": {
"query": "parameters with space"
}
},
"request": {
"path": "/1/test/all",
"path": "/test/all",
"method": "GET",
"queryParameters": {
"query": "parameters%20with%20space"
Expand All @@ -28,7 +28,7 @@
{
"testName": "requestOptions should be escaped too",
"parameters": {
"path": "/test/all",
"path": "test/all",
"parameters": {
"query": "to be overriden"
}
Expand All @@ -46,7 +46,7 @@
}
},
"request": {
"path": "/1/test/all",
"path": "/test/all",
"method": "GET",
"queryParameters": {
"query": "parameters%20with%20space",
Expand Down
Loading
Loading