avro-gen-ruby 0.1.0

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.
Files changed (97) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/ci.yml +34 -0
  3. data/.github/workflows/release.yml +31 -0
  4. data/.gitignore +6 -0
  5. data/.rspec +1 -0
  6. data/.rubocop.yml +100 -0
  7. data/Gemfile +5 -0
  8. data/LICENSE +21 -0
  9. data/README.md +61 -0
  10. data/Rakefile +11 -0
  11. data/avro-gen-ruby.gemspec +32 -0
  12. data/lib/avro_gen/avro_parser.rb +64 -0
  13. data/lib/avro_gen/configuration.rb +60 -0
  14. data/lib/avro_gen/errors.rb +6 -0
  15. data/lib/avro_gen/generator/templates/schema_class.rb.tt +8 -0
  16. data/lib/avro_gen/generator/templates/schema_enum.rb.tt +13 -0
  17. data/lib/avro_gen/generator/templates/schema_record.rb.tt +102 -0
  18. data/lib/avro_gen/generator.rb +375 -0
  19. data/lib/avro_gen/railtie.rb +12 -0
  20. data/lib/avro_gen/schema_class/base.rb +62 -0
  21. data/lib/avro_gen/schema_class/enum.rb +48 -0
  22. data/lib/avro_gen/schema_class/record.rb +108 -0
  23. data/lib/avro_gen/schema_class.rb +62 -0
  24. data/lib/avro_gen/schema_field.rb +26 -0
  25. data/lib/avro_gen/schema_validator.rb +80 -0
  26. data/lib/avro_gen/upgrader.rb +43 -0
  27. data/lib/avro_gen/version.rb +5 -0
  28. data/lib/avro_gen.rb +18 -0
  29. data/lib/tasks/avro.rake +18 -0
  30. data/regenerate_test_schema_classes.rb +32 -0
  31. data/spec/generator_spec.rb +92 -0
  32. data/spec/my_schema_spec.rb +18 -0
  33. data/spec/my_schema_with_circular_reference_spec.rb +97 -0
  34. data/spec/my_schema_with_complex_types_spec.rb +235 -0
  35. data/spec/schema_validator_spec.rb +42 -0
  36. data/spec/schemas/com/my-namespace/Generated.avsc +77 -0
  37. data/spec/schemas/com/my-namespace/MyNestedSchema.avsc +62 -0
  38. data/spec/schemas/com/my-namespace/MySchema.avsc +18 -0
  39. data/spec/schemas/com/my-namespace/MySchemaCompound_key.avsc +18 -0
  40. data/spec/schemas/com/my-namespace/MySchemaId_key.avsc +12 -0
  41. data/spec/schemas/com/my-namespace/MySchemaWithBooleans.avsc +18 -0
  42. data/spec/schemas/com/my-namespace/MySchemaWithCircularReference.avsc +39 -0
  43. data/spec/schemas/com/my-namespace/MySchemaWithComplexTypes.avsc +120 -0
  44. data/spec/schemas/com/my-namespace/MySchemaWithDateTimes.avsc +33 -0
  45. data/spec/schemas/com/my-namespace/MySchemaWithId.avsc +28 -0
  46. data/spec/schemas/com/my-namespace/MySchemaWithTitle.avsc +22 -0
  47. data/spec/schemas/com/my-namespace/MySchemaWithUnionType.avsc +91 -0
  48. data/spec/schemas/com/my-namespace/MySchemaWithUniqueId.avsc +32 -0
  49. data/spec/schemas/com/my-namespace/MySchema_key.avsc +13 -0
  50. data/spec/schemas/com/my-namespace/Wibble.avsc +43 -0
  51. data/spec/schemas/com/my-namespace/Widget.avsc +27 -0
  52. data/spec/schemas/com/my-namespace/WidgetTheSecond.avsc +27 -0
  53. data/spec/schemas/com/my-namespace/WidgetTheThird.avsc +27 -0
  54. data/spec/schemas/com/my-namespace/my-suborg/MyLongNamespaceSchema.avsc +18 -0
  55. data/spec/schemas/com/my-namespace/request/CreateTopic.avsc +11 -0
  56. data/spec/schemas/com/my-namespace/request/Index.avsc +11 -0
  57. data/spec/schemas/com/my-namespace/request/UpdateRequest.avsc +11 -0
  58. data/spec/schemas/com/my-namespace/response/CreateTopic.avsc +11 -0
  59. data/spec/schemas/com/my-namespace/response/Index.avsc +11 -0
  60. data/spec/schemas/com/my-namespace/response/UpdateResponse.avsc +11 -0
  61. data/spec/schemas/my_namespace/generated.rb +164 -0
  62. data/spec/schemas/my_namespace/my_long_namespace_schema.rb +49 -0
  63. data/spec/schemas/my_namespace/my_nested_schema.rb +126 -0
  64. data/spec/schemas/my_namespace/my_schema.rb +62 -0
  65. data/spec/schemas/my_namespace/my_schema_compound_key.rb +42 -0
  66. data/spec/schemas/my_namespace/my_schema_id_key.rb +37 -0
  67. data/spec/schemas/my_namespace/my_schema_key.rb +37 -0
  68. data/spec/schemas/my_namespace/my_schema_with_boolean.rb +42 -0
  69. data/spec/schemas/my_namespace/my_schema_with_circular_reference.rb +84 -0
  70. data/spec/schemas/my_namespace/my_schema_with_complex_type.rb +241 -0
  71. data/spec/schemas/my_namespace/my_schema_with_date_time.rb +57 -0
  72. data/spec/schemas/my_namespace/my_schema_with_id.rb +52 -0
  73. data/spec/schemas/my_namespace/my_schema_with_title.rb +47 -0
  74. data/spec/schemas/my_namespace/my_schema_with_union_type.rb +205 -0
  75. data/spec/schemas/my_namespace/my_schema_with_unique_id.rb +57 -0
  76. data/spec/schemas/my_namespace/request/create_topic.rb +37 -0
  77. data/spec/schemas/my_namespace/request/index.rb +37 -0
  78. data/spec/schemas/my_namespace/request/update_request.rb +37 -0
  79. data/spec/schemas/my_namespace/response/create_topic.rb +37 -0
  80. data/spec/schemas/my_namespace/response/index.rb +37 -0
  81. data/spec/schemas/my_namespace/response/update_response.rb +37 -0
  82. data/spec/schemas/my_namespace/wibble.rb +77 -0
  83. data/spec/schemas/my_namespace/widget.rb +57 -0
  84. data/spec/schemas/my_namespace/widget_the_second.rb +57 -0
  85. data/spec/schemas/my_namespace/widget_the_third.rb +57 -0
  86. data/spec/snapshots/consumers-no-nest.snap +1740 -0
  87. data/spec/snapshots/consumers.snap +1720 -0
  88. data/spec/snapshots/my_nested_schema.snap +121 -0
  89. data/spec/snapshots/my_schema_with_boolean.snap +44 -0
  90. data/spec/snapshots/my_schema_with_circular_reference.snap +81 -0
  91. data/spec/snapshots/my_schema_with_complex_type.snap +236 -0
  92. data/spec/snapshots/my_schema_with_date_time.snap +59 -0
  93. data/spec/snapshots/my_schema_with_union_type.snap +207 -0
  94. data/spec/snapshots/namespace_folders.snap +1800 -0
  95. data/spec/snapshots/namespace_map.snap +1800 -0
  96. data/spec/spec_helper.rb +23 -0
  97. metadata +265 -0
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec.describe AvroGen::SchemaValidator do
4
+ describe '.store_for' do
5
+ it 'reuses a single store per path' do
6
+ store = described_class.store_for('spec/schemas')
7
+ expect(described_class.store_for('spec/schemas')).to be(store)
8
+ end
9
+
10
+ it 'uses a different store for a different path' do
11
+ expect(described_class.store_for('spec/schemas')).
12
+ not_to be(described_class.store_for('other/path'))
13
+ end
14
+
15
+ it 'clears the cache on demand' do
16
+ store = described_class.store_for('spec/schemas')
17
+ described_class.clear_store_cache!
18
+ expect(described_class.store_for('spec/schemas')).not_to be(store)
19
+ end
20
+ end
21
+
22
+ describe 'Record#validator' do
23
+ it 'shares one schema store across record instances instead of re-parsing' do
24
+ store_one = Schemas::MyNamespace::MySchema.new.validator.schema_store
25
+ store_two = Schemas::MyNamespace::MyNestedSchema.new.validator.schema_store
26
+ expect(store_one).to be(store_two)
27
+ expect(store_one).to be(described_class.store_for(AvroGen.config.schema_path))
28
+ end
29
+
30
+ it 'still resolves the schema fields' do
31
+ expect(Schemas::MyNamespace::MySchema.new.schema_fields).to include('test_id', 'some_int')
32
+ end
33
+ end
34
+
35
+ describe 'an explicitly provided store' do
36
+ it 'is used instead of creating a new one' do
37
+ store = described_class.store_for('spec/schemas')
38
+ validator = described_class.new(schema: 'MySchema', namespace: 'com.my-namespace', store: store)
39
+ expect(validator.schema_store).to be(store)
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,77 @@
1
+ {
2
+ "namespace": "com.my-namespace",
3
+ "name": "Generated",
4
+ "type": "record",
5
+ "doc": "Test schema",
6
+ "fields": [
7
+ {
8
+ "name": "a_string",
9
+ "type": "string"
10
+ },
11
+ {
12
+ "name": "a_int",
13
+ "type": "int"
14
+ },
15
+ {
16
+ "name": "a_long",
17
+ "type": "long"
18
+ },
19
+ {
20
+ "name": "a_float",
21
+ "type": "float"
22
+ },
23
+ {
24
+ "name": "a_double",
25
+ "type": "double"
26
+ },
27
+ {
28
+ "name": "an_optional_int",
29
+ "type": [ "null", "int" ],
30
+ "doc": "an optional int",
31
+ "default": null
32
+ },
33
+ {
34
+ "name": "an_enum",
35
+ "type": {
36
+ "type": "enum",
37
+ "name": "AnEnum",
38
+ "symbols": ["sym1", "sym2"]
39
+ }
40
+ },
41
+ {
42
+ "name": "an_array",
43
+ "type": {
44
+ "type": "array",
45
+ "items": "int"
46
+ }
47
+ },
48
+ {
49
+ "name": "a_map",
50
+ "type": {
51
+ "type": "map",
52
+ "values": "string"
53
+ }
54
+ },
55
+ {
56
+ "name": "timestamp",
57
+ "type": "string"
58
+ },
59
+ {
60
+ "name": "message_id",
61
+ "type": "string"
62
+ },
63
+ {
64
+ "name": "a_record",
65
+ "type": {
66
+ "type": "record",
67
+ "name": "ARecord",
68
+ "fields": [
69
+ {
70
+ "name": "a_record_field",
71
+ "type": "string"
72
+ }
73
+ ]
74
+ }
75
+ }
76
+ ]
77
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "namespace": "com.my-namespace",
3
+ "name": "MyNestedSchema",
4
+ "type": "record",
5
+ "doc": "Test schema",
6
+ "fields": [
7
+ {
8
+ "name": "test_id",
9
+ "type": "string",
10
+ "doc": "test string"
11
+ },
12
+ {
13
+ "name": "test_float",
14
+ "type": "float",
15
+ "doc": "test float"
16
+ },
17
+ {
18
+ "name": "test_array",
19
+ "type": {
20
+ "type": "array",
21
+ "items": "string"
22
+ }
23
+ },
24
+ {
25
+ "name": "some_nested_record",
26
+ "doc": "some nested record",
27
+ "type": {
28
+ "name": "MyNestedRecord",
29
+ "type": "record",
30
+ "fields": [
31
+ {
32
+ "name": "some_int",
33
+ "type": "int",
34
+ "doc": "some int"
35
+ },
36
+ {
37
+ "name": "some_float",
38
+ "type": "float",
39
+ "doc": "some float"
40
+ },
41
+ {
42
+ "name": "some_string",
43
+ "type": "string",
44
+ "doc": "some string"
45
+ },
46
+ {
47
+ "name": "some_optional_int",
48
+ "type": [ "null", "int" ],
49
+ "doc": "some optional int",
50
+ "default": null
51
+ }
52
+ ]
53
+ }
54
+ },
55
+ {
56
+ "name": "some_optional_record",
57
+ "doc": "some optional record",
58
+ "type": [ "null", "MyNestedRecord" ],
59
+ "default": null
60
+ }
61
+ ]
62
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "namespace": "com.my-namespace",
3
+ "name": "MySchema",
4
+ "type": "record",
5
+ "doc": "Test schema",
6
+ "fields": [
7
+ {
8
+ "name": "test_id",
9
+ "type": "string",
10
+ "doc": "test string"
11
+ },
12
+ {
13
+ "name": "some_int",
14
+ "type": "int",
15
+ "doc": "test int"
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "namespace": "com.my-namespace",
3
+ "name": "MySchemaCompound_key",
4
+ "type": "record",
5
+ "doc": "Test schema",
6
+ "fields": [
7
+ {
8
+ "name": "part_one",
9
+ "type": "string",
10
+ "doc": "test string one"
11
+ },
12
+ {
13
+ "name": "part_two",
14
+ "type": "string",
15
+ "doc": "test string two"
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "namespace": "com.my-namespace",
3
+ "name": "MySchemaId_key",
4
+ "type": "record",
5
+ "doc": "Test schema",
6
+ "fields": [
7
+ {
8
+ "name": "id",
9
+ "type": "int"
10
+ }
11
+ ]
12
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "namespace": "com.my-namespace",
3
+ "name": "MySchemaWithBooleans",
4
+ "type": "record",
5
+ "doc": "Test schema",
6
+ "fields": [
7
+ {
8
+ "name": "test_id",
9
+ "type": "string",
10
+ "doc": "test string"
11
+ },
12
+ {
13
+ "name": "some_bool",
14
+ "type": "boolean",
15
+ "doc": "test bool"
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "namespace": "com.my-namespace",
3
+ "name": "MySchemaWithCircularReference",
4
+ "type": "record",
5
+ "fields": [
6
+ {
7
+ "default": {},
8
+ "name": "properties",
9
+ "type": {
10
+ "type": "map",
11
+ "values": {
12
+ "fields": [
13
+ {
14
+ "name": "property",
15
+ "type": [
16
+ "boolean",
17
+ "int",
18
+ "long",
19
+ "float",
20
+ "double",
21
+ "string",
22
+ {
23
+ "items": "Property",
24
+ "type": "array"
25
+ },
26
+ {
27
+ "type": "map",
28
+ "values": "Property"
29
+ }
30
+ ]
31
+ }
32
+ ],
33
+ "name": "Property",
34
+ "type": "record"
35
+ }
36
+ }
37
+ }
38
+ ]
39
+ }
@@ -0,0 +1,120 @@
1
+ {
2
+ "namespace": "com.my-namespace",
3
+ "name": "MySchemaWithComplexTypes",
4
+ "type": "record",
5
+ "doc": "Test schema",
6
+ "fields": [
7
+ {
8
+ "name": "test_id",
9
+ "type": "string",
10
+ "doc": "test string"
11
+ },
12
+ {
13
+ "name": "union_string",
14
+ "type": ["string", "null"],
15
+ "default": ""
16
+ },
17
+ {
18
+ "name": "test_float",
19
+ "type": "float",
20
+ "doc": "test float"
21
+ },
22
+ {
23
+ "name": "test_string_array",
24
+ "type": {
25
+ "type": "array",
26
+ "items": "string"
27
+ },
28
+ "default": ["test"]
29
+ },
30
+ {
31
+ "name": "test_int_array",
32
+ "type": {
33
+ "type": "array",
34
+ "items": "int"
35
+ },
36
+ "default": [123]
37
+ },
38
+ {
39
+ "name": "test_optional_int",
40
+ "type": [ "int", "null" ],
41
+ "default": 123
42
+ },
43
+ {
44
+ "name": "some_integer_map",
45
+ "doc": "some record map",
46
+ "type": {
47
+ "type": "map",
48
+ "values": "int"
49
+ },
50
+ "default": {"abc": 123}
51
+ },
52
+ {
53
+ "name": "some_record",
54
+ "type": {
55
+ "type": "record",
56
+ "name": "ARecord",
57
+ "fields": [
58
+ {
59
+ "name": "a_record_field",
60
+ "type": "string"
61
+ }
62
+ ]
63
+ },
64
+ "default": {"a_record_field": "Test String"}
65
+ },
66
+ {
67
+ "name": "some_optional_record",
68
+ "doc": "some optional record",
69
+ "type": [ "null", "ARecord" ],
70
+ "default": null
71
+ },
72
+ {
73
+ "name": "some_record_array",
74
+ "doc": "some record array",
75
+ "type": {
76
+ "type": "array",
77
+ "items": "ARecord"
78
+ }
79
+ },
80
+ {
81
+ "name": "some_record_map",
82
+ "doc": "some record map",
83
+ "type": {
84
+ "type": "map",
85
+ "values": "ARecord"
86
+ }
87
+ },
88
+ {
89
+ "name": "some_enum_array",
90
+ "type": {
91
+ "type": "array",
92
+ "items": {
93
+ "type": "enum",
94
+ "name": "AnEnum",
95
+ "symbols": ["sym1", "sym2"]
96
+ }
97
+ }
98
+ },
99
+ {
100
+ "name": "some_optional_enum",
101
+ "type": [
102
+ "null",
103
+ {
104
+ "type": "enum",
105
+ "name": "AnotherEnum",
106
+ "symbols": ["sym3", "sym4"]
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ "name": "some_enum_with_default",
112
+ "default": "sym6",
113
+ "type": {
114
+ "type": "enum",
115
+ "name": "YetAnotherEnum",
116
+ "symbols": ["sym5", "sym6"]
117
+ }
118
+ }
119
+ ]
120
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "namespace": "com.my-namespace",
3
+ "name": "MySchemaWithDateTimes",
4
+ "type": "record",
5
+ "doc": "Test schema",
6
+ "fields": [
7
+ {
8
+ "name": "test_id",
9
+ "type": "string",
10
+ "doc": "test string"
11
+ },
12
+ {
13
+ "name": "updated_at",
14
+ "type": ["int", "null"]
15
+ },
16
+ {
17
+ "name": "some_int",
18
+ "type": ["null", "int"],
19
+ "doc": "test int"
20
+ },
21
+ {
22
+ "name": "some_datetime_int",
23
+ "type": ["null", "int"],
24
+ "doc": "test datetime"
25
+ },
26
+ {
27
+ "name": "timestamp",
28
+ "type": "string",
29
+ "doc": "ISO timestamp",
30
+ "default": ""
31
+ }
32
+ ]
33
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "namespace": "com.my-namespace",
3
+ "name": "MySchemaWithId",
4
+ "type": "record",
5
+ "doc": "Test schema",
6
+ "fields": [
7
+ {
8
+ "name": "test_id",
9
+ "type": "string",
10
+ "doc": "test string"
11
+ },
12
+ {
13
+ "name": "some_int",
14
+ "type": "int",
15
+ "doc": "test int"
16
+ },
17
+ {
18
+ "name": "message_id",
19
+ "type": "string",
20
+ "doc": "UUID"
21
+ },
22
+ {
23
+ "name": "timestamp",
24
+ "type": "string",
25
+ "doc": "timestamp"
26
+ }
27
+ ]
28
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "namespace": "com.my-namespace",
3
+ "name": "MySchemaWithTitle",
4
+ "type": "record",
5
+ "doc": "Test schema",
6
+ "fields": [
7
+ {
8
+ "name": "test_id",
9
+ "type": "string",
10
+ "doc": "test string"
11
+ },
12
+ {
13
+ "name": "some_int",
14
+ "type": "int",
15
+ "doc": "test int"
16
+ },
17
+ {
18
+ "name": "title",
19
+ "type": "string"
20
+ }
21
+ ]
22
+ }
@@ -0,0 +1,91 @@
1
+ {
2
+ "namespace": "com.my-namespace",
3
+ "name": "MySchemaWithUnionType",
4
+ "type": "record",
5
+ "doc": "Test schema",
6
+ "fields": [
7
+ {
8
+ "name": "test_id",
9
+ "type": "string",
10
+ "default": ""
11
+ },
12
+ {
13
+ "name": "test_long",
14
+ "type": [
15
+ "null",
16
+ "long"
17
+ ],
18
+ "default": null
19
+ },
20
+ {
21
+ "name": "test_union_type",
22
+ "type": [
23
+ "null",
24
+ {
25
+ "type": "record",
26
+ "name": "Record1",
27
+ "namespace": "com.flipp.content",
28
+ "fields": [
29
+ {
30
+ "name": "record1_map",
31
+ "type": {
32
+ "type": "map",
33
+ "values": "long"
34
+ },
35
+ "default": {}
36
+ },
37
+ {
38
+ "name": "record1_id",
39
+ "type": "int",
40
+ "default": 0
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "type": "record",
46
+ "name": "Record2",
47
+ "namespace": "com.flipp.content",
48
+ "fields": [
49
+ {
50
+ "name": "record2_id",
51
+ "type": "string",
52
+ "default": ""
53
+ }
54
+ ]
55
+ },
56
+ {
57
+ "type": "record",
58
+ "name": "Record3",
59
+ "namespace": "com.flipp.content",
60
+ "fields": [
61
+ {
62
+ "name": "record3_id",
63
+ "type": "float",
64
+ "default": 0.0
65
+ }
66
+ ]
67
+ },
68
+ {
69
+ "type": "record",
70
+ "name": "Record4",
71
+ "namespace": "com.flipp.content",
72
+ "fields": [
73
+ {
74
+ "name": "record4_id",
75
+ "type": "int",
76
+ "default": 0
77
+ }
78
+ ]
79
+ },
80
+ "int",
81
+ {
82
+ "name": "test_array_of_strings",
83
+ "type": "array",
84
+ "default": [],
85
+ "items":"string"
86
+ }
87
+ ],
88
+ "default": null
89
+ }
90
+ ]
91
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "namespace": "com.my-namespace",
3
+ "name": "MySchemaWithUniqueId",
4
+ "type": "record",
5
+ "doc": "Test schema",
6
+ "fields": [
7
+ {
8
+ "name": "id",
9
+ "type": "int"
10
+ },
11
+ {
12
+ "name": "test_id",
13
+ "type": "string",
14
+ "doc": "test string"
15
+ },
16
+ {
17
+ "name": "some_int",
18
+ "type": "int",
19
+ "doc": "test int"
20
+ },
21
+ {
22
+ "name": "message_id",
23
+ "type": "string",
24
+ "doc": "UUID"
25
+ },
26
+ {
27
+ "name": "timestamp",
28
+ "type": "string",
29
+ "doc": "timestamp"
30
+ }
31
+ ]
32
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "namespace": "com.my-namespace",
3
+ "name": "MySchema_key",
4
+ "type": "record",
5
+ "doc": "Test schema",
6
+ "fields": [
7
+ {
8
+ "name": "test_id",
9
+ "type": "string",
10
+ "doc": "test string"
11
+ }
12
+ ]
13
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "namespace": "com.my-namespace",
3
+ "name": "Wibble",
4
+ "type": "record",
5
+ "fields": [
6
+ {
7
+ "name": "id",
8
+ "type": "long"
9
+ },
10
+ {
11
+ "name": "wibble_id",
12
+ "type": "long"
13
+ },
14
+ {
15
+ "name": "name",
16
+ "type": "string"
17
+ },
18
+ {
19
+ "name": "floop",
20
+ "type": "string"
21
+ },
22
+ {
23
+ "name": "birthday_int",
24
+ "type": "int"
25
+ },
26
+ {
27
+ "name": "birthday_long",
28
+ "type": "long"
29
+ },
30
+ {
31
+ "name": "birthday_optional",
32
+ "type": ["null", "int"]
33
+ },
34
+ {
35
+ "name": "updated_at",
36
+ "type": "long"
37
+ },
38
+ {
39
+ "name": "created_at",
40
+ "type": "long"
41
+ }
42
+ ]
43
+ }