deimos-ruby 2.1.11 → 2.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/deimos/transcoder.rb +1 -1
- data/lib/deimos/version.rb +1 -1
- data/lib/generators/deimos/schema_class_generator.rb +5 -1
- data/spec/consumer_spec.rb +18 -0
- data/spec/generators/schema_class/my_schema_with_complex_types_spec.rb +6 -5
- data/spec/schemas/com/my-namespace/MySchemaWithComplexTypes.avsc +5 -0
- data/spec/schemas/my_namespace/generated.rb +10 -3
- data/spec/schemas/my_namespace/my_schema_with_complex_type.rb +35 -9
- data/spec/snapshots/consumers-no-nest.snap +5 -0
- data/spec/snapshots/consumers.snap +5 -0
- data/spec/snapshots/consumers_and_producers-no-nest.snap +5 -0
- data/spec/snapshots/consumers_and_producers.snap +5 -0
- data/spec/snapshots/consumers_circular-no-nest.snap +5 -0
- data/spec/snapshots/consumers_circular.snap +5 -0
- data/spec/snapshots/consumers_complex_types-no-nest.snap +5 -0
- data/spec/snapshots/consumers_complex_types.snap +5 -0
- data/spec/snapshots/consumers_nested-no-nest.snap +5 -0
- data/spec/snapshots/consumers_nested.snap +5 -0
- data/spec/snapshots/namespace_folders.snap +5 -0
- data/spec/snapshots/namespace_map.snap +5 -0
- data/spec/snapshots/producers_with_key-no-nest.snap +5 -0
- data/spec/snapshots/producers_with_key.snap +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f53dee42dc005e4b2d17f8e88f0bcd358d3985bddd595af90c05727b98ad47b6
|
4
|
+
data.tar.gz: 56e3494c8c255d223b79214a78766a4140cda5fc0355fe3cbc38cf414fd99027
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0672ef183346354f9df0a4ea3104ea330c52bb25ebc5b3daa373fc97a64be50a242f0e686e1dca7417a083401c1fc0dac9270e651e127a447a46660b48c58e3
|
7
|
+
data.tar.gz: efbf308dd6ec940af43091747c5420bfa95873d20b6f7c1b107af13f225448a191d7016850b4f0baac3b20552d6a8c54c73a22b49bb8b4f48e0a753c2dd4b025
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## UNRELEASED
|
9
9
|
|
10
|
+
# 2.1.13 - 2025-10-03
|
11
|
+
- Fix: Union types where the first type is string and has a default value of empty string was incorrectly turning the field into a required argument, which crashed when trying to instantiate it.
|
12
|
+
|
13
|
+
# 2.1.12 - 2025-10-03
|
14
|
+
|
15
|
+
- Fix: Fixes a crash when schema classes are in use and key config is set to `:plain`.
|
16
|
+
|
10
17
|
# 2.1.11 - 2025-09-19
|
11
18
|
|
12
19
|
- Fix: KafkaSource was broken when used with a non-ActiveRecordProducer.
|
data/lib/deimos/transcoder.rb
CHANGED
@@ -53,7 +53,7 @@ module Deimos
|
|
53
53
|
return nil if payload.nil?
|
54
54
|
|
55
55
|
decoded_payload = self.backend.decode(payload)
|
56
|
-
return decoded_payload
|
56
|
+
return decoded_payload if !@use_schema_classes || !decoded_payload.is_a?(Hash)
|
57
57
|
|
58
58
|
Utils::SchemaClass.instance(decoded_payload,
|
59
59
|
@schema,
|
data/lib/deimos/version.rb
CHANGED
@@ -269,7 +269,11 @@ module Deimos
|
|
269
269
|
default = field.default
|
270
270
|
return ' nil' if default == :no_default || default.nil? || IGNORE_DEFAULTS.include?(field.name)
|
271
271
|
|
272
|
-
|
272
|
+
type_sym = field.type.type_sym
|
273
|
+
if type_sym == :union
|
274
|
+
type_sym = field.type.schemas.find { |s| s.type_sym != :null }&.type_sym
|
275
|
+
end
|
276
|
+
case type_sym
|
273
277
|
when :string, :enum
|
274
278
|
" \"#{default}\""
|
275
279
|
when :record
|
data/spec/consumer_spec.rb
CHANGED
@@ -20,6 +20,7 @@ module ConsumerTest
|
|
20
20
|
# :nodoc:
|
21
21
|
def consume_message(message)
|
22
22
|
message.payload
|
23
|
+
message.key
|
23
24
|
end
|
24
25
|
end
|
25
26
|
stub_const('ConsumerTest::MyConsumer', consumer_class)
|
@@ -82,6 +83,23 @@ module ConsumerTest
|
|
82
83
|
to raise_error(Avro::SchemaValidator::ValidationError)
|
83
84
|
end
|
84
85
|
|
86
|
+
it 'should work if schema is set to string' do
|
87
|
+
Karafka::App.routes.redraw do
|
88
|
+
topic 'my_consume_topic' do
|
89
|
+
schema 'MySchema'
|
90
|
+
namespace 'com.my-namespace'
|
91
|
+
key_config plain: true
|
92
|
+
consumer MyConsumer
|
93
|
+
reraise_errors true
|
94
|
+
use_schema_classes use_schema_classes
|
95
|
+
reraise_errors true
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
test_consume_message(MyConsumer, { 'test_id' => 'foo',
|
100
|
+
'some_int' => 123 }, key: 'a key')
|
101
|
+
end
|
102
|
+
|
85
103
|
it 'should fail if reraise is false but fatal_error is true' do
|
86
104
|
expect { test_consume_message(MyConsumer, {test_id: 'fatal'}) }.
|
87
105
|
to raise_error(Avro::SchemaValidator::ValidationError)
|
@@ -67,7 +67,7 @@ RSpec.describe Schemas::MyNamespace::MySchemaWithComplexType do
|
|
67
67
|
let(:schema_fields) do
|
68
68
|
%w(test_id test_float test_int_array test_optional_int test_string_array some_integer_map
|
69
69
|
some_record some_optional_record some_record_array some_record_map some_enum_array
|
70
|
-
some_optional_enum some_enum_with_default)
|
70
|
+
some_optional_enum some_enum_with_default union_string)
|
71
71
|
end
|
72
72
|
|
73
73
|
it 'should return the name of the schema and namespace' do
|
@@ -101,14 +101,15 @@ RSpec.describe Schemas::MyNamespace::MySchemaWithComplexType do
|
|
101
101
|
'record_2' => { 'a_record_field' => 'field 6' }
|
102
102
|
},
|
103
103
|
'some_enum_array' => %w(sym1 sym2),
|
104
|
-
'some_enum_with_default' => 'sym6'
|
104
|
+
'some_enum_with_default' => 'sym6',
|
105
|
+
'union_string' => ''
|
105
106
|
}
|
106
107
|
|
107
108
|
expect(klass.as_json).to eq(payload_h)
|
108
109
|
end
|
109
110
|
|
110
111
|
it 'should return a JSON string of the payload' do
|
111
|
-
s = '{"test_id":"test id","test_float":1.2,"test_string_array":["abc","def"],"test_int_array":[123,456],"test_optional_int":123,"some_integer_map":{"int_1":1,"int_2":2},"some_record":{"a_record_field":"field 1"},"some_optional_record":{"a_record_field":"field 2"},"some_record_array":[{"a_record_field":"field 3"},{"a_record_field":"field 4"}],"some_record_map":{"record_1":{"a_record_field":"field 5"},"record_2":{"a_record_field":"field 6"}},"some_enum_array":["sym1","sym2"],"some_optional_enum":null,"some_enum_with_default":"sym6"}'
|
112
|
+
s = '{"test_id":"test id","union_string":"","test_float":1.2,"test_string_array":["abc","def"],"test_int_array":[123,456],"test_optional_int":123,"some_integer_map":{"int_1":1,"int_2":2},"some_record":{"a_record_field":"field 1"},"some_optional_record":{"a_record_field":"field 2"},"some_record_array":[{"a_record_field":"field 3"},{"a_record_field":"field 4"}],"some_record_map":{"record_1":{"a_record_field":"field 5"},"record_2":{"a_record_field":"field 6"}},"some_enum_array":["sym1","sym2"],"some_optional_enum":null,"some_enum_with_default":"sym6"}'
|
112
113
|
expect(klass.to_json).to eq(s)
|
113
114
|
end
|
114
115
|
end
|
@@ -209,9 +210,9 @@ RSpec.describe Schemas::MyNamespace::MySchemaWithComplexType do
|
|
209
210
|
expect(klass.some_enum_array.first).
|
210
211
|
to eq(described_class::AnEnum.new('new_sym'))
|
211
212
|
|
212
|
-
klass.some_enum_array.second.
|
213
|
+
klass.some_enum_array.second.value = described_class::AnEnum.
|
213
214
|
new('other_sym')
|
214
|
-
expect(klass.some_enum_array.second.
|
215
|
+
expect(klass.some_enum_array.second.value).to eq('other_sym')
|
215
216
|
end
|
216
217
|
|
217
218
|
it 'should modify the value of some_record_map' do
|
@@ -41,13 +41,20 @@ module Schemas; module MyNamespace
|
|
41
41
|
|
42
42
|
# Autogenerated Schema for Enum at com.my-namespace.AnEnum
|
43
43
|
class AnEnum < Deimos::SchemaClass::Enum
|
44
|
-
# @return ['sym1', 'sym2']
|
45
|
-
attr_accessor :an_enum
|
46
|
-
|
47
44
|
# @override
|
48
45
|
def symbols
|
49
46
|
%w(sym1 sym2)
|
50
47
|
end
|
48
|
+
|
49
|
+
|
50
|
+
def sym1?
|
51
|
+
@value == 'sym1'
|
52
|
+
end
|
53
|
+
|
54
|
+
def sym2?
|
55
|
+
@value == 'sym2'
|
56
|
+
end
|
57
|
+
|
51
58
|
end
|
52
59
|
|
53
60
|
|
@@ -41,35 +41,56 @@ module Schemas; module MyNamespace
|
|
41
41
|
|
42
42
|
# Autogenerated Schema for Enum at com.my-namespace.AnEnum
|
43
43
|
class AnEnum < Deimos::SchemaClass::Enum
|
44
|
-
# @return ['sym1', 'sym2']
|
45
|
-
attr_accessor :an_enum
|
46
|
-
|
47
44
|
# @override
|
48
45
|
def symbols
|
49
46
|
%w(sym1 sym2)
|
50
47
|
end
|
48
|
+
|
49
|
+
|
50
|
+
def sym1?
|
51
|
+
@value == 'sym1'
|
52
|
+
end
|
53
|
+
|
54
|
+
def sym2?
|
55
|
+
@value == 'sym2'
|
56
|
+
end
|
57
|
+
|
51
58
|
end
|
52
59
|
|
53
60
|
# Autogenerated Schema for Enum at com.my-namespace.AnotherEnum
|
54
61
|
class AnotherEnum < Deimos::SchemaClass::Enum
|
55
|
-
# @return ['sym3', 'sym4']
|
56
|
-
attr_accessor :another_enum
|
57
|
-
|
58
62
|
# @override
|
59
63
|
def symbols
|
60
64
|
%w(sym3 sym4)
|
61
65
|
end
|
66
|
+
|
67
|
+
|
68
|
+
def sym3?
|
69
|
+
@value == 'sym3'
|
70
|
+
end
|
71
|
+
|
72
|
+
def sym4?
|
73
|
+
@value == 'sym4'
|
74
|
+
end
|
75
|
+
|
62
76
|
end
|
63
77
|
|
64
78
|
# Autogenerated Schema for Enum at com.my-namespace.YetAnotherEnum
|
65
79
|
class YetAnotherEnum < Deimos::SchemaClass::Enum
|
66
|
-
# @return ['sym5', 'sym6']
|
67
|
-
attr_accessor :yet_another_enum
|
68
|
-
|
69
80
|
# @override
|
70
81
|
def symbols
|
71
82
|
%w(sym5 sym6)
|
72
83
|
end
|
84
|
+
|
85
|
+
|
86
|
+
def sym5?
|
87
|
+
@value == 'sym5'
|
88
|
+
end
|
89
|
+
|
90
|
+
def sym6?
|
91
|
+
@value == 'sym6'
|
92
|
+
end
|
93
|
+
|
73
94
|
end
|
74
95
|
|
75
96
|
|
@@ -92,6 +113,8 @@ module Schemas; module MyNamespace
|
|
92
113
|
### Attribute Accessors ###
|
93
114
|
# @return [String]
|
94
115
|
attr_accessor :test_id
|
116
|
+
# @return [String, nil]
|
117
|
+
attr_accessor :union_string
|
95
118
|
# @return [Float]
|
96
119
|
attr_accessor :test_float
|
97
120
|
# @return [Array<String>]
|
@@ -147,6 +170,7 @@ module Schemas; module MyNamespace
|
|
147
170
|
|
148
171
|
# @override
|
149
172
|
def initialize(_from_message: false, test_id: nil,
|
173
|
+
union_string: "",
|
150
174
|
test_float: nil,
|
151
175
|
test_string_array: ["test"],
|
152
176
|
test_int_array: [123],
|
@@ -162,6 +186,7 @@ module Schemas; module MyNamespace
|
|
162
186
|
@_from_message = _from_message
|
163
187
|
super
|
164
188
|
self.test_id = test_id
|
189
|
+
self.union_string = union_string
|
165
190
|
self.test_float = test_float
|
166
191
|
self.test_string_array = test_string_array
|
167
192
|
self.test_int_array = test_int_array
|
@@ -197,6 +222,7 @@ module Schemas; module MyNamespace
|
|
197
222
|
def as_json(_opts={})
|
198
223
|
{
|
199
224
|
'test_id' => @test_id,
|
225
|
+
'union_string' => @union_string,
|
200
226
|
'test_float' => @test_float,
|
201
227
|
'test_string_array' => @test_string_array,
|
202
228
|
'test_int_array' => @test_int_array,
|
@@ -749,6 +749,8 @@ module Schemas
|
|
749
749
|
### Attribute Accessors ###
|
750
750
|
# @return [String]
|
751
751
|
attr_accessor :test_id
|
752
|
+
# @return [String, nil]
|
753
|
+
attr_accessor :union_string
|
752
754
|
# @return [Float]
|
753
755
|
attr_accessor :test_float
|
754
756
|
# @return [Array<String>]
|
@@ -804,6 +806,7 @@ module Schemas
|
|
804
806
|
|
805
807
|
# @override
|
806
808
|
def initialize(_from_message: false, test_id: nil,
|
809
|
+
union_string: "",
|
807
810
|
test_float: nil,
|
808
811
|
test_string_array: ["test"],
|
809
812
|
test_int_array: [123],
|
@@ -819,6 +822,7 @@ module Schemas
|
|
819
822
|
@_from_message = _from_message
|
820
823
|
super
|
821
824
|
self.test_id = test_id
|
825
|
+
self.union_string = union_string
|
822
826
|
self.test_float = test_float
|
823
827
|
self.test_string_array = test_string_array
|
824
828
|
self.test_int_array = test_int_array
|
@@ -847,6 +851,7 @@ module Schemas
|
|
847
851
|
def as_json(_opts={})
|
848
852
|
{
|
849
853
|
'test_id' => @test_id,
|
854
|
+
'union_string' => @union_string,
|
850
855
|
'test_float' => @test_float,
|
851
856
|
'test_string_array' => @test_string_array,
|
852
857
|
'test_int_array' => @test_int_array,
|
@@ -825,6 +825,8 @@ module Schemas
|
|
825
825
|
### Attribute Accessors ###
|
826
826
|
# @return [String]
|
827
827
|
attr_accessor :test_id
|
828
|
+
# @return [String, nil]
|
829
|
+
attr_accessor :union_string
|
828
830
|
# @return [Float]
|
829
831
|
attr_accessor :test_float
|
830
832
|
# @return [Array<String>]
|
@@ -880,6 +882,7 @@ module Schemas
|
|
880
882
|
|
881
883
|
# @override
|
882
884
|
def initialize(_from_message: false, test_id: nil,
|
885
|
+
union_string: "",
|
883
886
|
test_float: nil,
|
884
887
|
test_string_array: ["test"],
|
885
888
|
test_int_array: [123],
|
@@ -895,6 +898,7 @@ module Schemas
|
|
895
898
|
@_from_message = _from_message
|
896
899
|
super
|
897
900
|
self.test_id = test_id
|
901
|
+
self.union_string = union_string
|
898
902
|
self.test_float = test_float
|
899
903
|
self.test_string_array = test_string_array
|
900
904
|
self.test_int_array = test_int_array
|
@@ -923,6 +927,7 @@ module Schemas
|
|
923
927
|
def as_json(_opts={})
|
924
928
|
{
|
925
929
|
'test_id' => @test_id,
|
930
|
+
'union_string' => @union_string,
|
926
931
|
'test_float' => @test_float,
|
927
932
|
'test_string_array' => @test_string_array,
|
928
933
|
'test_int_array' => @test_int_array,
|
@@ -749,6 +749,8 @@ module Schemas
|
|
749
749
|
### Attribute Accessors ###
|
750
750
|
# @return [String]
|
751
751
|
attr_accessor :test_id
|
752
|
+
# @return [String, nil]
|
753
|
+
attr_accessor :union_string
|
752
754
|
# @return [Float]
|
753
755
|
attr_accessor :test_float
|
754
756
|
# @return [Array<String>]
|
@@ -804,6 +806,7 @@ module Schemas
|
|
804
806
|
|
805
807
|
# @override
|
806
808
|
def initialize(_from_message: false, test_id: nil,
|
809
|
+
union_string: "",
|
807
810
|
test_float: nil,
|
808
811
|
test_string_array: ["test"],
|
809
812
|
test_int_array: [123],
|
@@ -819,6 +822,7 @@ module Schemas
|
|
819
822
|
@_from_message = _from_message
|
820
823
|
super
|
821
824
|
self.test_id = test_id
|
825
|
+
self.union_string = union_string
|
822
826
|
self.test_float = test_float
|
823
827
|
self.test_string_array = test_string_array
|
824
828
|
self.test_int_array = test_int_array
|
@@ -847,6 +851,7 @@ module Schemas
|
|
847
851
|
def as_json(_opts={})
|
848
852
|
{
|
849
853
|
'test_id' => @test_id,
|
854
|
+
'union_string' => @union_string,
|
850
855
|
'test_float' => @test_float,
|
851
856
|
'test_string_array' => @test_string_array,
|
852
857
|
'test_int_array' => @test_int_array,
|
@@ -825,6 +825,8 @@ module Schemas
|
|
825
825
|
### Attribute Accessors ###
|
826
826
|
# @return [String]
|
827
827
|
attr_accessor :test_id
|
828
|
+
# @return [String, nil]
|
829
|
+
attr_accessor :union_string
|
828
830
|
# @return [Float]
|
829
831
|
attr_accessor :test_float
|
830
832
|
# @return [Array<String>]
|
@@ -880,6 +882,7 @@ module Schemas
|
|
880
882
|
|
881
883
|
# @override
|
882
884
|
def initialize(_from_message: false, test_id: nil,
|
885
|
+
union_string: "",
|
883
886
|
test_float: nil,
|
884
887
|
test_string_array: ["test"],
|
885
888
|
test_int_array: [123],
|
@@ -895,6 +898,7 @@ module Schemas
|
|
895
898
|
@_from_message = _from_message
|
896
899
|
super
|
897
900
|
self.test_id = test_id
|
901
|
+
self.union_string = union_string
|
898
902
|
self.test_float = test_float
|
899
903
|
self.test_string_array = test_string_array
|
900
904
|
self.test_int_array = test_int_array
|
@@ -923,6 +927,7 @@ module Schemas
|
|
923
927
|
def as_json(_opts={})
|
924
928
|
{
|
925
929
|
'test_id' => @test_id,
|
930
|
+
'union_string' => @union_string,
|
926
931
|
'test_float' => @test_float,
|
927
932
|
'test_string_array' => @test_string_array,
|
928
933
|
'test_int_array' => @test_int_array,
|
@@ -749,6 +749,8 @@ module Schemas
|
|
749
749
|
### Attribute Accessors ###
|
750
750
|
# @return [String]
|
751
751
|
attr_accessor :test_id
|
752
|
+
# @return [String, nil]
|
753
|
+
attr_accessor :union_string
|
752
754
|
# @return [Float]
|
753
755
|
attr_accessor :test_float
|
754
756
|
# @return [Array<String>]
|
@@ -804,6 +806,7 @@ module Schemas
|
|
804
806
|
|
805
807
|
# @override
|
806
808
|
def initialize(_from_message: false, test_id: nil,
|
809
|
+
union_string: "",
|
807
810
|
test_float: nil,
|
808
811
|
test_string_array: ["test"],
|
809
812
|
test_int_array: [123],
|
@@ -819,6 +822,7 @@ module Schemas
|
|
819
822
|
@_from_message = _from_message
|
820
823
|
super
|
821
824
|
self.test_id = test_id
|
825
|
+
self.union_string = union_string
|
822
826
|
self.test_float = test_float
|
823
827
|
self.test_string_array = test_string_array
|
824
828
|
self.test_int_array = test_int_array
|
@@ -847,6 +851,7 @@ module Schemas
|
|
847
851
|
def as_json(_opts={})
|
848
852
|
{
|
849
853
|
'test_id' => @test_id,
|
854
|
+
'union_string' => @union_string,
|
850
855
|
'test_float' => @test_float,
|
851
856
|
'test_string_array' => @test_string_array,
|
852
857
|
'test_int_array' => @test_int_array,
|
@@ -825,6 +825,8 @@ module Schemas
|
|
825
825
|
### Attribute Accessors ###
|
826
826
|
# @return [String]
|
827
827
|
attr_accessor :test_id
|
828
|
+
# @return [String, nil]
|
829
|
+
attr_accessor :union_string
|
828
830
|
# @return [Float]
|
829
831
|
attr_accessor :test_float
|
830
832
|
# @return [Array<String>]
|
@@ -880,6 +882,7 @@ module Schemas
|
|
880
882
|
|
881
883
|
# @override
|
882
884
|
def initialize(_from_message: false, test_id: nil,
|
885
|
+
union_string: "",
|
883
886
|
test_float: nil,
|
884
887
|
test_string_array: ["test"],
|
885
888
|
test_int_array: [123],
|
@@ -895,6 +898,7 @@ module Schemas
|
|
895
898
|
@_from_message = _from_message
|
896
899
|
super
|
897
900
|
self.test_id = test_id
|
901
|
+
self.union_string = union_string
|
898
902
|
self.test_float = test_float
|
899
903
|
self.test_string_array = test_string_array
|
900
904
|
self.test_int_array = test_int_array
|
@@ -923,6 +927,7 @@ module Schemas
|
|
923
927
|
def as_json(_opts={})
|
924
928
|
{
|
925
929
|
'test_id' => @test_id,
|
930
|
+
'union_string' => @union_string,
|
926
931
|
'test_float' => @test_float,
|
927
932
|
'test_string_array' => @test_string_array,
|
928
933
|
'test_int_array' => @test_int_array,
|
@@ -749,6 +749,8 @@ module Schemas
|
|
749
749
|
### Attribute Accessors ###
|
750
750
|
# @return [String]
|
751
751
|
attr_accessor :test_id
|
752
|
+
# @return [String, nil]
|
753
|
+
attr_accessor :union_string
|
752
754
|
# @return [Float]
|
753
755
|
attr_accessor :test_float
|
754
756
|
# @return [Array<String>]
|
@@ -804,6 +806,7 @@ module Schemas
|
|
804
806
|
|
805
807
|
# @override
|
806
808
|
def initialize(_from_message: false, test_id: nil,
|
809
|
+
union_string: "",
|
807
810
|
test_float: nil,
|
808
811
|
test_string_array: ["test"],
|
809
812
|
test_int_array: [123],
|
@@ -819,6 +822,7 @@ module Schemas
|
|
819
822
|
@_from_message = _from_message
|
820
823
|
super
|
821
824
|
self.test_id = test_id
|
825
|
+
self.union_string = union_string
|
822
826
|
self.test_float = test_float
|
823
827
|
self.test_string_array = test_string_array
|
824
828
|
self.test_int_array = test_int_array
|
@@ -847,6 +851,7 @@ module Schemas
|
|
847
851
|
def as_json(_opts={})
|
848
852
|
{
|
849
853
|
'test_id' => @test_id,
|
854
|
+
'union_string' => @union_string,
|
850
855
|
'test_float' => @test_float,
|
851
856
|
'test_string_array' => @test_string_array,
|
852
857
|
'test_int_array' => @test_int_array,
|
@@ -825,6 +825,8 @@ module Schemas
|
|
825
825
|
### Attribute Accessors ###
|
826
826
|
# @return [String]
|
827
827
|
attr_accessor :test_id
|
828
|
+
# @return [String, nil]
|
829
|
+
attr_accessor :union_string
|
828
830
|
# @return [Float]
|
829
831
|
attr_accessor :test_float
|
830
832
|
# @return [Array<String>]
|
@@ -880,6 +882,7 @@ module Schemas
|
|
880
882
|
|
881
883
|
# @override
|
882
884
|
def initialize(_from_message: false, test_id: nil,
|
885
|
+
union_string: "",
|
883
886
|
test_float: nil,
|
884
887
|
test_string_array: ["test"],
|
885
888
|
test_int_array: [123],
|
@@ -895,6 +898,7 @@ module Schemas
|
|
895
898
|
@_from_message = _from_message
|
896
899
|
super
|
897
900
|
self.test_id = test_id
|
901
|
+
self.union_string = union_string
|
898
902
|
self.test_float = test_float
|
899
903
|
self.test_string_array = test_string_array
|
900
904
|
self.test_int_array = test_int_array
|
@@ -923,6 +927,7 @@ module Schemas
|
|
923
927
|
def as_json(_opts={})
|
924
928
|
{
|
925
929
|
'test_id' => @test_id,
|
930
|
+
'union_string' => @union_string,
|
926
931
|
'test_float' => @test_float,
|
927
932
|
'test_string_array' => @test_string_array,
|
928
933
|
'test_int_array' => @test_int_array,
|
@@ -749,6 +749,8 @@ module Schemas
|
|
749
749
|
### Attribute Accessors ###
|
750
750
|
# @return [String]
|
751
751
|
attr_accessor :test_id
|
752
|
+
# @return [String, nil]
|
753
|
+
attr_accessor :union_string
|
752
754
|
# @return [Float]
|
753
755
|
attr_accessor :test_float
|
754
756
|
# @return [Array<String>]
|
@@ -804,6 +806,7 @@ module Schemas
|
|
804
806
|
|
805
807
|
# @override
|
806
808
|
def initialize(_from_message: false, test_id: nil,
|
809
|
+
union_string: "",
|
807
810
|
test_float: nil,
|
808
811
|
test_string_array: ["test"],
|
809
812
|
test_int_array: [123],
|
@@ -819,6 +822,7 @@ module Schemas
|
|
819
822
|
@_from_message = _from_message
|
820
823
|
super
|
821
824
|
self.test_id = test_id
|
825
|
+
self.union_string = union_string
|
822
826
|
self.test_float = test_float
|
823
827
|
self.test_string_array = test_string_array
|
824
828
|
self.test_int_array = test_int_array
|
@@ -847,6 +851,7 @@ module Schemas
|
|
847
851
|
def as_json(_opts={})
|
848
852
|
{
|
849
853
|
'test_id' => @test_id,
|
854
|
+
'union_string' => @union_string,
|
850
855
|
'test_float' => @test_float,
|
851
856
|
'test_string_array' => @test_string_array,
|
852
857
|
'test_int_array' => @test_int_array,
|
@@ -825,6 +825,8 @@ module Schemas
|
|
825
825
|
### Attribute Accessors ###
|
826
826
|
# @return [String]
|
827
827
|
attr_accessor :test_id
|
828
|
+
# @return [String, nil]
|
829
|
+
attr_accessor :union_string
|
828
830
|
# @return [Float]
|
829
831
|
attr_accessor :test_float
|
830
832
|
# @return [Array<String>]
|
@@ -880,6 +882,7 @@ module Schemas
|
|
880
882
|
|
881
883
|
# @override
|
882
884
|
def initialize(_from_message: false, test_id: nil,
|
885
|
+
union_string: "",
|
883
886
|
test_float: nil,
|
884
887
|
test_string_array: ["test"],
|
885
888
|
test_int_array: [123],
|
@@ -895,6 +898,7 @@ module Schemas
|
|
895
898
|
@_from_message = _from_message
|
896
899
|
super
|
897
900
|
self.test_id = test_id
|
901
|
+
self.union_string = union_string
|
898
902
|
self.test_float = test_float
|
899
903
|
self.test_string_array = test_string_array
|
900
904
|
self.test_int_array = test_int_array
|
@@ -923,6 +927,7 @@ module Schemas
|
|
923
927
|
def as_json(_opts={})
|
924
928
|
{
|
925
929
|
'test_id' => @test_id,
|
930
|
+
'union_string' => @union_string,
|
926
931
|
'test_float' => @test_float,
|
927
932
|
'test_string_array' => @test_string_array,
|
928
933
|
'test_int_array' => @test_int_array,
|
@@ -700,6 +700,8 @@ module Schemas; module Com; module MyNamespace
|
|
700
700
|
### Attribute Accessors ###
|
701
701
|
# @return [String]
|
702
702
|
attr_accessor :test_id
|
703
|
+
# @return [String, nil]
|
704
|
+
attr_accessor :union_string
|
703
705
|
# @return [Float]
|
704
706
|
attr_accessor :test_float
|
705
707
|
# @return [Array<String>]
|
@@ -755,6 +757,7 @@ module Schemas; module Com; module MyNamespace
|
|
755
757
|
|
756
758
|
# @override
|
757
759
|
def initialize(_from_message: false, test_id: nil,
|
760
|
+
union_string: "",
|
758
761
|
test_float: nil,
|
759
762
|
test_string_array: ["test"],
|
760
763
|
test_int_array: [123],
|
@@ -770,6 +773,7 @@ module Schemas; module Com; module MyNamespace
|
|
770
773
|
@_from_message = _from_message
|
771
774
|
super
|
772
775
|
self.test_id = test_id
|
776
|
+
self.union_string = union_string
|
773
777
|
self.test_float = test_float
|
774
778
|
self.test_string_array = test_string_array
|
775
779
|
self.test_int_array = test_int_array
|
@@ -798,6 +802,7 @@ module Schemas; module Com; module MyNamespace
|
|
798
802
|
def as_json(_opts={})
|
799
803
|
{
|
800
804
|
'test_id' => @test_id,
|
805
|
+
'union_string' => @union_string,
|
801
806
|
'test_float' => @test_float,
|
802
807
|
'test_string_array' => @test_string_array,
|
803
808
|
'test_int_array' => @test_int_array,
|
@@ -745,6 +745,8 @@ module Schemas; module MyNamespace
|
|
745
745
|
### Attribute Accessors ###
|
746
746
|
# @return [String]
|
747
747
|
attr_accessor :test_id
|
748
|
+
# @return [String, nil]
|
749
|
+
attr_accessor :union_string
|
748
750
|
# @return [Float]
|
749
751
|
attr_accessor :test_float
|
750
752
|
# @return [Array<String>]
|
@@ -800,6 +802,7 @@ module Schemas; module MyNamespace
|
|
800
802
|
|
801
803
|
# @override
|
802
804
|
def initialize(_from_message: false, test_id: nil,
|
805
|
+
union_string: "",
|
803
806
|
test_float: nil,
|
804
807
|
test_string_array: ["test"],
|
805
808
|
test_int_array: [123],
|
@@ -815,6 +818,7 @@ module Schemas; module MyNamespace
|
|
815
818
|
@_from_message = _from_message
|
816
819
|
super
|
817
820
|
self.test_id = test_id
|
821
|
+
self.union_string = union_string
|
818
822
|
self.test_float = test_float
|
819
823
|
self.test_string_array = test_string_array
|
820
824
|
self.test_int_array = test_int_array
|
@@ -843,6 +847,7 @@ module Schemas; module MyNamespace
|
|
843
847
|
def as_json(_opts={})
|
844
848
|
{
|
845
849
|
'test_id' => @test_id,
|
850
|
+
'union_string' => @union_string,
|
846
851
|
'test_float' => @test_float,
|
847
852
|
'test_string_array' => @test_string_array,
|
848
853
|
'test_int_array' => @test_int_array,
|
@@ -749,6 +749,8 @@ module Schemas
|
|
749
749
|
### Attribute Accessors ###
|
750
750
|
# @return [String]
|
751
751
|
attr_accessor :test_id
|
752
|
+
# @return [String, nil]
|
753
|
+
attr_accessor :union_string
|
752
754
|
# @return [Float]
|
753
755
|
attr_accessor :test_float
|
754
756
|
# @return [Array<String>]
|
@@ -804,6 +806,7 @@ module Schemas
|
|
804
806
|
|
805
807
|
# @override
|
806
808
|
def initialize(_from_message: false, test_id: nil,
|
809
|
+
union_string: "",
|
807
810
|
test_float: nil,
|
808
811
|
test_string_array: ["test"],
|
809
812
|
test_int_array: [123],
|
@@ -819,6 +822,7 @@ module Schemas
|
|
819
822
|
@_from_message = _from_message
|
820
823
|
super
|
821
824
|
self.test_id = test_id
|
825
|
+
self.union_string = union_string
|
822
826
|
self.test_float = test_float
|
823
827
|
self.test_string_array = test_string_array
|
824
828
|
self.test_int_array = test_int_array
|
@@ -847,6 +851,7 @@ module Schemas
|
|
847
851
|
def as_json(_opts={})
|
848
852
|
{
|
849
853
|
'test_id' => @test_id,
|
854
|
+
'union_string' => @union_string,
|
850
855
|
'test_float' => @test_float,
|
851
856
|
'test_string_array' => @test_string_array,
|
852
857
|
'test_int_array' => @test_int_array,
|
@@ -825,6 +825,8 @@ module Schemas
|
|
825
825
|
### Attribute Accessors ###
|
826
826
|
# @return [String]
|
827
827
|
attr_accessor :test_id
|
828
|
+
# @return [String, nil]
|
829
|
+
attr_accessor :union_string
|
828
830
|
# @return [Float]
|
829
831
|
attr_accessor :test_float
|
830
832
|
# @return [Array<String>]
|
@@ -880,6 +882,7 @@ module Schemas
|
|
880
882
|
|
881
883
|
# @override
|
882
884
|
def initialize(_from_message: false, test_id: nil,
|
885
|
+
union_string: "",
|
883
886
|
test_float: nil,
|
884
887
|
test_string_array: ["test"],
|
885
888
|
test_int_array: [123],
|
@@ -895,6 +898,7 @@ module Schemas
|
|
895
898
|
@_from_message = _from_message
|
896
899
|
super
|
897
900
|
self.test_id = test_id
|
901
|
+
self.union_string = union_string
|
898
902
|
self.test_float = test_float
|
899
903
|
self.test_string_array = test_string_array
|
900
904
|
self.test_int_array = test_int_array
|
@@ -923,6 +927,7 @@ module Schemas
|
|
923
927
|
def as_json(_opts={})
|
924
928
|
{
|
925
929
|
'test_id' => @test_id,
|
930
|
+
'union_string' => @union_string,
|
926
931
|
'test_float' => @test_float,
|
927
932
|
'test_string_array' => @test_string_array,
|
928
933
|
'test_int_array' => @test_int_array,
|