{"action":"created","issue":{"url":"https://api.github.com/repos/civisanalytics/swagger-diff/issues/21","labels_url":"https://api.github.com/repos/civisanalytics/swagger-diff/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/civisanalytics/swagger-diff/issues/21/comments","events_url":"https://api.github.com/repos/civisanalytics/swagger-diff/issues/21/events","html_url":"https://github.com/civisanalytics/swagger-diff/issues/21","id":125647482,"number":21,"title":"response_attributes_inner': undefined method `each' for nil:NilClass (NoMethodError)","user":{"login":"123dev","id":13109154,"avatar_url":"https://avatars.githubusercontent.com/u/13109154?v=3","gravatar_id":"","url":"https://api.github.com/users/123dev","html_url":"https://github.com/123dev","followers_url":"https://api.github.com/users/123dev/followers","following_url":"https://api.github.com/users/123dev/following{/other_user}","gists_url":"https://api.github.com/users/123dev/gists{/gist_id}","starred_url":"https://api.github.com/users/123dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/123dev/subscriptions","organizations_url":"https://api.github.com/users/123dev/orgs","repos_url":"https://api.github.com/users/123dev/repos","events_url":"https://api.github.com/users/123dev/events{/privacy}","received_events_url":"https://api.github.com/users/123dev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-08T16:48:19Z","updated_at":"2016-01-08T22:41:44Z","closed_at":null,"body":"Great tool, thanks for sharing.\r\nWe find that it works in some cases, but not in all cases.\r\n\r\nswagger-diff 176.json 179.json\r\n\r\n```\r\nC:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/lib/swagger/diff/specification.rb:206:in `response_attributes_inner': undefined method `each' for nil:NilClass (NoMethodError)\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/lib/swagger/diff/specification.rb:28:in `block in response_attributes'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/lib/swagger/diff/specification.rb:27:in `each'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/lib/swagger/diff/specification.rb:27:in `response_attributes'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/lib/swagger/diff/diff.rb:118:in `block (2 levels) in incompatible_response_attributes_enumerator'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/lib/swagger/diff/diff.rb:117:in `each'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/lib/swagger/diff/diff.rb:117:in `block in incompatible_response_attributes_enumerator'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/lib/swagger/diff/diff.rb:142:in `each'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/lib/swagger/diff/diff.rb:142:in `each'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/lib/swagger/diff/diff.rb:142:in `each'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/lib/swagger/diff/diff.rb:142:in `none?'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/lib/swagger/diff/diff.rb:142:in `responses_compatible?'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/lib/swagger/diff/diff.rb:10:in `compatible?'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/exe/swagger-diff:8:in `<top (required)>'\r\n        from C:/U/Ruby/bin/swagger-diff:23:in `load'\r\n        from C:/U/Ruby/bin/swagger-diff:23:in `<main>'\r\n```\r\n\r\nHere's another one with a different error.\r\nswagger-diff 122.json 1.1_5.4-37-176.json\r\n\r\n```\r\nC:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-core-0.2.3/lib/swagger/api.rb:11:in `build_api': Swagger version  is not currently supported (ArgumentError)\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-core-0.2.3/lib/swagger.rb:24:in `build'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/lib/swagger/diff/specification.rb:65:in `rescue in parse_swagger'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/lib/swagger/diff/specification.rb:57:in `parse_swagger'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/lib/swagger/diff/specification.rb:6:in `initialize'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/lib/swagger/diff/diff.rb:5:in `new'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/lib/swagger/diff/diff.rb:5:in `initialize'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/exe/swagger-diff:6:in `new'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/exe/swagger-diff:6:in `<top (required)>'\r\n        from C:/U/Ruby/bin/swagger-diff:23:in `load'\r\n        from C:/U/Ruby/bin/swagger-diff:23:in `<main>'\r\n\r\nD:\\Dev\\Schemas>swagger-diff 1.0_5.5-1-122.json 1.0_5.4-37-176.json\r\nC:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-core-0.2.3/lib/swagger/api.rb:11:in `build_api': Swagger version  is not currently supported (ArgumentError)\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-core-0.2.3/lib/swagger.rb:24:in `build'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/lib/swagger/diff/specification.rb:65:in `rescue in parse_swagger'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/lib/swagger/diff/specification.rb:57:in `parse_swagger'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/lib/swagger/diff/specification.rb:6:in `initialize'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/lib/swagger/diff/diff.rb:5:in `new'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/lib/swagger/diff/diff.rb:5:in `initialize'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/exe/swagger-diff:6:in `new'\r\n        from C:/U/Ruby/lib/ruby/gems/2.2.0/gems/swagger-diff-1.0.5/exe/swagger-diff:6:in `<top (required)>'\r\n        from C:/U/Ruby/bin/swagger-diff:23:in `load'\r\n        from C:/U/Ruby/bin/swagger-diff:23:in `<main>'\r\n```\r\n\r\nThanks\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/civisanalytics/swagger-diff/issues/comments/170147838","html_url":"https://github.com/civisanalytics/swagger-diff/issues/21#issuecomment-170147838","issue_url":"https://api.github.com/repos/civisanalytics/swagger-diff/issues/21","id":170147838,"user":{"login":"jeffreyc","id":526530,"avatar_url":"https://avatars.githubusercontent.com/u/526530?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffreyc","html_url":"https://github.com/jeffreyc","followers_url":"https://api.github.com/users/jeffreyc/followers","following_url":"https://api.github.com/users/jeffreyc/following{/other_user}","gists_url":"https://api.github.com/users/jeffreyc/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffreyc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffreyc/subscriptions","organizations_url":"https://api.github.com/users/jeffreyc/orgs","repos_url":"https://api.github.com/users/jeffreyc/repos","events_url":"https://api.github.com/users/jeffreyc/events{/privacy}","received_events_url":"https://api.github.com/users/jeffreyc/received_events","type":"User","site_admin":false},"created_at":"2016-01-08T22:41:44Z","updated_at":"2016-01-08T22:41:44Z","body":"Thank you for your feedback, and we're glad you're finding the tool useful!\r\n\r\nFor the first error, there could be a variety of causes, including an invalid Swagger specification and a corner case that we don't handle correctly.\r\n\r\nThe second error is usually raised when a Swagger specification is missing the required `swagger` element.\r\n\r\nHave you validated your Swagger? You can validate your Swagger using the [Swagger Validator Badge tool](https://github.com/swagger-api/validator-badge).\r\n\r\nIf your Swagger is valid, we would need a minimal example to diagnose the problem. You can diff a file against itself (`swagger-diff 1.json 1.json`), and it should still raise an exception if there's a problem parsing the file. If you can paste a minimal specification that's both valid and recreates the error into a comment on this issue, I'd be happy to look into it. You're welcome to include your full specification, too, but I know those can be sensitive, and we definitely don't need it, just to be able to recreate the error.\r\n"}}