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

SyntaxError: Unexpected character #38

Open
levenecav opened this issue Apr 15, 2019 · 1 comment
Open

SyntaxError: Unexpected character #38

levenecav opened this issue Apr 15, 2019 · 1 comment

Comments

@levenecav
Copy link

levenecav commented Apr 15, 2019

Hello!
Gives an error when generated:
No parser and no filepath given, using 'babel' the parser now but this will throw an error in the future. Please specify a parser or a filepath so one can be inferred. SyntaxError: Unexpected character '«'

There is such a code in JSON:
"GetPricing«Restrictions»": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "values": { "$ref": "#/definitions/Restrictions" } }, "title": "GetPricing«Restrictions»" },

If I remove it, I get this error:
No parser and no filepath given, using 'babel' the parser now but this will throw an error in the future. Please specify a parser or a filepath so one can be inferred. SyntaxError: Unexpected token, expected "," (2:3592)
But on the second line is this:
"swagger": "2.0",

What is the reason?

@levenecav levenecav changed the title SyntaxError: Unexpected character '«' SyntaxError: Unexpected character Apr 15, 2019
@yayoc
Copy link
Owner

yayoc commented Apr 21, 2019

I guess that prettier warns the message.
https://github.com/prettier/prettier/blob/91c20f7fbe22f68480820fcf322e7e099b22d82e/src/main/options.js#L41

What's parser are you using for prettier?
Also, It would be great if you can share the swagger to reproduce it.

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

No branches or pull requests

2 participants