mozilla / jsonschema-transpiler

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

`<unknown>` property field is dropped from an object #95

Open acmiyaguchi opened 4 years ago

acmiyaguchi commented 4 years ago

See https://github.com/mozilla-services/mozilla-pipeline-schemas/pull/565#discussion_r445056282

echo '{"properties": {"payload": {"properties": {"<unknown>": {"type": "string"}, "foo": {"type": "string"}}}}}' | jsonschema-transpiler -t bigquery
[
  {
    "fields": [
      {
        "mode": "NULLABLE",
        "name": "foo",
        "type": "STRING"
      }
    ],
    "mode": "NULLABLE",
    "name": "payload",
    "type": "RECORD"
  }
]

This should map $.properties.payload.properties.<unknown> to a field like __unknown__

relud commented 2 years ago

will need to at least track down why this is occurring, even if it's a wontfix