{"action":"closed","issue":{"url":"https://api.github.com/repos/apigee-127/swagger-tools/issues/215","labels_url":"https://api.github.com/repos/apigee-127/swagger-tools/issues/215/labels{/name}","comments_url":"https://api.github.com/repos/apigee-127/swagger-tools/issues/215/comments","events_url":"https://api.github.com/repos/apigee-127/swagger-tools/issues/215/events","html_url":"https://github.com/apigee-127/swagger-tools/issues/215","id":76024028,"number":215,"title":"YAML parsing issue","user":{"login":"earth2marsh","id":54582,"avatar_url":"https://avatars.githubusercontent.com/u/54582?v=3","gravatar_id":"","url":"https://api.github.com/users/earth2marsh","html_url":"https://github.com/earth2marsh","followers_url":"https://api.github.com/users/earth2marsh/followers","following_url":"https://api.github.com/users/earth2marsh/following{/other_user}","gists_url":"https://api.github.com/users/earth2marsh/gists{/gist_id}","starred_url":"https://api.github.com/users/earth2marsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/earth2marsh/subscriptions","organizations_url":"https://api.github.com/users/earth2marsh/orgs","repos_url":"https://api.github.com/users/earth2marsh/repos","events_url":"https://api.github.com/users/earth2marsh/events{/privacy}","received_events_url":"https://api.github.com/users/earth2marsh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-13T15:24:46Z","updated_at":"2015-05-13T16:29:38Z","closed_at":"2015-05-13T16:29:38Z","body":"When trying to validate the [standard petstore YAML](http://petstore.swagger.io/v2/swagger.yaml), the following error is thrown:\r\n```\r\n> swagger-tools validate geocoder.swagger.json\r\n\r\n/usr/local/lib/node_modules/swagger-tools/bin/swagger-tools:201\r\n        throw err;\r\n              ^\r\nSyntaxError: Unexpected token\r\n    at Object.parse (native)\r\n    at parseContent (/usr/local/lib/node_modules/swagger-tools/bin/swagger-tools:63:25)\r\n    at getDocument (/usr/local/lib/node_modules/swagger-tools/bin/swagger-tools:81:5)\r\n    at /usr/local/lib/node_modules/swagger-tools/node_modules/async/lib/async.js:249:17\r\n    at /usr/local/lib/node_modules/swagger-tools/node_modules/async/lib/async.js:125:13\r\n    at Array.forEach (native)\r\n    at _each (/usr/local/lib/node_modules/swagger-tools/node_modules/async/lib/async.js:46:24)\r\n    at async.each (/usr/local/lib/node_modules/swagger-tools/node_modules/async/lib/async.js:124:9)\r\n    at _asyncMap (/usr/local/lib/node_modules/swagger-tools/node_modules/async/lib/async.js:248:13)\r\n    at Object.map (/usr/local/lib/node_modules/swagger-tools/node_modules/async/lib/async.js:219:23)\r\n```\r\nAt first, I thought this was a problem with the reference app, but as @webron [observes](https://github.com/swagger-api/swagger-core/issues/1052#issuecomment-101411005), it appears to be valid YAML, so this looks like it might be an issue with swagger-tools's YAML parser dependency.\r\n\r\nAssuming the petstore reference spec is in fact valid, swagger-tools should validate it appropriately."}}