rbflagr 0.1.2 → 1.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +17 -7
- data/docs/CreateFlagRequest.md +2 -0
- data/docs/CreateTagRequest.md +8 -0
- data/docs/Distribution.md +0 -1
- data/docs/EvalContext.md +4 -2
- data/docs/EvalResult.md +8 -7
- data/docs/EvaluationBatchRequest.md +3 -1
- data/docs/EvaluationEntity.md +1 -1
- data/docs/ExportApi.md +97 -0
- data/docs/Flag.md +7 -0
- data/docs/FlagApi.md +46 -1
- data/docs/Health.md +8 -0
- data/docs/HealthApi.md +9 -6
- data/docs/PutFlagRequest.md +5 -1
- data/docs/PutVariantRequest.md +1 -1
- data/docs/Tag.md +9 -0
- data/docs/TagApi.md +198 -0
- data/lib/rbflagr/api/constraint_api.rb +3 -3
- data/lib/rbflagr/api/distribution_api.rb +3 -3
- data/lib/rbflagr/api/evaluation_api.rb +3 -3
- data/lib/rbflagr/api/export_api.rb +118 -0
- data/lib/rbflagr/api/flag_api.rb +56 -3
- data/lib/rbflagr/api/health_api.rb +15 -12
- data/lib/rbflagr/api/segment_api.rb +3 -3
- data/lib/rbflagr/api/tag_api.rb +253 -0
- data/lib/rbflagr/api/variant_api.rb +3 -3
- data/lib/rbflagr/api_client.rb +8 -6
- data/lib/rbflagr/api_error.rb +3 -3
- data/lib/rbflagr/configuration.rb +5 -5
- data/lib/rbflagr/models/constraint.rb +5 -4
- data/lib/rbflagr/models/create_constraint_request.rb +5 -4
- data/lib/rbflagr/models/create_flag_request.rb +29 -8
- data/lib/rbflagr/models/create_segment_request.rb +5 -4
- data/lib/rbflagr/models/create_tag_request.rb +208 -0
- data/lib/rbflagr/models/create_variant_request.rb +5 -4
- data/lib/rbflagr/models/distribution.rb +6 -29
- data/lib/rbflagr/models/error.rb +5 -4
- data/lib/rbflagr/models/eval_context.rb +35 -44
- data/lib/rbflagr/models/eval_debug_log.rb +5 -4
- data/lib/rbflagr/models/eval_result.rb +15 -135
- data/lib/rbflagr/models/evaluation_batch_request.rb +34 -13
- data/lib/rbflagr/models/evaluation_batch_response.rb +5 -4
- data/lib/rbflagr/models/evaluation_entity.rb +5 -28
- data/lib/rbflagr/models/flag.rb +92 -8
- data/lib/rbflagr/models/flag_snapshot.rb +5 -4
- data/lib/rbflagr/models/health.rb +184 -0
- data/lib/rbflagr/models/put_distributions_request.rb +5 -4
- data/lib/rbflagr/models/put_flag_request.rb +49 -20
- data/lib/rbflagr/models/put_segment_reorder_request.rb +5 -4
- data/lib/rbflagr/models/put_segment_request.rb +5 -4
- data/lib/rbflagr/models/put_variant_request.rb +5 -9
- data/lib/rbflagr/models/segment.rb +5 -4
- data/lib/rbflagr/models/segment_debug_log.rb +5 -4
- data/lib/rbflagr/models/set_flag_enabled_request.rb +5 -4
- data/lib/rbflagr/models/tag.rb +232 -0
- data/lib/rbflagr/models/variant.rb +5 -4
- data/lib/rbflagr/version.rb +4 -4
- data/lib/rbflagr.rb +8 -3
- data/rbflagr.gemspec +5 -4
- data/spec/api/export_api_spec.rb +45 -0
- data/spec/api/tag_api_spec.rb +79 -0
- data/spec/models/create_tag_request_spec.rb +41 -0
- data/spec/models/health_spec.rb +41 -0
- data/spec/models/tag_spec.rb +47 -0
- data/swagger.yaml +309 -43
- data/swagger_ruby.json +1 -1
- metadata +72 -32
@@ -0,0 +1,45 @@
|
|
1
|
+
=begin
|
2
|
+
#Flagr
|
3
|
+
|
4
|
+
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.13
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for Flagr::ExportApi
|
17
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'ExportApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@instance = Flagr::ExportApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of ExportApi' do
|
30
|
+
it 'should create an instance of ExportApi' do
|
31
|
+
expect(@instance).to be_instance_of(Flagr::ExportApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for get_export_sq_lite
|
36
|
+
# Export sqlite3 format of the db dump, which is converted from the main database.
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [File]
|
39
|
+
describe 'get_export_sq_lite test' do
|
40
|
+
it 'should work' do
|
41
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
=begin
|
2
|
+
#Flagr
|
3
|
+
|
4
|
+
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.1.10
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for Flagr::TagApi
|
17
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'TagApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@instance = Flagr::TagApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of TagApi' do
|
30
|
+
it 'should create an instance of TagApi' do
|
31
|
+
expect(@instance).to be_instance_of(Flagr::TagApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for create_tag
|
36
|
+
# @param flag_id numeric ID of the flag
|
37
|
+
# @param body create a tag
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @return [Tag]
|
40
|
+
describe 'create_tag test' do
|
41
|
+
it 'should work' do
|
42
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# unit tests for delete_tag
|
47
|
+
# @param flag_id numeric ID of the flag
|
48
|
+
# @param tag_id numeric ID of the tag
|
49
|
+
# @param [Hash] opts the optional parameters
|
50
|
+
# @return [nil]
|
51
|
+
describe 'delete_tag test' do
|
52
|
+
it 'should work' do
|
53
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
# unit tests for find_all_tags
|
58
|
+
# @param [Hash] opts the optional parameters
|
59
|
+
# @option opts [Integer] :limit the numbers of tags to return
|
60
|
+
# @option opts [Integer] :offset return tags given the offset, it should usually set together with limit
|
61
|
+
# @option opts [String] :value_like return tags partially matching given value
|
62
|
+
# @return [Array<Tag>]
|
63
|
+
describe 'find_all_tags test' do
|
64
|
+
it 'should work' do
|
65
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
# unit tests for find_tags
|
70
|
+
# @param flag_id numeric ID of the flag
|
71
|
+
# @param [Hash] opts the optional parameters
|
72
|
+
# @return [Array<Tag>]
|
73
|
+
describe 'find_tags test' do
|
74
|
+
it 'should work' do
|
75
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
=begin
|
2
|
+
#Flagr
|
3
|
+
|
4
|
+
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.1.10
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for Flagr::CreateTagRequest
|
18
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'CreateTagRequest' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = Flagr::CreateTagRequest.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of CreateTagRequest' do
|
31
|
+
it 'should create an instance of CreateTagRequest' do
|
32
|
+
expect(@instance).to be_instance_of(Flagr::CreateTagRequest)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "value"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
=begin
|
2
|
+
#Flagr
|
3
|
+
|
4
|
+
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.1.10
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for Flagr::Health
|
18
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'Health' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = Flagr::Health.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of Health' do
|
31
|
+
it 'should create an instance of Health' do
|
32
|
+
expect(@instance).to be_instance_of(Flagr::Health)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "status"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
=begin
|
2
|
+
#Flagr
|
3
|
+
|
4
|
+
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.1.10
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for Flagr::Tag
|
18
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'Tag' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = Flagr::Tag.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of Tag' do
|
31
|
+
it 'should create an instance of Tag' do
|
32
|
+
expect(@instance).to be_instance_of(Flagr::Tag)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "id"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'test attribute "value"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
data/swagger.yaml
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
swagger: '2.0'
|
2
2
|
info:
|
3
|
-
description:
|
3
|
+
description: >
|
4
4
|
Flagr is a feature flagging, A/B testing and dynamic configuration
|
5
|
-
microservice
|
5
|
+
microservice. The base path for all the APIs is "/api/v1".
|
6
6
|
title: Flagr
|
7
|
-
version: 1.
|
7
|
+
version: 1.1.12
|
8
8
|
tags:
|
9
9
|
- name: flag
|
10
10
|
description: Everything about the flag
|
@@ -28,12 +28,16 @@ x-tagGroups:
|
|
28
28
|
- constraint
|
29
29
|
- distribution
|
30
30
|
- variant
|
31
|
+
- tag
|
31
32
|
- name: Flag Evaluation
|
32
33
|
tags:
|
33
34
|
- evaluation
|
34
35
|
- name: Health Check
|
35
36
|
tags:
|
36
37
|
- health
|
38
|
+
- name: Export
|
39
|
+
tags:
|
40
|
+
- export
|
37
41
|
consumes:
|
38
42
|
- application/json
|
39
43
|
produces:
|
@@ -61,10 +65,18 @@ paths:
|
|
61
65
|
name: description
|
62
66
|
type: string
|
63
67
|
description: return flags exactly matching given description
|
68
|
+
- in: query
|
69
|
+
name: tags
|
70
|
+
type: string
|
71
|
+
description: return flags with the given tags (comma separated)
|
64
72
|
- in: query
|
65
73
|
name: description_like
|
66
74
|
type: string
|
67
75
|
description: return flags partially matching given description
|
76
|
+
- in: query
|
77
|
+
name: key
|
78
|
+
type: string
|
79
|
+
description: return flags matching given key
|
68
80
|
- in: query
|
69
81
|
name: offset
|
70
82
|
type: integer
|
@@ -72,6 +84,10 @@ paths:
|
|
72
84
|
description: >-
|
73
85
|
return flags given the offset, it should usually set together with
|
74
86
|
limit
|
87
|
+
- in: query
|
88
|
+
name: preload
|
89
|
+
type: boolean
|
90
|
+
description: return flags with preloaded segments and variants
|
75
91
|
responses:
|
76
92
|
'200':
|
77
93
|
description: list all the flags
|
@@ -125,6 +141,25 @@ paths:
|
|
125
141
|
description: generic error response
|
126
142
|
schema:
|
127
143
|
$ref: '#/definitions/error'
|
144
|
+
delete:
|
145
|
+
tags:
|
146
|
+
- flag
|
147
|
+
operationId: deleteFlag
|
148
|
+
parameters:
|
149
|
+
- in: path
|
150
|
+
name: flagID
|
151
|
+
description: numeric ID of the flag
|
152
|
+
required: true
|
153
|
+
type: integer
|
154
|
+
format: int64
|
155
|
+
minimum: 1
|
156
|
+
responses:
|
157
|
+
'200':
|
158
|
+
description: OK deleted
|
159
|
+
default:
|
160
|
+
description: generic error response
|
161
|
+
schema:
|
162
|
+
$ref: '#/definitions/error'
|
128
163
|
put:
|
129
164
|
tags:
|
130
165
|
- flag
|
@@ -152,10 +187,39 @@ paths:
|
|
152
187
|
description: generic error response
|
153
188
|
schema:
|
154
189
|
$ref: '#/definitions/error'
|
155
|
-
|
190
|
+
'/flags/{flagID}/enabled':
|
191
|
+
put:
|
156
192
|
tags:
|
157
193
|
- flag
|
158
|
-
operationId:
|
194
|
+
operationId: setFlagEnabled
|
195
|
+
parameters:
|
196
|
+
- in: path
|
197
|
+
name: flagID
|
198
|
+
description: numeric ID of the flag to get
|
199
|
+
required: true
|
200
|
+
type: integer
|
201
|
+
format: int64
|
202
|
+
minimum: 1
|
203
|
+
- in: body
|
204
|
+
name: body
|
205
|
+
description: set flag enabled state
|
206
|
+
required: true
|
207
|
+
schema:
|
208
|
+
$ref: '#/definitions/setFlagEnabledRequest'
|
209
|
+
responses:
|
210
|
+
'200':
|
211
|
+
description: returns the flag
|
212
|
+
schema:
|
213
|
+
$ref: '#/definitions/flag'
|
214
|
+
default:
|
215
|
+
description: generic error response
|
216
|
+
schema:
|
217
|
+
$ref: '#/definitions/error'
|
218
|
+
'/flags/{flagID}/tags':
|
219
|
+
get:
|
220
|
+
tags:
|
221
|
+
- tag
|
222
|
+
operationId: findTags
|
159
223
|
parameters:
|
160
224
|
- in: path
|
161
225
|
name: flagID
|
@@ -166,35 +230,65 @@ paths:
|
|
166
230
|
minimum: 1
|
167
231
|
responses:
|
168
232
|
'200':
|
169
|
-
description:
|
233
|
+
description: tag ordered by tagID
|
234
|
+
schema:
|
235
|
+
type: array
|
236
|
+
items:
|
237
|
+
$ref: '#/definitions/tag'
|
170
238
|
default:
|
171
239
|
description: generic error response
|
172
240
|
schema:
|
173
241
|
$ref: '#/definitions/error'
|
174
|
-
|
175
|
-
put:
|
242
|
+
post:
|
176
243
|
tags:
|
177
|
-
-
|
178
|
-
operationId:
|
244
|
+
- tag
|
245
|
+
operationId: createTag
|
179
246
|
parameters:
|
180
247
|
- in: path
|
181
248
|
name: flagID
|
182
|
-
description: numeric ID of the flag
|
249
|
+
description: numeric ID of the flag
|
183
250
|
required: true
|
184
251
|
type: integer
|
185
252
|
format: int64
|
186
253
|
minimum: 1
|
187
254
|
- in: body
|
188
255
|
name: body
|
189
|
-
description:
|
256
|
+
description: create a tag
|
190
257
|
required: true
|
191
258
|
schema:
|
192
|
-
$ref: '#/definitions/
|
259
|
+
$ref: '#/definitions/createTagRequest'
|
193
260
|
responses:
|
194
261
|
'200':
|
195
|
-
description:
|
262
|
+
description: tag just created
|
196
263
|
schema:
|
197
|
-
$ref: '#/definitions/
|
264
|
+
$ref: '#/definitions/tag'
|
265
|
+
default:
|
266
|
+
description: generic error response
|
267
|
+
schema:
|
268
|
+
$ref: '#/definitions/error'
|
269
|
+
'/flags/{flagID}/tags/{tagID}':
|
270
|
+
delete:
|
271
|
+
tags:
|
272
|
+
- tag
|
273
|
+
operationId: deleteTag
|
274
|
+
parameters:
|
275
|
+
- in: path
|
276
|
+
name: flagID
|
277
|
+
description: numeric ID of the flag
|
278
|
+
required: true
|
279
|
+
type: integer
|
280
|
+
format: int64
|
281
|
+
minimum: 1
|
282
|
+
- in: path
|
283
|
+
name: tagID
|
284
|
+
description: numeric ID of the tag
|
285
|
+
required: true
|
286
|
+
type: integer
|
287
|
+
format: int64
|
288
|
+
minimum: 1
|
289
|
+
responses:
|
290
|
+
'200':
|
291
|
+
description: deleted
|
198
292
|
default:
|
199
293
|
description: generic error response
|
200
294
|
schema:
|
@@ -681,6 +775,56 @@ paths:
|
|
681
775
|
description: generic error response
|
682
776
|
schema:
|
683
777
|
$ref: '#/definitions/error'
|
778
|
+
/flags/entity_types:
|
779
|
+
get:
|
780
|
+
tags:
|
781
|
+
- flag
|
782
|
+
operationId: getFlagEntityTypes
|
783
|
+
responses:
|
784
|
+
'200':
|
785
|
+
description: returns all the FlagEntityTypes
|
786
|
+
schema:
|
787
|
+
type: array
|
788
|
+
items:
|
789
|
+
type: string
|
790
|
+
minLength: 1
|
791
|
+
default:
|
792
|
+
description: generic error response
|
793
|
+
schema:
|
794
|
+
$ref: '#/definitions/error'
|
795
|
+
/tags:
|
796
|
+
get:
|
797
|
+
tags:
|
798
|
+
- tag
|
799
|
+
operationId: findAllTags
|
800
|
+
parameters:
|
801
|
+
- in: query
|
802
|
+
name: limit
|
803
|
+
type: integer
|
804
|
+
format: int64
|
805
|
+
description: the numbers of tags to return
|
806
|
+
- in: query
|
807
|
+
name: offset
|
808
|
+
type: integer
|
809
|
+
format: int64
|
810
|
+
description: >-
|
811
|
+
return tags given the offset, it should usually set together with
|
812
|
+
limit
|
813
|
+
- in: query
|
814
|
+
name: value_like
|
815
|
+
type: string
|
816
|
+
description: return tags partially matching given value
|
817
|
+
responses:
|
818
|
+
'200':
|
819
|
+
description: list all the tags
|
820
|
+
schema:
|
821
|
+
type: array
|
822
|
+
items:
|
823
|
+
$ref: '#/definitions/tag'
|
824
|
+
default:
|
825
|
+
description: generic error response
|
826
|
+
schema:
|
827
|
+
$ref: '#/definitions/error'
|
684
828
|
/evaluation:
|
685
829
|
post:
|
686
830
|
tags:
|
@@ -727,9 +871,56 @@ paths:
|
|
727
871
|
get:
|
728
872
|
tags:
|
729
873
|
- health
|
874
|
+
operationId: getHealth
|
875
|
+
description: Check if Flagr is healthy
|
876
|
+
responses:
|
877
|
+
'200':
|
878
|
+
description: status of health check
|
879
|
+
schema:
|
880
|
+
$ref: '#/definitions/health'
|
881
|
+
default:
|
882
|
+
description: generic error response
|
883
|
+
schema:
|
884
|
+
$ref: '#/definitions/error'
|
885
|
+
/export/sqlite:
|
886
|
+
get:
|
887
|
+
tags:
|
888
|
+
- export
|
889
|
+
operationId: getExportSqlite
|
890
|
+
parameters:
|
891
|
+
- in: query
|
892
|
+
name: exclude_snapshots
|
893
|
+
type: boolean
|
894
|
+
description: >
|
895
|
+
export without snapshots data - useful for smaller db without
|
896
|
+
snapshots
|
897
|
+
description: >-
|
898
|
+
Export sqlite3 format of the db dump, which is converted from the main
|
899
|
+
database.
|
900
|
+
produces:
|
901
|
+
- application/octet-stream
|
730
902
|
responses:
|
731
903
|
'200':
|
732
|
-
description:
|
904
|
+
description: OK
|
905
|
+
schema:
|
906
|
+
type: file
|
907
|
+
default:
|
908
|
+
description: generic error response
|
909
|
+
schema:
|
910
|
+
$ref: '#/definitions/error'
|
911
|
+
/export/eval_cache/json:
|
912
|
+
get:
|
913
|
+
tags:
|
914
|
+
- export
|
915
|
+
operationId: getExportEvalCacheJSON
|
916
|
+
description: Export JSON format of the eval cache dump
|
917
|
+
produces:
|
918
|
+
- application/json
|
919
|
+
responses:
|
920
|
+
'200':
|
921
|
+
description: OK
|
922
|
+
schema:
|
923
|
+
type: object
|
733
924
|
default:
|
734
925
|
description: generic error response
|
735
926
|
schema:
|
@@ -747,11 +938,19 @@ definitions:
|
|
747
938
|
format: int64
|
748
939
|
minimum: 1
|
749
940
|
readOnly: true
|
941
|
+
key:
|
942
|
+
description: unique key representation of the flag
|
943
|
+
type: string
|
944
|
+
minLength: 1
|
750
945
|
description:
|
751
946
|
type: string
|
752
947
|
minLength: 1
|
753
948
|
enabled:
|
754
949
|
type: boolean
|
950
|
+
tags:
|
951
|
+
type: array
|
952
|
+
items:
|
953
|
+
$ref: '#/definitions/tag'
|
755
954
|
segments:
|
756
955
|
type: array
|
757
956
|
items:
|
@@ -765,6 +964,21 @@ definitions:
|
|
765
964
|
enabled data records will get data logging in the metrics pipeline,
|
766
965
|
for example, kafka.
|
767
966
|
type: boolean
|
967
|
+
entityType:
|
968
|
+
description: >-
|
969
|
+
it will override the entityType in the evaluation logs if it's not
|
970
|
+
empty
|
971
|
+
type: string
|
972
|
+
notes:
|
973
|
+
description: flag usage details in markdown format
|
974
|
+
type: string
|
975
|
+
createdBy:
|
976
|
+
type: string
|
977
|
+
updatedBy:
|
978
|
+
type: string
|
979
|
+
updatedAt:
|
980
|
+
type: string
|
981
|
+
format: date-time
|
768
982
|
createFlagRequest:
|
769
983
|
type: object
|
770
984
|
required:
|
@@ -773,20 +987,38 @@ definitions:
|
|
773
987
|
description:
|
774
988
|
type: string
|
775
989
|
minLength: 1
|
990
|
+
key:
|
991
|
+
description: unique key representation of the flag
|
992
|
+
type: string
|
993
|
+
template:
|
994
|
+
description: template for flag creation
|
995
|
+
type: string
|
776
996
|
putFlagRequest:
|
777
997
|
type: object
|
778
|
-
required:
|
779
|
-
- description
|
780
998
|
properties:
|
781
999
|
description:
|
782
1000
|
type: string
|
783
1001
|
minLength: 1
|
1002
|
+
x-nullable: true
|
784
1003
|
dataRecordsEnabled:
|
785
1004
|
type: boolean
|
786
1005
|
description: >-
|
787
1006
|
enabled data records will get data logging in the metrics pipeline,
|
788
1007
|
for example, kafka.
|
789
1008
|
x-nullable: true
|
1009
|
+
entityType:
|
1010
|
+
description: it will overwrite entityType into evaluation logs if it's not empty
|
1011
|
+
type: string
|
1012
|
+
x-nullable: true
|
1013
|
+
enabled:
|
1014
|
+
type: boolean
|
1015
|
+
x-nullable: true
|
1016
|
+
key:
|
1017
|
+
type: string
|
1018
|
+
x-nullable: true
|
1019
|
+
notes:
|
1020
|
+
type: string
|
1021
|
+
x-nullable: true
|
790
1022
|
setFlagEnabledRequest:
|
791
1023
|
type: object
|
792
1024
|
required:
|
@@ -812,6 +1044,27 @@ definitions:
|
|
812
1044
|
updatedAt:
|
813
1045
|
type: string
|
814
1046
|
minLength: 1
|
1047
|
+
tag:
|
1048
|
+
type: object
|
1049
|
+
required:
|
1050
|
+
- value
|
1051
|
+
properties:
|
1052
|
+
id:
|
1053
|
+
type: integer
|
1054
|
+
format: int64
|
1055
|
+
minimum: 1
|
1056
|
+
readOnly: true
|
1057
|
+
value:
|
1058
|
+
type: string
|
1059
|
+
minLength: 1
|
1060
|
+
createTagRequest:
|
1061
|
+
type: object
|
1062
|
+
required:
|
1063
|
+
- value
|
1064
|
+
properties:
|
1065
|
+
value:
|
1066
|
+
type: string
|
1067
|
+
minLength: 1
|
815
1068
|
segment:
|
816
1069
|
type: object
|
817
1070
|
required:
|
@@ -913,7 +1166,6 @@ definitions:
|
|
913
1166
|
type: object
|
914
1167
|
required:
|
915
1168
|
- key
|
916
|
-
- attachment
|
917
1169
|
properties:
|
918
1170
|
key:
|
919
1171
|
type: string
|
@@ -987,9 +1239,6 @@ definitions:
|
|
987
1239
|
format: int64
|
988
1240
|
minimum: 0
|
989
1241
|
maximum: 100
|
990
|
-
bitmap:
|
991
|
-
type: string
|
992
|
-
minLength: 1
|
993
1242
|
variantKey:
|
994
1243
|
type: string
|
995
1244
|
minLength: 1
|
@@ -1008,9 +1257,6 @@ definitions:
|
|
1008
1257
|
$ref: '#/definitions/distribution'
|
1009
1258
|
evalContext:
|
1010
1259
|
type: object
|
1011
|
-
required:
|
1012
|
-
- entityType
|
1013
|
-
- flagID
|
1014
1260
|
properties:
|
1015
1261
|
entityID:
|
1016
1262
|
type: string
|
@@ -1019,51 +1265,51 @@ definitions:
|
|
1019
1265
|
result. If it's empty, flagr will randomly generate one.
|
1020
1266
|
entityType:
|
1021
1267
|
type: string
|
1022
|
-
minLength: 1
|
1023
1268
|
entityContext:
|
1024
1269
|
type: object
|
1025
1270
|
enableDebug:
|
1026
1271
|
type: boolean
|
1027
1272
|
flagID:
|
1273
|
+
description: flagID
|
1028
1274
|
type: integer
|
1029
1275
|
format: int64
|
1030
1276
|
minimum: 1
|
1277
|
+
flagKey:
|
1278
|
+
description: >-
|
1279
|
+
flagKey. flagID or flagKey will resolve to the same flag. Either
|
1280
|
+
works.
|
1281
|
+
type: string
|
1282
|
+
flagTags:
|
1283
|
+
description: flagTags. flagTags looks up flags by tag. Either works.
|
1284
|
+
type: array
|
1285
|
+
x-omitempty: true
|
1286
|
+
items:
|
1287
|
+
type: string
|
1031
1288
|
evalResult:
|
1032
1289
|
type: object
|
1033
|
-
required:
|
1034
|
-
- flagID
|
1035
|
-
- segmentID
|
1036
|
-
- variantID
|
1037
|
-
- variantKey
|
1038
|
-
- variantAttachment
|
1039
|
-
- evalContext
|
1040
|
-
- timestamp
|
1041
1290
|
properties:
|
1042
1291
|
flagID:
|
1043
1292
|
type: integer
|
1044
1293
|
format: int64
|
1045
|
-
|
1294
|
+
flagKey:
|
1295
|
+
type: string
|
1046
1296
|
flagSnapshotID:
|
1047
1297
|
type: integer
|
1048
1298
|
format: int64
|
1049
1299
|
segmentID:
|
1050
1300
|
type: integer
|
1051
1301
|
format: int64
|
1052
|
-
minimum: 1
|
1053
1302
|
variantID:
|
1054
1303
|
type: integer
|
1055
1304
|
format: int64
|
1056
|
-
minimum: 1
|
1057
1305
|
variantKey:
|
1058
1306
|
type: string
|
1059
|
-
minLength: 1
|
1060
1307
|
variantAttachment:
|
1061
1308
|
type: object
|
1062
1309
|
evalContext:
|
1063
1310
|
$ref: '#/definitions/evalContext'
|
1064
1311
|
timestamp:
|
1065
1312
|
type: string
|
1066
|
-
minLength: 1
|
1067
1313
|
evalDebugLog:
|
1068
1314
|
$ref: '#/definitions/evalDebugLog'
|
1069
1315
|
evalDebugLog:
|
@@ -1086,21 +1332,17 @@ definitions:
|
|
1086
1332
|
type: string
|
1087
1333
|
evaluationEntity:
|
1088
1334
|
type: object
|
1089
|
-
required:
|
1090
|
-
- entityType
|
1091
1335
|
properties:
|
1092
1336
|
entityID:
|
1093
1337
|
type: string
|
1094
1338
|
entityType:
|
1095
1339
|
type: string
|
1096
|
-
minLength: 1
|
1097
1340
|
entityContext:
|
1098
1341
|
type: object
|
1099
1342
|
evaluationBatchRequest:
|
1100
1343
|
type: object
|
1101
1344
|
required:
|
1102
1345
|
- entities
|
1103
|
-
- flagIDs
|
1104
1346
|
properties:
|
1105
1347
|
entities:
|
1106
1348
|
type: array
|
@@ -1110,12 +1352,31 @@ definitions:
|
|
1110
1352
|
enableDebug:
|
1111
1353
|
type: boolean
|
1112
1354
|
flagIDs:
|
1355
|
+
description: flagIDs
|
1113
1356
|
type: array
|
1114
1357
|
items:
|
1115
1358
|
type: integer
|
1116
1359
|
format: int64
|
1117
1360
|
minimum: 1
|
1118
1361
|
minItems: 1
|
1362
|
+
flagKeys:
|
1363
|
+
description: >-
|
1364
|
+
flagKeys. Either flagIDs, flagKeys or flagTags works. If pass in
|
1365
|
+
multiples, Flagr may return duplicate results.
|
1366
|
+
type: array
|
1367
|
+
items:
|
1368
|
+
type: string
|
1369
|
+
minLength: 1
|
1370
|
+
minItems: 1
|
1371
|
+
flagTags:
|
1372
|
+
description: >-
|
1373
|
+
flagTags. Either flagIDs, flagKeys or flagTags works. If pass in
|
1374
|
+
multiples, Flagr may return duplicate results.
|
1375
|
+
type: array
|
1376
|
+
items:
|
1377
|
+
type: string
|
1378
|
+
minLength: 1
|
1379
|
+
minItems: 1
|
1119
1380
|
evaluationBatchResponse:
|
1120
1381
|
type: object
|
1121
1382
|
required:
|
@@ -1125,6 +1386,11 @@ definitions:
|
|
1125
1386
|
type: array
|
1126
1387
|
items:
|
1127
1388
|
$ref: '#/definitions/evalResult'
|
1389
|
+
health:
|
1390
|
+
type: object
|
1391
|
+
properties:
|
1392
|
+
status:
|
1393
|
+
type: string
|
1128
1394
|
error:
|
1129
1395
|
type: object
|
1130
1396
|
required:
|