civisanalytics / swagger-diff

Utility for comparing two Swagger specifications.
BSD 3-Clause "New" or "Revised" License
264 stars 32 forks source link

Swagger-Diff fails on parsing #38

Closed AntonBakaev closed 7 years ago

AntonBakaev commented 7 years ago

Hello, I'm getting a failure when comparing two files: C:/Ruby23/lib/ruby/2.3.0/json/common.rb:156:in `parse': 784: unexpected token at '{ (JSON::ParserError)

Error description is poor, so i can't understand where to find an error. I'm attaching two .json files and error message. files.zip

jeffreyc commented 7 years ago

Thank you for your feedback! It looks like there's a syntax error in your JSON, which is causing Swagger::Diff to fail. Using a tool like http://jsonlint.com/, you can see that both files have an unnecessary trailing comma when you close the DebitInfo hash. If you remove that (from both files), Swagger::Diff should work correctly.

I'm going to close this issue, but please comment on this issue or file another issue as appropriate if you encounter any other problems with Swagger::Diff.

AntonBakaev commented 7 years ago

Thank you very much for help, I was inattentive :) Now I have another problem so I'll create new issue.