glideapps/quicktype

Unhelpful error message when schema JSON is invalid

Open

#1,062 opened on Sep 11, 2018

View on GitHub
 (4 comments) (20 reactions) (0 assignees)TypeScript (968 forks)batch import
CLIbuggood first issue

Repository metrics

Stars
 (10,867 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$ref": "#/definitions/foo",
  "definitions": {
    "foo": {
      "type": "object",
      "properties": {
        "bar": {
          "$ref": "bar.json#"
        },
      },
      "required": [
        "bar"
      ],
    },
    "title": "foo"
  }
}

Running quicktype CLI with this Schema produces

Error: Internal error: Defined value expected, but got undefined.

Contributor guide