mozilla / jsonschema-transpiler

Compile JSON Schema into Avro and BigQuery schemas
Mozilla Public License 2.0
43 stars 9 forks source link

Union of string and bytes should be bytes #83

Open acmiyaguchi opened 5 years ago

acmiyaguchi commented 5 years ago

https://github.com/mozilla/jsonschema-transpiler/blob/536c6fd9fb9095b91bb92fca17bd80927eceb873/src/ast.rs#L137-L145

The union of a string and bytes should probably be bytes, for now it'll be dropped or casted into a string.

{"oneOf": [{"type": "string"}, {"type": "string", "format": "bytes"}]}

Originally posted by @acmiyaguchi in https://github.com/mozilla/jsonschema-transpiler/pull/82#issuecomment-518409624