rbflagr 1.1.0 → 1.1.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +1 -1
  3. data/README.md +14 -6
  4. data/docs/CreateFlagRequest.md +1 -0
  5. data/docs/CreateTagRequest.md +8 -0
  6. data/docs/EvalContext.md +1 -0
  7. data/docs/EvaluationBatchRequest.md +2 -1
  8. data/docs/ExportApi.md +54 -6
  9. data/docs/Flag.md +2 -0
  10. data/docs/FlagApi.md +2 -0
  11. data/docs/Health.md +8 -0
  12. data/docs/HealthApi.md +4 -3
  13. data/docs/PutFlagRequest.md +1 -0
  14. data/docs/Tag.md +9 -0
  15. data/docs/TagApi.md +198 -0
  16. data/lib/rbflagr.rb +6 -2
  17. data/lib/rbflagr/api/constraint_api.rb +2 -2
  18. data/lib/rbflagr/api/distribution_api.rb +2 -2
  19. data/lib/rbflagr/api/evaluation_api.rb +2 -2
  20. data/lib/rbflagr/api/export_api.rb +56 -7
  21. data/lib/rbflagr/api/flag_api.rb +5 -2
  22. data/lib/rbflagr/api/health_api.rb +8 -7
  23. data/lib/rbflagr/api/segment_api.rb +2 -2
  24. data/lib/rbflagr/api/tag_api.rb +253 -0
  25. data/lib/rbflagr/api/variant_api.rb +2 -2
  26. data/lib/rbflagr/api_client.rb +4 -2
  27. data/lib/rbflagr/api_error.rb +2 -2
  28. data/lib/rbflagr/configuration.rb +2 -2
  29. data/lib/rbflagr/models/constraint.rb +4 -3
  30. data/lib/rbflagr/models/create_constraint_request.rb +4 -3
  31. data/lib/rbflagr/models/create_flag_request.rb +18 -7
  32. data/lib/rbflagr/models/create_segment_request.rb +4 -3
  33. data/lib/rbflagr/models/create_tag_request.rb +208 -0
  34. data/lib/rbflagr/models/create_variant_request.rb +4 -3
  35. data/lib/rbflagr/models/distribution.rb +4 -3
  36. data/lib/rbflagr/models/error.rb +4 -3
  37. data/lib/rbflagr/models/eval_context.rb +20 -7
  38. data/lib/rbflagr/models/eval_debug_log.rb +4 -3
  39. data/lib/rbflagr/models/eval_result.rb +4 -3
  40. data/lib/rbflagr/models/evaluation_batch_request.rb +21 -8
  41. data/lib/rbflagr/models/evaluation_batch_response.rb +4 -3
  42. data/lib/rbflagr/models/evaluation_entity.rb +4 -3
  43. data/lib/rbflagr/models/flag.rb +26 -4
  44. data/lib/rbflagr/models/flag_snapshot.rb +4 -3
  45. data/lib/rbflagr/models/health.rb +184 -0
  46. data/lib/rbflagr/models/put_distributions_request.rb +4 -3
  47. data/lib/rbflagr/models/put_flag_request.rb +17 -7
  48. data/lib/rbflagr/models/put_segment_reorder_request.rb +4 -3
  49. data/lib/rbflagr/models/put_segment_request.rb +4 -3
  50. data/lib/rbflagr/models/put_variant_request.rb +4 -3
  51. data/lib/rbflagr/models/segment.rb +4 -3
  52. data/lib/rbflagr/models/segment_debug_log.rb +4 -3
  53. data/lib/rbflagr/models/set_flag_enabled_request.rb +4 -3
  54. data/lib/rbflagr/models/tag.rb +232 -0
  55. data/lib/rbflagr/models/variant.rb +4 -3
  56. data/lib/rbflagr/version.rb +3 -3
  57. data/rbflagr.gemspec +2 -2
  58. data/spec/api/tag_api_spec.rb +79 -0
  59. data/spec/models/create_tag_request_spec.rb +41 -0
  60. data/spec/models/health_spec.rb +41 -0
  61. data/spec/models/tag_spec.rb +47 -0
  62. data/swagger.yaml +201 -5
  63. data/swagger_ruby.json +1 -1
  64. metadata +28 -13
@@ -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
@@ -4,7 +4,7 @@ info:
4
4
  Flagr is a feature flagging, A/B testing and dynamic configuration
5
5
  microservice. The base path for all the APIs is "/api/v1".
6
6
  title: Flagr
7
- version: 1.1.0
7
+ version: 1.1.10
8
8
  tags:
9
9
  - name: flag
10
10
  description: Everything about the flag
@@ -28,6 +28,7 @@ x-tagGroups:
28
28
  - constraint
29
29
  - distribution
30
30
  - variant
31
+ - tag
31
32
  - name: Flag Evaluation
32
33
  tags:
33
34
  - evaluation
@@ -64,6 +65,10 @@ paths:
64
65
  name: description
65
66
  type: string
66
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)
67
72
  - in: query
68
73
  name: description_like
69
74
  type: string
@@ -210,6 +215,84 @@ paths:
210
215
  description: generic error response
211
216
  schema:
212
217
  $ref: '#/definitions/error'
218
+ '/flags/{flagID}/tags':
219
+ get:
220
+ tags:
221
+ - tag
222
+ operationId: findTags
223
+ parameters:
224
+ - in: path
225
+ name: flagID
226
+ description: numeric ID of the flag
227
+ required: true
228
+ type: integer
229
+ format: int64
230
+ minimum: 1
231
+ responses:
232
+ '200':
233
+ description: tag ordered by tagID
234
+ schema:
235
+ type: array
236
+ items:
237
+ $ref: '#/definitions/tag'
238
+ default:
239
+ description: generic error response
240
+ schema:
241
+ $ref: '#/definitions/error'
242
+ post:
243
+ tags:
244
+ - tag
245
+ operationId: createTag
246
+ parameters:
247
+ - in: path
248
+ name: flagID
249
+ description: numeric ID of the flag
250
+ required: true
251
+ type: integer
252
+ format: int64
253
+ minimum: 1
254
+ - in: body
255
+ name: body
256
+ description: create a tag
257
+ required: true
258
+ schema:
259
+ $ref: '#/definitions/createTagRequest'
260
+ responses:
261
+ '200':
262
+ description: tag just created
263
+ schema:
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
292
+ default:
293
+ description: generic error response
294
+ schema:
295
+ $ref: '#/definitions/error'
213
296
  '/flags/{flagID}/variants':
214
297
  get:
215
298
  tags:
@@ -709,6 +792,39 @@ paths:
709
792
  description: generic error response
710
793
  schema:
711
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'
712
828
  /evaluation:
713
829
  post:
714
830
  tags:
@@ -759,7 +875,9 @@ paths:
759
875
  description: Check if Flagr is healthy
760
876
  responses:
761
877
  '200':
762
- description: OK
878
+ description: status of health check
879
+ schema:
880
+ $ref: '#/definitions/health'
763
881
  default:
764
882
  description: generic error response
765
883
  schema:
@@ -768,7 +886,14 @@ paths:
768
886
  get:
769
887
  tags:
770
888
  - export
771
- operationId: getExportSQLite
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
772
897
  description: >-
773
898
  Export sqlite3 format of the db dump, which is converted from the main
774
899
  database.
@@ -783,6 +908,23 @@ paths:
783
908
  description: generic error response
784
909
  schema:
785
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
924
+ default:
925
+ description: generic error response
926
+ schema:
927
+ $ref: '#/definitions/error'
786
928
  definitions:
787
929
  flag:
788
930
  type: object
@@ -805,6 +947,10 @@ definitions:
805
947
  minLength: 1
806
948
  enabled:
807
949
  type: boolean
950
+ tags:
951
+ type: array
952
+ items:
953
+ $ref: '#/definitions/tag'
808
954
  segments:
809
955
  type: array
810
956
  items:
@@ -823,6 +969,9 @@ definitions:
823
969
  it will override the entityType in the evaluation logs if it's not
824
970
  empty
825
971
  type: string
972
+ notes:
973
+ description: flag usage details in markdown format
974
+ type: string
826
975
  createdBy:
827
976
  type: string
828
977
  updatedBy:
@@ -841,6 +990,9 @@ definitions:
841
990
  key:
842
991
  description: unique key representation of the flag
843
992
  type: string
993
+ template:
994
+ description: template for flag creation
995
+ type: string
844
996
  putFlagRequest:
845
997
  type: object
846
998
  properties:
@@ -864,6 +1016,9 @@ definitions:
864
1016
  key:
865
1017
  type: string
866
1018
  x-nullable: true
1019
+ notes:
1020
+ type: string
1021
+ x-nullable: true
867
1022
  setFlagEnabledRequest:
868
1023
  type: object
869
1024
  required:
@@ -889,6 +1044,27 @@ definitions:
889
1044
  updatedAt:
890
1045
  type: string
891
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
892
1068
  segment:
893
1069
  type: object
894
1070
  required:
@@ -1103,6 +1279,12 @@ definitions:
1103
1279
  flagKey. flagID or flagKey will resolve to the same flag. Either
1104
1280
  works.
1105
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
1106
1288
  evalResult:
1107
1289
  type: object
1108
1290
  properties:
@@ -1179,8 +1361,17 @@ definitions:
1179
1361
  minItems: 1
1180
1362
  flagKeys:
1181
1363
  description: >-
1182
- flagKeys. Either flagIDs or flagKeys works. If pass in both, Flagr may
1183
- return duplicate results.
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.
1184
1375
  type: array
1185
1376
  items:
1186
1377
  type: string
@@ -1195,6 +1386,11 @@ definitions:
1195
1386
  type: array
1196
1387
  items:
1197
1388
  $ref: '#/definitions/evalResult'
1389
+ health:
1390
+ type: object
1391
+ properties:
1392
+ status:
1393
+ type: string
1198
1394
  error:
1199
1395
  type: object
1200
1396
  required:
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "gemName": "rbflagr",
3
3
  "moduleName": "Flagr",
4
- "gemVersion": "1.1.0",
4
+ "gemVersion": "1.1.10",
5
5
  "gemLicense": "Apache 2.0"
6
6
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbflagr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Swagger-Codegen
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-20 00:00:00.000000000 Z
11
+ date: 2020-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -48,22 +48,22 @@ dependencies:
48
48
  name: rspec
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '3.6'
54
51
  - - ">="
55
52
  - !ruby/object:Gem::Version
56
53
  version: 3.6.0
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: '3.6'
57
57
  type: :development
58
58
  prerelease: false
59
59
  version_requirements: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - "~>"
62
- - !ruby/object:Gem::Version
63
- version: '3.6'
64
61
  - - ">="
65
62
  - !ruby/object:Gem::Version
66
63
  version: 3.6.0
64
+ - - "~>"
65
+ - !ruby/object:Gem::Version
66
+ version: '3.6'
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: vcr
69
69
  requirement: !ruby/object:Gem::Requirement
@@ -201,6 +201,7 @@ files:
201
201
  - docs/CreateConstraintRequest.md
202
202
  - docs/CreateFlagRequest.md
203
203
  - docs/CreateSegmentRequest.md
204
+ - docs/CreateTagRequest.md
204
205
  - docs/CreateVariantRequest.md
205
206
  - docs/Distribution.md
206
207
  - docs/DistributionApi.md
@@ -216,6 +217,7 @@ files:
216
217
  - docs/Flag.md
217
218
  - docs/FlagApi.md
218
219
  - docs/FlagSnapshot.md
220
+ - docs/Health.md
219
221
  - docs/HealthApi.md
220
222
  - docs/PutDistributionsRequest.md
221
223
  - docs/PutFlagRequest.md
@@ -226,6 +228,8 @@ files:
226
228
  - docs/SegmentApi.md
227
229
  - docs/SegmentDebugLog.md
228
230
  - docs/SetFlagEnabledRequest.md
231
+ - docs/Tag.md
232
+ - docs/TagApi.md
229
233
  - docs/Variant.md
230
234
  - docs/VariantApi.md
231
235
  - git_push.sh
@@ -237,6 +241,7 @@ files:
237
241
  - lib/rbflagr/api/flag_api.rb
238
242
  - lib/rbflagr/api/health_api.rb
239
243
  - lib/rbflagr/api/segment_api.rb
244
+ - lib/rbflagr/api/tag_api.rb
240
245
  - lib/rbflagr/api/variant_api.rb
241
246
  - lib/rbflagr/api_client.rb
242
247
  - lib/rbflagr/api_error.rb
@@ -245,6 +250,7 @@ files:
245
250
  - lib/rbflagr/models/create_constraint_request.rb
246
251
  - lib/rbflagr/models/create_flag_request.rb
247
252
  - lib/rbflagr/models/create_segment_request.rb
253
+ - lib/rbflagr/models/create_tag_request.rb
248
254
  - lib/rbflagr/models/create_variant_request.rb
249
255
  - lib/rbflagr/models/distribution.rb
250
256
  - lib/rbflagr/models/error.rb
@@ -256,6 +262,7 @@ files:
256
262
  - lib/rbflagr/models/evaluation_entity.rb
257
263
  - lib/rbflagr/models/flag.rb
258
264
  - lib/rbflagr/models/flag_snapshot.rb
265
+ - lib/rbflagr/models/health.rb
259
266
  - lib/rbflagr/models/put_distributions_request.rb
260
267
  - lib/rbflagr/models/put_flag_request.rb
261
268
  - lib/rbflagr/models/put_segment_reorder_request.rb
@@ -264,6 +271,7 @@ files:
264
271
  - lib/rbflagr/models/segment.rb
265
272
  - lib/rbflagr/models/segment_debug_log.rb
266
273
  - lib/rbflagr/models/set_flag_enabled_request.rb
274
+ - lib/rbflagr/models/tag.rb
267
275
  - lib/rbflagr/models/variant.rb
268
276
  - lib/rbflagr/version.rb
269
277
  - rbflagr.gemspec
@@ -274,6 +282,7 @@ files:
274
282
  - spec/api/flag_api_spec.rb
275
283
  - spec/api/health_api_spec.rb
276
284
  - spec/api/segment_api_spec.rb
285
+ - spec/api/tag_api_spec.rb
277
286
  - spec/api/variant_api_spec.rb
278
287
  - spec/api_client_spec.rb
279
288
  - spec/configuration_spec.rb
@@ -281,6 +290,7 @@ files:
281
290
  - spec/models/create_constraint_request_spec.rb
282
291
  - spec/models/create_flag_request_spec.rb
283
292
  - spec/models/create_segment_request_spec.rb
293
+ - spec/models/create_tag_request_spec.rb
284
294
  - spec/models/create_variant_request_spec.rb
285
295
  - spec/models/distribution_spec.rb
286
296
  - spec/models/error_spec.rb
@@ -292,6 +302,7 @@ files:
292
302
  - spec/models/evaluation_entity_spec.rb
293
303
  - spec/models/flag_snapshot_spec.rb
294
304
  - spec/models/flag_spec.rb
305
+ - spec/models/health_spec.rb
295
306
  - spec/models/put_distributions_request_spec.rb
296
307
  - spec/models/put_flag_request_spec.rb
297
308
  - spec/models/put_segment_reorder_request_spec.rb
@@ -300,6 +311,7 @@ files:
300
311
  - spec/models/segment_debug_log_spec.rb
301
312
  - spec/models/segment_spec.rb
302
313
  - spec/models/set_flag_enabled_request_spec.rb
314
+ - spec/models/tag_spec.rb
303
315
  - spec/models/variant_spec.rb
304
316
  - spec/spec_helper.rb
305
317
  - swagger.yaml
@@ -309,7 +321,7 @@ homepage: https://github.com/swagger-api/swagger-codegen
309
321
  licenses:
310
322
  - Apache 2.0
311
323
  metadata: {}
312
- post_install_message:
324
+ post_install_message:
313
325
  rdoc_options: []
314
326
  require_paths:
315
327
  - lib
@@ -324,9 +336,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
324
336
  - !ruby/object:Gem::Version
325
337
  version: '0'
326
338
  requirements: []
327
- rubyforge_project:
328
- rubygems_version: 2.5.2
329
- signing_key:
339
+ rubygems_version: 3.0.3
340
+ signing_key:
330
341
  specification_version: 4
331
342
  summary: Flagr Ruby Gem
332
343
  test_files:
@@ -334,6 +345,7 @@ test_files:
334
345
  - spec/api/export_api_spec.rb
335
346
  - spec/api/evaluation_api_spec.rb
336
347
  - spec/api/distribution_api_spec.rb
348
+ - spec/api/tag_api_spec.rb
337
349
  - spec/api/flag_api_spec.rb
338
350
  - spec/api/variant_api_spec.rb
339
351
  - spec/api/segment_api_spec.rb
@@ -347,8 +359,10 @@ test_files:
347
359
  - spec/models/constraint_spec.rb
348
360
  - spec/models/segment_debug_log_spec.rb
349
361
  - spec/models/segment_spec.rb
362
+ - spec/models/health_spec.rb
350
363
  - spec/models/eval_debug_log_spec.rb
351
364
  - spec/models/variant_spec.rb
365
+ - spec/models/tag_spec.rb
352
366
  - spec/models/eval_context_spec.rb
353
367
  - spec/models/flag_spec.rb
354
368
  - spec/models/evaluation_batch_request_spec.rb
@@ -357,6 +371,7 @@ test_files:
357
371
  - spec/models/evaluation_entity_spec.rb
358
372
  - spec/models/create_variant_request_spec.rb
359
373
  - spec/models/put_segment_reorder_request_spec.rb
374
+ - spec/models/create_tag_request_spec.rb
360
375
  - spec/models/evaluation_batch_response_spec.rb
361
376
  - spec/models/create_segment_request_spec.rb
362
377
  - spec/models/flag_snapshot_spec.rb