{"action":"closed","issue":{"url":"https://api.github.com/repos/falood/maru_swagger/issues/5","labels_url":"https://api.github.com/repos/falood/maru_swagger/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/falood/maru_swagger/issues/5/comments","events_url":"https://api.github.com/repos/falood/maru_swagger/issues/5/events","html_url":"https://github.com/falood/maru_swagger/issues/5","id":122263656,"number":5,"title":"\"key nil not found\" when requesting from endpoint","user":{"login":"johnhamelink","id":101739,"avatar_url":"https://avatars.githubusercontent.com/u/101739?v=3","gravatar_id":"","url":"https://api.github.com/users/johnhamelink","html_url":"https://github.com/johnhamelink","followers_url":"https://api.github.com/users/johnhamelink/followers","following_url":"https://api.github.com/users/johnhamelink/following{/other_user}","gists_url":"https://api.github.com/users/johnhamelink/gists{/gist_id}","starred_url":"https://api.github.com/users/johnhamelink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnhamelink/subscriptions","organizations_url":"https://api.github.com/users/johnhamelink/orgs","repos_url":"https://api.github.com/users/johnhamelink/repos","events_url":"https://api.github.com/users/johnhamelink/events{/privacy}","received_events_url":"https://api.github.com/users/johnhamelink/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-15T12:38:28Z","updated_at":"2015-12-15T12:42:32Z","closed_at":"2015-12-15T12:42:32Z","body":"Hey there, thanks for making this.\r\n\r\nI'm trying to hook up maru_swagger with maru running inside a phoenix application. When I attempt to go to the Swagger endpoint, I get the following error:\r\n\r\n```\r\n[error] #PID<0.375.0> running TestMaruProject.Endpoint terminated\r\nServer: localhost:4000 (http)\r\nRequest: GET /api/swagger\r\n** (exit) an exception was raised:\r\n    ** (KeyError) key nil not found in: %{\"v2\" => [%Maru.Router.Endpoint{block: {:|>, [line: 6], [{:conn, [line: 6], nil}, {:json, [line: 7], [{:%{}, [line: 7], [hello: :world]}]}]}, desc: \"Testing\", helpers: [], method: \"GET\", param_context: [], path: [\"testing\"], version: \"v2\"}]}\r\n        (elixir) lib/map.ex:150: Map.fetch!/2\r\n        lib/maru_swagger.ex:27: MaruSwagger.generate/1\r\n        lib/maru_swagger.ex:15: MaruSwagger.call/2\r\n        (test_maru_project) web/api/api.ex:1: TestMaruProject.API.call/2\r\n        (phoenix) lib/phoenix/router/route.ex:157: Phoenix.Router.Route.forward/4\r\n        (test_maru_project) lib/phoenix/router.ex:255: TestMaruProject.Router.dispatch/2\r\n        (test_maru_project) web/router.ex:1: TestMaruProject.Router.do_call/2\r\n        (test_maru_project) lib/test_maru_project/endpoint.ex:1: TestMaruProject.Endpoint.phoenix_pipeline/1\r\n        (test_maru_project) lib/plug/debugger.ex:92: TestMaruProject.Endpoint.\"call (overridable 3)\"/2\r\n        (test_maru_project) lib/phoenix/endpoint/render_errors.ex:34: TestMaruProject.Endpoint.call/2\r\n        (plug) lib/plug/adapters/cowboy/handler.ex:15: Plug.Adapters.Cowboy.Handler.upgrade/4\r\n        (cowboy) src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4\r\n```\r\n\r\nIt seems that the error is coming from the result of `Maru.Router.Path.lstrip(path_info, path)` on Line 12 of `maru_swagger.ex` is returning `{:ok, []}`. When List.first is ran on [], it returns nil."}}