Skip to content

Commit 7b4f3b2

Browse files
authored
chore(evaluation-context): Remove extra fields, clarify key semantics (#6176)
1 parent 71bf912 commit 7b4f3b2

File tree

2 files changed

+6
-26
lines changed

2 files changed

+6
-26
lines changed

sdk/evaluation-context.json

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
"description": "Represents an environment context for feature flag evaluation.",
55
"properties": {
66
"key": {
7-
"description": "An environment's unique identifier.",
7+
"description": "Unique environment key. May be used for selecting a value for a multivariate feature, or for % split segmentation.",
88
"title": "Key",
9-
"type": "string",
10-
"x-flagsmith-engine-condition-property": "$.environment.key"
9+
"type": "string"
1110
},
1211
"name": {
1312
"description": "An environment's human-readable name.",
@@ -27,15 +26,10 @@
2726
"description": "Represents a feature context for feature flag evaluation.",
2827
"properties": {
2928
"key": {
30-
"description": "Key used when selecting a value for a multivariate feature. Set to an internal identifier or a UUID, depending on Flagsmith implementation.",
29+
"description": "Unique feature key used when selecting a variant if the feature is multivariate. Set to an internal identifier or a UUID, depending on Flagsmith implementation.",
3130
"title": "Key",
3231
"type": "string"
3332
},
34-
"feature_key": {
35-
"description": "Unique feature identifier.",
36-
"title": "Feature Key",
37-
"type": "string"
38-
},
3933
"name": {
4034
"description": "Feature name.",
4135
"title": "Name",
@@ -78,7 +72,6 @@
7872
},
7973
"required": [
8074
"key",
81-
"feature_key",
8275
"name",
8376
"enabled",
8477
"value"
@@ -122,7 +115,7 @@
122115
"description": "Represents an identity context for feature flag evaluation.",
123116
"properties": {
124117
"identifier": {
125-
"description": "A unique identifier for an identity, used for segment and multivariate feature flag targeting, and displayed in the Flagsmith UI.",
118+
"description": "A unique identifier for an identity as displayed in the Flagsmith UI.",
126119
"title": "Identifier",
127120
"type": "string",
128121
"x-flagsmith-engine-condition-property": "$.identity.identifier"
@@ -148,8 +141,7 @@
148141
}
149142
},
150143
"required": [
151-
"identifier",
152-
"key"
144+
"identifier"
153145
],
154146
"title": "IdentityContext",
155147
"type": "object"
@@ -158,7 +150,7 @@
158150
"description": "Represents a segment context for feature flag evaluation.",
159151
"properties": {
160152
"key": {
161-
"description": "Key used for % split segmentation.",
153+
"description": "Unique segment key used for % split segmentation.",
162154
"title": "Key",
163155
"type": "string"
164156
},

sdk/evaluation-result.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
"$defs": {
33
"FlagResult": {
44
"properties": {
5-
"feature_key": {
6-
"description": "Unique feature identifier.",
7-
"title": "Feature Key",
8-
"type": "string"
9-
},
105
"name": {
116
"description": "Feature name.",
127
"title": "Name",
@@ -40,7 +35,6 @@
4035
}
4136
},
4237
"required": [
43-
"feature_key",
4438
"name",
4539
"enabled",
4640
"value",
@@ -51,11 +45,6 @@
5145
},
5246
"SegmentResult": {
5347
"properties": {
54-
"key": {
55-
"description": "Unique segment identifier.",
56-
"title": "Key",
57-
"type": "string"
58-
},
5948
"name": {
6049
"description": "Segment name.",
6150
"title": "Name",
@@ -69,7 +58,6 @@
6958
}
7059
},
7160
"required": [
72-
"key",
7361
"name"
7462
],
7563
"title": "SegmentResult",

0 commit comments

Comments
 (0)