civisanalytics / swagger-diff

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

Error regarding /# when diffing swagger #54

Closed gustavlasko closed 7 years ago

gustavlasko commented 7 years ago

Environment: swagger-diff 1.1.1 Windows 8

Comands: gem install swagger-diff swagger-diff -i staging-swagger.json dev-swagger.json (files have been renamed in order to upload)

Output: The property '#/' of type string did not match the following type: object in schema http://swagger.io/v2/schema.json# C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/swagger-diff-1.1.1/lib/swagger/diff/specification.rb:73:in parsed_to_hash': undefined methodeach' for nil:NilClass (NoMethodError) from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/swagger-diff-1.1.1/lib/swagger/diff/specification.rb:8:in initialize' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/swagger-diff-1.1.1/lib/swagger/diff/diff.rb:6:innew' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/swagger-diff-1.1.1/lib/swagger/diff/diff.rb:6:in initialize' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/swagger-diff-1.1.1/exe/swagger-diff:37:innew' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/swagger-diff-1.1.1/exe/swagger-diff:37:in <top (required)>' from C:/Ruby23-x64/bin/swagger-diff:22:inload' from C:/Ruby23-x64/bin/swagger-diff:22:in `

'

dev-swagger.json.txt staging-swagger.json.txt

jeffreyc commented 7 years ago

Thanks for your feedback! Unfortunately, testing with a clean Ruby 2.3.4 Docker image and the attached specifications, I'm not able to recreate the problem. Could there be an issue with your environment? I can try to test in Windows later, but I have no reason to expect OS-specific limitations.

Edit: I'm not able to recreate the issue with Ruby 2.3.3 (x64) from rubyinstaller.org on Windows 10, either.

gustavlasko commented 7 years ago

Thanks, I will try on a linux machine and let you know the outcome.

gustavlasko commented 7 years ago

I have confirmed, it is something with my environment. It runs fine on linux.