deimos-ruby 1.15.0 → 1.16.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/deimos/active_record_producer.rb +1 -1
- data/lib/deimos/consumer.rb +3 -1
- data/lib/deimos/schema_class/base.rb +2 -25
- data/lib/deimos/schema_class/enum.rb +23 -0
- data/lib/deimos/schema_class/record.rb +15 -4
- data/lib/deimos/test_helpers.rb +3 -2
- data/lib/deimos/tracing/datadog.rb +11 -0
- data/lib/deimos/tracing/mock.rb +10 -0
- data/lib/deimos/tracing/provider.rb +13 -0
- data/lib/deimos/utils/db_poller.rb +1 -2
- data/lib/deimos/utils/schema_class.rb +16 -2
- data/lib/deimos/utils/schema_controller_mixin.rb +7 -1
- data/lib/deimos/version.rb +1 -1
- data/lib/deimos.rb +1 -2
- data/lib/generators/deimos/schema_class/templates/schema_enum.rb.tt +0 -11
- data/lib/generators/deimos/schema_class/templates/schema_record.rb.tt +2 -2
- data/lib/generators/deimos/schema_class_generator.rb +6 -10
- data/spec/batch_consumer_spec.rb +13 -10
- data/spec/generators/schema_class/my_schema_with_circular_reference_spec.rb +19 -19
- data/spec/generators/schema_class/my_schema_with_complex_types_spec.rb +2 -2
- data/spec/schemas/generated.rb +5 -5
- data/spec/schemas/my_nested_schema.rb +4 -4
- data/spec/schemas/my_schema.rb +2 -2
- data/spec/schemas/my_schema_key.rb +1 -1
- data/spec/schemas/my_schema_with_circular_reference.rb +3 -3
- data/spec/schemas/my_schema_with_complex_type.rb +11 -22
- data/spec/snapshots/consumers-no-nest.snap +34 -67
- data/spec/snapshots/consumers.snap +35 -79
- data/spec/snapshots/consumers_and_producers-no-nest.snap +35 -68
- data/spec/snapshots/consumers_and_producers.snap +36 -80
- data/spec/snapshots/consumers_circular-no-nest.snap +34 -67
- data/spec/snapshots/consumers_circular.snap +35 -79
- data/spec/snapshots/consumers_complex_types-no-nest.snap +34 -67
- data/spec/snapshots/consumers_complex_types.snap +35 -79
- data/spec/snapshots/consumers_nested-no-nest.snap +34 -67
- data/spec/snapshots/consumers_nested.snap +35 -79
- data/spec/snapshots/namespace_folders.snap +53 -97
- data/spec/snapshots/producers_with_key-no-nest.snap +35 -68
- data/spec/snapshots/producers_with_key.snap +36 -80
- metadata +3 -3
@@ -28,7 +28,7 @@ module Schemas
|
|
28
28
|
end
|
29
29
|
|
30
30
|
# @override
|
31
|
-
def
|
31
|
+
def as_json(_opts={})
|
32
32
|
{
|
33
33
|
'a_record_field' => @a_record_field
|
34
34
|
}
|
@@ -48,21 +48,10 @@ module Schemas
|
|
48
48
|
# @return ['sym1', 'sym2']
|
49
49
|
attr_accessor :an_enum
|
50
50
|
|
51
|
-
# :nodoc:
|
52
|
-
def initialize(an_enum)
|
53
|
-
super
|
54
|
-
self.an_enum = an_enum
|
55
|
-
end
|
56
|
-
|
57
51
|
# @override
|
58
52
|
def symbols
|
59
53
|
%w(sym1 sym2)
|
60
54
|
end
|
61
|
-
|
62
|
-
# @override
|
63
|
-
def to_h
|
64
|
-
@an_enum
|
65
|
-
end
|
66
55
|
end
|
67
56
|
end
|
68
57
|
|
@@ -78,21 +67,10 @@ module Schemas
|
|
78
67
|
# @return ['sym3', 'sym4']
|
79
68
|
attr_accessor :another_enum
|
80
69
|
|
81
|
-
# :nodoc:
|
82
|
-
def initialize(another_enum)
|
83
|
-
super
|
84
|
-
self.another_enum = another_enum
|
85
|
-
end
|
86
|
-
|
87
70
|
# @override
|
88
71
|
def symbols
|
89
72
|
%w(sym3 sym4)
|
90
73
|
end
|
91
|
-
|
92
|
-
# @override
|
93
|
-
def to_h
|
94
|
-
@another_enum
|
95
|
-
end
|
96
74
|
end
|
97
75
|
end
|
98
76
|
|
@@ -127,7 +105,7 @@ module Schemas
|
|
127
105
|
end
|
128
106
|
|
129
107
|
# @override
|
130
|
-
def
|
108
|
+
def as_json(_opts={})
|
131
109
|
{
|
132
110
|
'response_id' => @response_id
|
133
111
|
}
|
@@ -223,7 +201,7 @@ module Schemas
|
|
223
201
|
end
|
224
202
|
|
225
203
|
# @override
|
226
|
-
def
|
204
|
+
def as_json(_opts={})
|
227
205
|
{
|
228
206
|
'a_string' => @a_string,
|
229
207
|
'a_int' => @a_int,
|
@@ -231,12 +209,12 @@ module Schemas
|
|
231
209
|
'a_float' => @a_float,
|
232
210
|
'a_double' => @a_double,
|
233
211
|
'an_optional_int' => @an_optional_int,
|
234
|
-
'an_enum' => @an_enum&.
|
212
|
+
'an_enum' => @an_enum&.as_json,
|
235
213
|
'an_array' => @an_array,
|
236
214
|
'a_map' => @a_map,
|
237
215
|
'timestamp' => @timestamp,
|
238
216
|
'message_id' => @message_id,
|
239
|
-
'a_record' => @a_record&.
|
217
|
+
'a_record' => @a_record&.as_json
|
240
218
|
}
|
241
219
|
end
|
242
220
|
end
|
@@ -273,7 +251,7 @@ module Schemas
|
|
273
251
|
end
|
274
252
|
|
275
253
|
# @override
|
276
|
-
def
|
254
|
+
def as_json(_opts={})
|
277
255
|
{
|
278
256
|
'response_id' => @response_id
|
279
257
|
}
|
@@ -324,7 +302,7 @@ module Schemas
|
|
324
302
|
end
|
325
303
|
|
326
304
|
# @override
|
327
|
-
def
|
305
|
+
def as_json(_opts={})
|
328
306
|
{
|
329
307
|
'some_int' => @some_int,
|
330
308
|
'some_float' => @some_float,
|
@@ -395,13 +373,13 @@ module Schemas
|
|
395
373
|
end
|
396
374
|
|
397
375
|
# @override
|
398
|
-
def
|
376
|
+
def as_json(_opts={})
|
399
377
|
{
|
400
378
|
'test_id' => @test_id,
|
401
379
|
'test_float' => @test_float,
|
402
380
|
'test_array' => @test_array,
|
403
|
-
'some_nested_record' => @some_nested_record&.
|
404
|
-
'some_optional_record' => @some_optional_record&.
|
381
|
+
'some_nested_record' => @some_nested_record&.as_json,
|
382
|
+
'some_optional_record' => @some_optional_record&.as_json
|
405
383
|
}
|
406
384
|
end
|
407
385
|
end
|
@@ -454,11 +432,11 @@ module Schemas
|
|
454
432
|
end
|
455
433
|
|
456
434
|
# @override
|
457
|
-
def
|
435
|
+
def as_json(_opts={})
|
458
436
|
{
|
459
437
|
'test_id' => @test_id,
|
460
438
|
'some_int' => @some_int,
|
461
|
-
'payload_key' => @payload_key&.
|
439
|
+
'payload_key' => @payload_key&.as_json
|
462
440
|
}
|
463
441
|
end
|
464
442
|
end
|
@@ -499,7 +477,7 @@ module Schemas
|
|
499
477
|
end
|
500
478
|
|
501
479
|
# @override
|
502
|
-
def
|
480
|
+
def as_json(_opts={})
|
503
481
|
{
|
504
482
|
'part_one' => @part_one,
|
505
483
|
'part_two' => @part_two
|
@@ -539,7 +517,7 @@ module Schemas
|
|
539
517
|
end
|
540
518
|
|
541
519
|
# @override
|
542
|
-
def
|
520
|
+
def as_json(_opts={})
|
543
521
|
{
|
544
522
|
'id' => @id
|
545
523
|
}
|
@@ -578,7 +556,7 @@ module Schemas
|
|
578
556
|
end
|
579
557
|
|
580
558
|
# @override
|
581
|
-
def
|
559
|
+
def as_json(_opts={})
|
582
560
|
{
|
583
561
|
'test_id' => @test_id
|
584
562
|
}
|
@@ -621,7 +599,7 @@ module Schemas
|
|
621
599
|
end
|
622
600
|
|
623
601
|
# @override
|
624
|
-
def
|
602
|
+
def as_json(_opts={})
|
625
603
|
{
|
626
604
|
'test_id' => @test_id,
|
627
605
|
'some_bool' => @some_bool
|
@@ -669,9 +647,9 @@ module Schemas
|
|
669
647
|
end
|
670
648
|
|
671
649
|
# @override
|
672
|
-
def
|
650
|
+
def as_json(_opts={})
|
673
651
|
{
|
674
|
-
'properties' => @properties.transform_values { |v| v&.
|
652
|
+
'properties' => @properties.transform_values { |v| v&.as_json }
|
675
653
|
}
|
676
654
|
end
|
677
655
|
end
|
@@ -800,7 +778,7 @@ module Schemas
|
|
800
778
|
end
|
801
779
|
|
802
780
|
# @override
|
803
|
-
def
|
781
|
+
def as_json(_opts={})
|
804
782
|
{
|
805
783
|
'test_id' => @test_id,
|
806
784
|
'test_float' => @test_float,
|
@@ -808,13 +786,13 @@ module Schemas
|
|
808
786
|
'test_int_array' => @test_int_array,
|
809
787
|
'test_optional_int' => @test_optional_int,
|
810
788
|
'some_integer_map' => @some_integer_map,
|
811
|
-
'some_record' => @some_record&.
|
812
|
-
'some_optional_record' => @some_optional_record&.
|
813
|
-
'some_record_array' => @some_record_array.map { |v| v&.
|
814
|
-
'some_record_map' => @some_record_map.transform_values { |v| v&.
|
815
|
-
'some_enum_array' => @some_enum_array.map { |v| v&.
|
816
|
-
'some_optional_enum' => @some_optional_enum&.
|
817
|
-
'some_enum_with_default' => @some_enum_with_default&.
|
789
|
+
'some_record' => @some_record&.as_json,
|
790
|
+
'some_optional_record' => @some_optional_record&.as_json,
|
791
|
+
'some_record_array' => @some_record_array.map { |v| v&.as_json },
|
792
|
+
'some_record_map' => @some_record_map.transform_values { |v| v&.as_json },
|
793
|
+
'some_enum_array' => @some_enum_array.map { |v| v&.as_json },
|
794
|
+
'some_optional_enum' => @some_optional_enum&.as_json,
|
795
|
+
'some_enum_with_default' => @some_enum_with_default&.as_json
|
818
796
|
}
|
819
797
|
end
|
820
798
|
end
|
@@ -867,7 +845,7 @@ module Schemas
|
|
867
845
|
end
|
868
846
|
|
869
847
|
# @override
|
870
|
-
def
|
848
|
+
def as_json(_opts={})
|
871
849
|
{
|
872
850
|
'test_id' => @test_id,
|
873
851
|
'updated_at' => @updated_at,
|
@@ -922,7 +900,7 @@ module Schemas
|
|
922
900
|
end
|
923
901
|
|
924
902
|
# @override
|
925
|
-
def
|
903
|
+
def as_json(_opts={})
|
926
904
|
{
|
927
905
|
'test_id' => @test_id,
|
928
906
|
'some_int' => @some_int,
|
@@ -980,7 +958,7 @@ module Schemas
|
|
980
958
|
end
|
981
959
|
|
982
960
|
# @override
|
983
|
-
def
|
961
|
+
def as_json(_opts={})
|
984
962
|
{
|
985
963
|
'id' => @id,
|
986
964
|
'test_id' => @test_id,
|
@@ -1023,7 +1001,7 @@ module Schemas
|
|
1023
1001
|
end
|
1024
1002
|
|
1025
1003
|
# @override
|
1026
|
-
def
|
1004
|
+
def as_json(_opts={})
|
1027
1005
|
{
|
1028
1006
|
'property' => @property
|
1029
1007
|
}
|
@@ -1062,7 +1040,7 @@ module Schemas
|
|
1062
1040
|
end
|
1063
1041
|
|
1064
1042
|
# @override
|
1065
|
-
def
|
1043
|
+
def as_json(_opts={})
|
1066
1044
|
{
|
1067
1045
|
'update_request_id' => @update_request_id
|
1068
1046
|
}
|
@@ -1101,7 +1079,7 @@ module Schemas
|
|
1101
1079
|
end
|
1102
1080
|
|
1103
1081
|
# @override
|
1104
|
-
def
|
1082
|
+
def as_json(_opts={})
|
1105
1083
|
{
|
1106
1084
|
'update_response_id' => @update_response_id
|
1107
1085
|
}
|
@@ -1172,7 +1150,7 @@ module Schemas
|
|
1172
1150
|
end
|
1173
1151
|
|
1174
1152
|
# @override
|
1175
|
-
def
|
1153
|
+
def as_json(_opts={})
|
1176
1154
|
{
|
1177
1155
|
'id' => @id,
|
1178
1156
|
'wibble_id' => @wibble_id,
|
@@ -1235,7 +1213,7 @@ module Schemas
|
|
1235
1213
|
end
|
1236
1214
|
|
1237
1215
|
# @override
|
1238
|
-
def
|
1216
|
+
def as_json(_opts={})
|
1239
1217
|
{
|
1240
1218
|
'id' => @id,
|
1241
1219
|
'widget_id' => @widget_id,
|
@@ -1294,7 +1272,7 @@ module Schemas
|
|
1294
1272
|
end
|
1295
1273
|
|
1296
1274
|
# @override
|
1297
|
-
def
|
1275
|
+
def as_json(_opts={})
|
1298
1276
|
{
|
1299
1277
|
'id' => @id,
|
1300
1278
|
'widget_id' => @widget_id,
|
@@ -1318,21 +1296,10 @@ module Schemas
|
|
1318
1296
|
# @return ['sym5', 'sym6']
|
1319
1297
|
attr_accessor :yet_another_enum
|
1320
1298
|
|
1321
|
-
# :nodoc:
|
1322
|
-
def initialize(yet_another_enum)
|
1323
|
-
super
|
1324
|
-
self.yet_another_enum = yet_another_enum
|
1325
|
-
end
|
1326
|
-
|
1327
1299
|
# @override
|
1328
1300
|
def symbols
|
1329
1301
|
%w(sym5 sym6)
|
1330
1302
|
end
|
1331
|
-
|
1332
|
-
# @override
|
1333
|
-
def to_h
|
1334
|
-
@yet_another_enum
|
1335
|
-
end
|
1336
1303
|
end
|
1337
1304
|
end
|
1338
1305
|
|
@@ -28,7 +28,7 @@ module Schemas
|
|
28
28
|
end
|
29
29
|
|
30
30
|
# @override
|
31
|
-
def
|
31
|
+
def as_json(_opts={})
|
32
32
|
{
|
33
33
|
'response_id' => @response_id
|
34
34
|
}
|
@@ -71,7 +71,7 @@ module Schemas
|
|
71
71
|
end
|
72
72
|
|
73
73
|
# @override
|
74
|
-
def
|
74
|
+
def as_json(_opts={})
|
75
75
|
{
|
76
76
|
'a_record_field' => @a_record_field
|
77
77
|
}
|
@@ -83,21 +83,10 @@ module Schemas
|
|
83
83
|
# @return ['sym1', 'sym2']
|
84
84
|
attr_accessor :an_enum
|
85
85
|
|
86
|
-
# :nodoc:
|
87
|
-
def initialize(an_enum)
|
88
|
-
super
|
89
|
-
self.an_enum = an_enum
|
90
|
-
end
|
91
|
-
|
92
86
|
# @override
|
93
87
|
def symbols
|
94
88
|
%w(sym1 sym2)
|
95
89
|
end
|
96
|
-
|
97
|
-
# @override
|
98
|
-
def to_h
|
99
|
-
@an_enum
|
100
|
-
end
|
101
90
|
end
|
102
91
|
|
103
92
|
|
@@ -179,7 +168,7 @@ module Schemas
|
|
179
168
|
end
|
180
169
|
|
181
170
|
# @override
|
182
|
-
def
|
171
|
+
def as_json(_opts={})
|
183
172
|
{
|
184
173
|
'a_string' => @a_string,
|
185
174
|
'a_int' => @a_int,
|
@@ -187,12 +176,12 @@ module Schemas
|
|
187
176
|
'a_float' => @a_float,
|
188
177
|
'a_double' => @a_double,
|
189
178
|
'an_optional_int' => @an_optional_int,
|
190
|
-
'an_enum' => @an_enum&.
|
179
|
+
'an_enum' => @an_enum&.as_json,
|
191
180
|
'an_array' => @an_array,
|
192
181
|
'a_map' => @a_map,
|
193
182
|
'timestamp' => @timestamp,
|
194
183
|
'message_id' => @message_id,
|
195
|
-
'a_record' => @a_record&.
|
184
|
+
'a_record' => @a_record&.as_json
|
196
185
|
}
|
197
186
|
end
|
198
187
|
end
|
@@ -229,7 +218,7 @@ module Schemas
|
|
229
218
|
end
|
230
219
|
|
231
220
|
# @override
|
232
|
-
def
|
221
|
+
def as_json(_opts={})
|
233
222
|
{
|
234
223
|
'response_id' => @response_id
|
235
224
|
}
|
@@ -284,7 +273,7 @@ module Schemas
|
|
284
273
|
end
|
285
274
|
|
286
275
|
# @override
|
287
|
-
def
|
276
|
+
def as_json(_opts={})
|
288
277
|
{
|
289
278
|
'some_int' => @some_int,
|
290
279
|
'some_float' => @some_float,
|
@@ -345,13 +334,13 @@ module Schemas
|
|
345
334
|
end
|
346
335
|
|
347
336
|
# @override
|
348
|
-
def
|
337
|
+
def as_json(_opts={})
|
349
338
|
{
|
350
339
|
'test_id' => @test_id,
|
351
340
|
'test_float' => @test_float,
|
352
341
|
'test_array' => @test_array,
|
353
|
-
'some_nested_record' => @some_nested_record&.
|
354
|
-
'some_optional_record' => @some_optional_record&.
|
342
|
+
'some_nested_record' => @some_nested_record&.as_json,
|
343
|
+
'some_optional_record' => @some_optional_record&.as_json
|
355
344
|
}
|
356
345
|
end
|
357
346
|
end
|
@@ -404,11 +393,11 @@ module Schemas
|
|
404
393
|
end
|
405
394
|
|
406
395
|
# @override
|
407
|
-
def
|
396
|
+
def as_json(_opts={})
|
408
397
|
{
|
409
398
|
'test_id' => @test_id,
|
410
399
|
'some_int' => @some_int,
|
411
|
-
'payload_key' => @payload_key&.
|
400
|
+
'payload_key' => @payload_key&.as_json
|
412
401
|
}
|
413
402
|
end
|
414
403
|
end
|
@@ -449,7 +438,7 @@ module Schemas
|
|
449
438
|
end
|
450
439
|
|
451
440
|
# @override
|
452
|
-
def
|
441
|
+
def as_json(_opts={})
|
453
442
|
{
|
454
443
|
'part_one' => @part_one,
|
455
444
|
'part_two' => @part_two
|
@@ -489,7 +478,7 @@ module Schemas
|
|
489
478
|
end
|
490
479
|
|
491
480
|
# @override
|
492
|
-
def
|
481
|
+
def as_json(_opts={})
|
493
482
|
{
|
494
483
|
'id' => @id
|
495
484
|
}
|
@@ -528,7 +517,7 @@ module Schemas
|
|
528
517
|
end
|
529
518
|
|
530
519
|
# @override
|
531
|
-
def
|
520
|
+
def as_json(_opts={})
|
532
521
|
{
|
533
522
|
'test_id' => @test_id
|
534
523
|
}
|
@@ -571,7 +560,7 @@ module Schemas
|
|
571
560
|
end
|
572
561
|
|
573
562
|
# @override
|
574
|
-
def
|
563
|
+
def as_json(_opts={})
|
575
564
|
{
|
576
565
|
'test_id' => @test_id,
|
577
566
|
'some_bool' => @some_bool
|
@@ -615,7 +604,7 @@ module Schemas
|
|
615
604
|
end
|
616
605
|
|
617
606
|
# @override
|
618
|
-
def
|
607
|
+
def as_json(_opts={})
|
619
608
|
{
|
620
609
|
'property' => @property
|
621
610
|
}
|
@@ -652,9 +641,9 @@ module Schemas
|
|
652
641
|
end
|
653
642
|
|
654
643
|
# @override
|
655
|
-
def
|
644
|
+
def as_json(_opts={})
|
656
645
|
{
|
657
|
-
'properties' => @properties.transform_values { |v| v&.
|
646
|
+
'properties' => @properties.transform_values { |v| v&.as_json }
|
658
647
|
}
|
659
648
|
end
|
660
649
|
end
|
@@ -695,7 +684,7 @@ module Schemas
|
|
695
684
|
end
|
696
685
|
|
697
686
|
# @override
|
698
|
-
def
|
687
|
+
def as_json(_opts={})
|
699
688
|
{
|
700
689
|
'a_record_field' => @a_record_field
|
701
690
|
}
|
@@ -707,21 +696,10 @@ module Schemas
|
|
707
696
|
# @return ['sym1', 'sym2']
|
708
697
|
attr_accessor :an_enum
|
709
698
|
|
710
|
-
# :nodoc:
|
711
|
-
def initialize(an_enum)
|
712
|
-
super
|
713
|
-
self.an_enum = an_enum
|
714
|
-
end
|
715
|
-
|
716
699
|
# @override
|
717
700
|
def symbols
|
718
701
|
%w(sym1 sym2)
|
719
702
|
end
|
720
|
-
|
721
|
-
# @override
|
722
|
-
def to_h
|
723
|
-
@an_enum
|
724
|
-
end
|
725
703
|
end
|
726
704
|
|
727
705
|
# Autogenerated Schema for Enum at com.my-namespace.AnotherEnum
|
@@ -729,21 +707,10 @@ module Schemas
|
|
729
707
|
# @return ['sym3', 'sym4']
|
730
708
|
attr_accessor :another_enum
|
731
709
|
|
732
|
-
# :nodoc:
|
733
|
-
def initialize(another_enum)
|
734
|
-
super
|
735
|
-
self.another_enum = another_enum
|
736
|
-
end
|
737
|
-
|
738
710
|
# @override
|
739
711
|
def symbols
|
740
712
|
%w(sym3 sym4)
|
741
713
|
end
|
742
|
-
|
743
|
-
# @override
|
744
|
-
def to_h
|
745
|
-
@another_enum
|
746
|
-
end
|
747
714
|
end
|
748
715
|
|
749
716
|
# Autogenerated Schema for Enum at com.my-namespace.YetAnotherEnum
|
@@ -751,21 +718,10 @@ module Schemas
|
|
751
718
|
# @return ['sym5', 'sym6']
|
752
719
|
attr_accessor :yet_another_enum
|
753
720
|
|
754
|
-
# :nodoc:
|
755
|
-
def initialize(yet_another_enum)
|
756
|
-
super
|
757
|
-
self.yet_another_enum = yet_another_enum
|
758
|
-
end
|
759
|
-
|
760
721
|
# @override
|
761
722
|
def symbols
|
762
723
|
%w(sym5 sym6)
|
763
724
|
end
|
764
|
-
|
765
|
-
# @override
|
766
|
-
def to_h
|
767
|
-
@yet_another_enum
|
768
|
-
end
|
769
725
|
end
|
770
726
|
|
771
727
|
|
@@ -882,7 +838,7 @@ module Schemas
|
|
882
838
|
end
|
883
839
|
|
884
840
|
# @override
|
885
|
-
def
|
841
|
+
def as_json(_opts={})
|
886
842
|
{
|
887
843
|
'test_id' => @test_id,
|
888
844
|
'test_float' => @test_float,
|
@@ -890,13 +846,13 @@ module Schemas
|
|
890
846
|
'test_int_array' => @test_int_array,
|
891
847
|
'test_optional_int' => @test_optional_int,
|
892
848
|
'some_integer_map' => @some_integer_map,
|
893
|
-
'some_record' => @some_record&.
|
894
|
-
'some_optional_record' => @some_optional_record&.
|
895
|
-
'some_record_array' => @some_record_array.map { |v| v&.
|
896
|
-
'some_record_map' => @some_record_map.transform_values { |v| v&.
|
897
|
-
'some_enum_array' => @some_enum_array.map { |v| v&.
|
898
|
-
'some_optional_enum' => @some_optional_enum&.
|
899
|
-
'some_enum_with_default' => @some_enum_with_default&.
|
849
|
+
'some_record' => @some_record&.as_json,
|
850
|
+
'some_optional_record' => @some_optional_record&.as_json,
|
851
|
+
'some_record_array' => @some_record_array.map { |v| v&.as_json },
|
852
|
+
'some_record_map' => @some_record_map.transform_values { |v| v&.as_json },
|
853
|
+
'some_enum_array' => @some_enum_array.map { |v| v&.as_json },
|
854
|
+
'some_optional_enum' => @some_optional_enum&.as_json,
|
855
|
+
'some_enum_with_default' => @some_enum_with_default&.as_json
|
900
856
|
}
|
901
857
|
end
|
902
858
|
end
|
@@ -949,7 +905,7 @@ module Schemas
|
|
949
905
|
end
|
950
906
|
|
951
907
|
# @override
|
952
|
-
def
|
908
|
+
def as_json(_opts={})
|
953
909
|
{
|
954
910
|
'test_id' => @test_id,
|
955
911
|
'updated_at' => @updated_at,
|
@@ -1004,7 +960,7 @@ module Schemas
|
|
1004
960
|
end
|
1005
961
|
|
1006
962
|
# @override
|
1007
|
-
def
|
963
|
+
def as_json(_opts={})
|
1008
964
|
{
|
1009
965
|
'test_id' => @test_id,
|
1010
966
|
'some_int' => @some_int,
|
@@ -1062,7 +1018,7 @@ module Schemas
|
|
1062
1018
|
end
|
1063
1019
|
|
1064
1020
|
# @override
|
1065
|
-
def
|
1021
|
+
def as_json(_opts={})
|
1066
1022
|
{
|
1067
1023
|
'id' => @id,
|
1068
1024
|
'test_id' => @test_id,
|
@@ -1105,7 +1061,7 @@ module Schemas
|
|
1105
1061
|
end
|
1106
1062
|
|
1107
1063
|
# @override
|
1108
|
-
def
|
1064
|
+
def as_json(_opts={})
|
1109
1065
|
{
|
1110
1066
|
'update_request_id' => @update_request_id
|
1111
1067
|
}
|
@@ -1144,7 +1100,7 @@ module Schemas
|
|
1144
1100
|
end
|
1145
1101
|
|
1146
1102
|
# @override
|
1147
|
-
def
|
1103
|
+
def as_json(_opts={})
|
1148
1104
|
{
|
1149
1105
|
'update_response_id' => @update_response_id
|
1150
1106
|
}
|
@@ -1215,7 +1171,7 @@ module Schemas
|
|
1215
1171
|
end
|
1216
1172
|
|
1217
1173
|
# @override
|
1218
|
-
def
|
1174
|
+
def as_json(_opts={})
|
1219
1175
|
{
|
1220
1176
|
'id' => @id,
|
1221
1177
|
'wibble_id' => @wibble_id,
|
@@ -1278,7 +1234,7 @@ module Schemas
|
|
1278
1234
|
end
|
1279
1235
|
|
1280
1236
|
# @override
|
1281
|
-
def
|
1237
|
+
def as_json(_opts={})
|
1282
1238
|
{
|
1283
1239
|
'id' => @id,
|
1284
1240
|
'widget_id' => @widget_id,
|
@@ -1337,7 +1293,7 @@ module Schemas
|
|
1337
1293
|
end
|
1338
1294
|
|
1339
1295
|
# @override
|
1340
|
-
def
|
1296
|
+
def as_json(_opts={})
|
1341
1297
|
{
|
1342
1298
|
'id' => @id,
|
1343
1299
|
'widget_id' => @widget_id,
|