glideapps/quicktype

Unhelpful error message when schema JSON is invalid

Chiusa

#1062 aperta il 11 set 2018

 (4 commenti) (20 reazioni) (0 assegnatari)TypeScript (968 fork)batch import
CLIbuggood first issue

Metriche repository

Star
 (10.867 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

{
  "$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.

Guida contributor