twskj / pretty-swag

Pretty UI for Swagger spec
MIT License
122 stars 20 forks source link

SyntaxError: Unexpected token s in JSON at position 0 #56

Closed rfbryan closed 6 years ago

rfbryan commented 6 years ago

It appears that, starting with 0.1.150 the input file is always being treated as JSON. My input file is yaml, and when passed into pretty-swag I get this:

Format: singleFile MarkDown: Disable Nav Bar: Fixed Auto tags: Enable Initial Collapse [Path: false, Method: false, Tool :true] Theme: blue No Credit Error: SyntaxError: Unexpected token s in JSON at position 0 [ERROR] Command execution failed.

(note, that my yaml input file starts with 's')

twskj commented 6 years ago

Thanks for reporting. I'll look into this shortly.

twskj commented 6 years ago

I roll out a patch on 0.1.154. Test it out and let me know 👍

rfbryan commented 6 years ago

Yep! Works like a charm. Thanks!