/
1.2.1.yaml
307 lines (307 loc) · 8.53 KB
/
1.2.1.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
openapi: 3.0.1
info:
title: Enricher API
description: This is an OpenAPI document for enriched data. It is used by Webhook
Features directly.
version: 1.2.1
servers:
- url: /
paths:
/v2/fake:
get:
tags:
- EnricherService
description: "this is just a holder, it is not generated"
operationId: fakeApi
responses:
"200":
description: yay
components:
schemas:
EnrichedFeatures:
required:
- environment
- featureKeys
properties:
targetEnrichmentDestination:
type: string
description: "If there is a specific target for the data, everything else\
\ _should_ ignore it"
nullable: true
environment:
$ref: '#/components/schemas/PublishEnvironment'
featureKeys:
type: array
description: These are the keys of the features that were updated
items:
type: string
description: A full environment with all of its features. This will filter out
any management environmentInfo data
PublishAction:
type: string
description: "Indicates what type of update this is. If CREATE, it is a new\
\ record, if UPDATE it updates an existing one, if DELETE you should delete\
\ the record. If EMPTY then it indicates there are no records of this type\
\ and you shouldn't expect to see any further. EMPTY is used to indicate that\
\ the Master process is complete."
enum:
- CREATE
- UPDATE
- DELETE
- EMPTY
PublishEnvironment:
required:
- action
- environment
- oId
- pId
- aId
- fv
- sa
- c
properties:
environment:
$ref: '#/components/schemas/CacheEnvironment'
action:
$ref: '#/components/schemas/PublishAction'
oId:
type: string
description: organizationId
format: uuid
pId:
type: string
description: portfolioId
format: uuid
aId:
type: string
description: applicationId
format: uuid
fv:
type: array
description: featureValues
items:
$ref: '#/components/schemas/CacheEnvironmentFeature'
sa:
type: array
description: serviceAccounts
items:
type: string
format: UUID
c:
type: integer
description: count
description: Even a EMPTY message must set all the data to junk as it is an
unusual situation
CacheEnvironment:
required:
- id
- version
type: object
properties:
id:
type: string
format: uuid
version:
type: integer
format: int64
eInf:
type: object
additionalProperties:
type: string
description: Allows extensibility for the environment
x-longname: environmentInfo
wInfo:
type: object
additionalProperties:
type: string
description: Stores all of the unique data for webhooks
nullable: true
x-longname: webhookEnvironment
CacheEnvironmentFeature:
required:
- feature
type: object
properties:
feature:
$ref: '#/components/schemas/CacheFeature'
fp:
type: object
additionalProperties:
type: string
description: Any additional properties configured by System Operator
nullable: true
x-longname: featureProperties
value:
nullable: true
allOf:
- $ref: '#/components/schemas/CacheFeatureValue'
description: A feature and its possible value
CacheFeature:
required:
- id
- key
- valueType
- version
type: object
properties:
id:
type: string
format: uuid
key:
type: string
description: Unique within this application
valueType:
$ref: '#/components/schemas/FeatureValueType'
version:
type: integer
description: used for optimistic locking when renaming a feature
format: int64
CacheFeatureValue:
required:
- id
- key
- locked
- version
properties:
id:
type: string
format: uuid
key:
type: string
locked:
type: boolean
value:
description: default value if no strategy matches. interpreted by type in
parent
rolloutStrategies:
type: array
description: These are custom rollout strategies that only apply to this
feature value.
items:
$ref: '#/components/schemas/CacheRolloutStrategy'
version:
type: integer
description: used for optimistic locking
format: int64
retired:
type: boolean
description: "if true or null, this feature will visible on edge. if false,\
\ it will not be passed to the client"
pId:
type: string
description: personIdWhoChanged
format: uuid
CacheRolloutStrategy:
description: This is the model for the rollout strategy as required by Dacha
and Edge
allOf:
- $ref: '#/components/schemas/BaseRolloutStrategy'
- required:
- attributes
- id
type: object
properties:
id:
type: string
description: strategy id
attributes:
type: array
items:
$ref: '#/components/schemas/CacheRolloutStrategyAttribute'
CacheRolloutStrategyAttribute:
allOf:
- $ref: '#/components/schemas/RolloutStrategyAttribute'
- required:
- conditional
- fieldName
- type
type: object
FeatureValueType:
type: string
enum:
- BOOLEAN
- STRING
- NUMBER
- JSON
BaseStrategy:
properties:
percentage:
type: integer
description: value between 0 and 1000000 - for four decimal places
nullable: true
percentageAttributes:
type: array
description: "if you don't wish to apply percentage based on user id, you\
\ can use one or more attributes defined here"
nullable: true
items:
type: string
default: []
attributes:
type: array
nullable: true
items:
$ref: '#/components/schemas/RolloutStrategyAttribute'
default: []
description: "if the feature in an environment is different from its default,\
\ this will be the reason for it. a rollout strategy is defined at the Application\
\ level and then applied to a specific feature value. When they are copied\
\ to the cache layer they are cloned and the feature value for that strategy\
\ is inserted into the clone and those are published."
BaseRolloutStrategy:
allOf:
- $ref: '#/components/schemas/BaseStrategy'
- type: object
properties:
value:
description: when we attach the RolloutStrategy for Dacha or SSE this
lets us push the value out. Only visible in SDK and SSE Edge.
nullable: true
RolloutStrategyAttribute:
required:
- conditional
- fieldName
- type
properties:
id:
type: string
description: An ID that needs to exist for validation
nullable: true
conditional:
$ref: '#/components/schemas/RolloutStrategyAttributeConditional'
fieldName:
type: string
values:
type: array
description: the value(s) associated with this rule
items:
$ref: '#/components/schemas/RolloutStrategyArrayType'
default: []
type:
$ref: '#/components/schemas/RolloutStrategyFieldType'
RolloutStrategyArrayType:
description: values depend on the field type
RolloutStrategyFieldType:
type: string
enum:
- STRING
- SEMANTIC_VERSION
- NUMBER
- DATE
- DATETIME
- BOOLEAN
- IP_ADDRESS
RolloutStrategyAttributeConditional:
type: string
enum:
- EQUALS
- ENDS_WITH
- STARTS_WITH
- GREATER
- GREATER_EQUALS
- LESS
- LESS_EQUALS
- NOT_EQUALS
- INCLUDES
- EXCLUDES
- REGEX