avro-builder 0.3.0 → 0.3.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 +4 -0
- data/README.md +5 -3
- data/lib/avro/builder/field.rb +3 -1
- data/lib/avro/builder/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ad527314da93e91b53852dc9ca99d58170db02b
|
4
|
+
data.tar.gz: 2c21f0fc2eb009ce181288ee367ff898016a2e5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84d0a142b89fdc3bb831350708a92d39ca96f78233bdae4e62873d1f897d23329a16da60efa3fca3b9643772698e03ff5a0d9eb0ff4f592f68508eac3b35c8bb
|
7
|
+
data.tar.gz: be8d9e8135b2cd68b90820545de07028f68500c7592d8e09b08a2acf9c333a73c22be42e0df2baccb54fb2fa6076732cbe7acad3d25d4274684491d874e879e5
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# avro-builder changelog
|
2
2
|
|
3
|
+
## v0.3.1
|
4
|
+
- A `null` default should automatically be added for optional fields to match
|
5
|
+
the `:null` first member of the union.
|
6
|
+
|
3
7
|
## v0.3.0
|
4
8
|
- Add support for nested records. This includes the ability to reference a
|
5
9
|
previously defined record as a type.
|
data/README.md
CHANGED
@@ -108,7 +108,8 @@ This generates the following Avro JSON schema:
|
|
108
108
|
"type": [
|
109
109
|
"null",
|
110
110
|
"string"
|
111
|
-
]
|
111
|
+
],
|
112
|
+
"default": null
|
112
113
|
}
|
113
114
|
]
|
114
115
|
}
|
@@ -117,7 +118,8 @@ This generates the following Avro JSON schema:
|
|
117
118
|
### Required and Optional
|
118
119
|
|
119
120
|
Fields for a record are specified as `required` or `optional`. Optional fields are
|
120
|
-
implemented as a union in Avro, where `null` is the first type in the union
|
121
|
+
implemented as a union in Avro, where `null` is the first type in the union and
|
122
|
+
the field has a default value of `null`.
|
121
123
|
|
122
124
|
### Named Types
|
123
125
|
|
@@ -206,7 +208,7 @@ end
|
|
206
208
|
```
|
207
209
|
|
208
210
|
For an optional union, `null` is automatically added as the first type for
|
209
|
-
the union
|
211
|
+
the union and the field defaults to `null`.
|
210
212
|
|
211
213
|
### Auto-loading and Imports
|
212
214
|
|
data/lib/avro/builder/field.rb
CHANGED
data/lib/avro/builder/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avro-builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Salsify Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: avro
|