{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-parser/issues/176","repository_url":"https://api.github.com/repos/swagger-api/swagger-parser","labels_url":"https://api.github.com/repos/swagger-api/swagger-parser/issues/176/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-parser/issues/176/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-parser/issues/176/events","html_url":"https://github.com/swagger-api/swagger-parser/issues/176","id":130634578,"number":176,"title":"It is impossible to parse local file under Windows with location defined as correct URL/URI.","user":{"login":"kendzi","id":811830,"avatar_url":"https://avatars.githubusercontent.com/u/811830?v=3","gravatar_id":"","url":"https://api.github.com/users/kendzi","html_url":"https://github.com/kendzi","followers_url":"https://api.github.com/users/kendzi/followers","following_url":"https://api.github.com/users/kendzi/following{/other_user}","gists_url":"https://api.github.com/users/kendzi/gists{/gist_id}","starred_url":"https://api.github.com/users/kendzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kendzi/subscriptions","organizations_url":"https://api.github.com/users/kendzi/orgs","repos_url":"https://api.github.com/users/kendzi/repos","events_url":"https://api.github.com/users/kendzi/events{/privacy}","received_events_url":"https://api.github.com/users/kendzi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-02-02T10:05:53Z","updated_at":"2016-12-27T07:03:54Z","closed_at":"2016-12-27T07:03:54Z","body":"Lets assume we have correct swagger json file under that windows location:\n`E:/tmp/swagger.json`\n\nLets try to load it using parser, but location defined as correct url/uri:\n\n```\nnew Swagger20Parser().read(location, null)\n```\n\nThe file location converted into:\n1) The correct url:\n\n```\nString location = \"file:/E:/tmp/swagger.json\";\n```\n\n2) The correct uri (with empty host name):\n\n```\nString location = \"file:///E:/tmp/swagger.json\";\n```\n\nUnfortunately both of location falls to loads.\n\n1) The error during load of URL\n\n```\nreading from file:/E:/tmp/swagger.json\njava.nio.file.InvalidPathException: Illegal char <:> at index 4: file:/E:/tmp/swagger.json\n    at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)\n    at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)\n    at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)\n    at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)\n    at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)\n    at java.nio.file.Paths.get(Paths.java:84)\n    at io.swagger.parser.Swagger20Parser.read(Swagger20Parser.java:80)\n    at io.swagger.parser.SwaggerParser.read(SwaggerParser.java:64)\n    at io.swagger.parser.SwaggerParser.read(SwaggerParser.java:52)\n    ...\n```\n\n2) The error during load of URL\n\n```\nreading from file:///E:/tmp/swagger.json\njava.nio.file.InvalidPathException: Illegal char <:> at index 2: /E:/tmp/swagger.json\n    at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)\n    at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)\n    at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)\n    at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)\n    at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)\n    at java.nio.file.Paths.get(Paths.java:84)\n    at io.swagger.parser.Swagger20Parser.read(Swagger20Parser.java:80)\n    at io.swagger.parser.SwaggerParser.read(SwaggerParser.java:64)\n    at io.swagger.parser.SwaggerParser.read(SwaggerParser.java:52)\n    ...\n```\n"},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-parser/issues/comments/269280349","html_url":"https://github.com/swagger-api/swagger-parser/issues/176#issuecomment-269280349","issue_url":"https://api.github.com/repos/swagger-api/swagger-parser/issues/176","id":269280349,"user":{"login":"fehguy","id":249413,"avatar_url":"https://avatars.githubusercontent.com/u/249413?v=3","gravatar_id":"","url":"https://api.github.com/users/fehguy","html_url":"https://github.com/fehguy","followers_url":"https://api.github.com/users/fehguy/followers","following_url":"https://api.github.com/users/fehguy/following{/other_user}","gists_url":"https://api.github.com/users/fehguy/gists{/gist_id}","starred_url":"https://api.github.com/users/fehguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fehguy/subscriptions","organizations_url":"https://api.github.com/users/fehguy/orgs","repos_url":"https://api.github.com/users/fehguy/repos","events_url":"https://api.github.com/users/fehguy/events{/privacy}","received_events_url":"https://api.github.com/users/fehguy/received_events","type":"User","site_admin":false},"created_at":"2016-12-27T07:03:54Z","updated_at":"2016-12-27T07:03:54Z","body":"Consider a PR."}}
{"actor":{"display_login":"fehguy"}}