mozilla / jsonschema-transpiler

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

Updated command examples to represent current output #103

Closed kik-kik closed 2 years ago

kik-kik commented 2 years ago

Updated command examples to represent current output. I've run the example commands and I got a slightly different output for the jsonschema-transpiler examples. This proposed updating the README to reflect that.

Package version:

$ cargo install --list
jsonschema-transpiler v1.10.0:
    jsonschema-transpiler

Below is the output I get when running the examples:

echo $schema | jq
{
  "type": "object",
  "properties": {
    "foo": {
      "type": "boolean"
    }
  }
}
echo $schema | jsonschema-transpiler --type avro
{
  "fields": [
    {
      "default": null,
      "name": "foo",
      "type": [
        {
          "type": "null"
        },
        {
          "type": "boolean"
        }
      ]
    }
  ],
  "name": "root",
  "type": "record"
}
$ echo $schema | jsonschema-transpiler --type bigquery
[
  {
    "mode": "NULLABLE",
    "name": "foo",
    "type": "BOOL"
  }
]
kik-kik commented 2 years ago

hmm, I'm not sure what the problem with CI check is. I tried to re-run the check directly in circleci, but still seems to be stuck.

scholtzan commented 2 years ago

It looks like CI completed successfully, but that status doesn't show up here: https://app.circleci.com/pipelines/github/mozilla/jsonschema-transpiler/170/workflows/fae7a692-c982-4f84-8a91-1386752bbe10/jobs/154 You can try pushing the changes again and see if that helps

kik-kik commented 2 years ago

ok this was driving me crazy so I tried poking around a bit. Not sure what resolved this in the end, but I tried disabling a setting for syncing status with Github and re-enabled it.

image

Not sure if that is what resolved the issue or if it's something else. But seems the check passed now. Merging the PR.