From 660c2be91fb63fbcb949961923943fca3fc4583b Mon Sep 17 00:00:00 2001 From: Leonardo Gavaudan Date: Fri, 18 Jul 2025 16:19:40 +0200 Subject: [PATCH] Add customSearchParameters to Variant schema, and add direction query param for GET abtests --- specs/abtesting-v3/common/parameters.yml | 11 +++++++++++ specs/abtesting-v3/common/schemas/Variant.yml | 6 ++++++ specs/abtesting-v3/paths/abtests.yml | 8 ++++++++ 3 files changed, 25 insertions(+) diff --git a/specs/abtesting-v3/common/parameters.yml b/specs/abtesting-v3/common/parameters.yml index e88c606ebf5..3f68996c31d 100644 --- a/specs/abtesting-v3/common/parameters.yml +++ b/specs/abtesting-v3/common/parameters.yml @@ -156,3 +156,14 @@ metric: - name: conversionRate - name: clickThroughRate - name: trackedSearchCount + +direction: + type: string + description: | + Sort order for A/B tests by start date. + Use 'asc' for ascending or 'desc' for descending. + Active A/B tests are always listed first. + enum: + - asc + - desc + example: desc diff --git a/specs/abtesting-v3/common/schemas/Variant.yml b/specs/abtesting-v3/common/schemas/Variant.yml index d7c69e7ebed..ddc2e2193ce 100644 --- a/specs/abtesting-v3/common/schemas/Variant.yml +++ b/specs/abtesting-v3/common/schemas/Variant.yml @@ -29,6 +29,12 @@ variant: $ref: '#/metrics' metadata: $ref: '#/variantMetadata' + customSearchParameters: + type: object + description: | + Search parameters applied to this variant when the same index is used for multiple variants. + Only present if custom search parameters were provided during test creation. + example: {'enablePersonalization': true, 'personalizationImpact': 50} required: - index diff --git a/specs/abtesting-v3/paths/abtests.yml b/specs/abtesting-v3/paths/abtests.yml index e31ce03e6c1..18b1b221f4c 100644 --- a/specs/abtesting-v3/paths/abtests.yml +++ b/specs/abtesting-v3/paths/abtests.yml @@ -96,6 +96,14 @@ get: example: '_development' schema: type: string + - name: direction + in: query + description: | + Sort order for A/B tests by start date. + Use 'asc' for ascending or 'desc' for descending. Active A/B tests are always listed first. + example: desc + schema: + $ref: '../common/parameters.yml#/direction' responses: '200': description: OK