Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhelpful error message when schema JSON is invalid #1062

Open
schani opened this issue Sep 11, 2018 · 2 comments
Open

Unhelpful error message when schema JSON is invalid #1062

schani opened this issue Sep 11, 2018 · 2 comments

Comments

@schani
Copy link
Member

@schani schani commented Sep 11, 2018

{
  "$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.
@Armaxxx
Copy link

@Armaxxx Armaxxx commented Dec 15, 2020

Let me see how I can help.

@ps173
Copy link

@ps173 ps173 commented Oct 2, 2021

I tried running the above schema with quick type. On my machine it gives a helpful message. To be exact it outputs :

$ quicktype test.json
Error: Syntax error in input JSON test: Parser cannot parse input: unexpected token '}'.

I think that is pretty valid output. Though providing the line number and column will be pretty good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants