From eaa98cc35ff82bc3f935407546a4d5d42c29206e Mon Sep 17 00:00:00 2001 From: Gagan Trivedi Date: Mon, 8 Jun 2026 15:45:16 +0530 Subject: [PATCH] feat(sdk): make evaluation result variant required and nullable Follow-up to #7704. The flag engine and SDKs always populate `variant` (the variant's key, "control" for the control bucket, or null when no multivariate split applied), mirroring OpenFeature's always-present, nullable ResolutionDetails.variant. Make the schema match: `variant` becomes required with type [string, null]. --- sdk/evaluation-result.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sdk/evaluation-result.json b/sdk/evaluation-result.json index 5afd5c5aa12f..2d71eb3356e5 100644 --- a/sdk/evaluation-result.json +++ b/sdk/evaluation-result.json @@ -28,9 +28,12 @@ "type": "string" }, "variant": { - "description": "A stable identifier of the selected multivariate variant. Omitted when no variant was selected, or when the selected variant has no key set.", + "description": "A stable identifier of the multivariate variant the identity was bucketed into: the variant's key, \"control\" for the control bucket, or null when no multivariate split applied (a standard feature, an unkeyed variant, or evaluation without an identity).", "title": "Variant", - "type": "string" + "type": [ + "string", + "null" + ] }, "metadata": { "existingJavaType": "java.util.Map", @@ -43,7 +46,8 @@ "name", "enabled", "value", - "reason" + "reason", + "variant" ], "title": "FlagResult", "type": "object"