Skip to content

Commit d1596a8

Browse files
fix(specs): Add customSearchParameters to Variant schema, and add direction query param for GET abtests (#5130)
Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 5305772 commit d1596a8

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

specs/abtesting-v3/common/parameters.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,14 @@ createMetric:
156156
- name: conversionRate
157157
- name: clickThroughRate
158158
- name: trackedSearchCount
159+
160+
direction:
161+
type: string
162+
description: |
163+
Sort order for A/B tests by start date.
164+
Use 'asc' for ascending or 'desc' for descending.
165+
Active A/B tests are always listed first.
166+
enum:
167+
- asc
168+
- desc
169+
example: desc

specs/abtesting-v3/common/schemas/Variant.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ variant:
2929
$ref: '#/metrics'
3030
metadata:
3131
$ref: '#/variantMetadata'
32+
customSearchParameters:
33+
type: object
34+
description: |
35+
Search parameters applied to this variant when the same index is used for multiple variants.
36+
Only present if custom search parameters were provided during test creation.
37+
example: {'enablePersonalization': true, 'personalizationImpact': 50}
3238

3339
required:
3440
- index

specs/abtesting-v3/paths/abtests.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ get:
9696
example: '_development'
9797
schema:
9898
type: string
99+
- name: direction
100+
in: query
101+
description: |
102+
Sort order for A/B tests by start date.
103+
Use 'asc' for ascending or 'desc' for descending. Active A/B tests are always listed first.
104+
example: desc
105+
schema:
106+
$ref: '../common/parameters.yml#/direction'
99107
responses:
100108
'200':
101109
description: OK

0 commit comments

Comments
 (0)