mozilla / jsonschema-transpiler

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

Bug 1595899 - Add option to generate maps without value #92

Closed relud closed 4 years ago

relud commented 4 years ago

for payload.addonDetails.XPI in bigquery

acmiyaguchi commented 4 years ago

This looks good to me.

'{
"type": "object",
"additionalProperties": {"type": "object"}
}' | cargo run -- -t bigquery --allow-maps-without-value --resolve drop

returns

[
  {
    "fields": [
      {
        "mode": "REQUIRED",
        "name": "key",
        "type": "STRING"
      }
    ],
    "mode": "REPEATED",
    "name": "root",
    "type": "RECORD"
  }
]