{"action":"created","issue":{"url":"https://api.github.com/repos/glennjones/hapi-swagger/issues/120","labels_url":"https://api.github.com/repos/glennjones/hapi-swagger/issues/120/labels{/name}","comments_url":"https://api.github.com/repos/glennjones/hapi-swagger/issues/120/comments","events_url":"https://api.github.com/repos/glennjones/hapi-swagger/issues/120/events","html_url":"https://github.com/glennjones/hapi-swagger/issues/120","id":64379141,"number":120,"title":"Hapi-Swagger breaks with query parameters on root endpoint","user":{"login":"Couto","id":165314,"avatar_url":"https://avatars.githubusercontent.com/u/165314?v=3","gravatar_id":"","url":"https://api.github.com/users/Couto","html_url":"https://github.com/Couto","followers_url":"https://api.github.com/users/Couto/followers","following_url":"https://api.github.com/users/Couto/following{/other_user}","gists_url":"https://api.github.com/users/Couto/gists{/gist_id}","starred_url":"https://api.github.com/users/Couto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Couto/subscriptions","organizations_url":"https://api.github.com/users/Couto/orgs","repos_url":"https://api.github.com/users/Couto/repos","events_url":"https://api.github.com/users/Couto/events{/privacy}","received_events_url":"https://api.github.com/users/Couto/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-25T21:38:58Z","updated_at":"2015-03-27T10:47:28Z","closed_at":"2015-03-27T10:14:43Z","body":"So I have a route like: `https://theapi.dev:9001/?q=search+term`\r\n\r\nThis alone seems to break the swagger interface with the following error: \r\n`Unable to read api '' from path https://theapi.dev:9001/docs?path= (server returned undefined)`\r\n\r\nIt also returns the following JSON:\r\n\r\n```json\r\n{\r\n  \"apiVersion\": \"0.5.0\",\r\n  \"swaggerVersion\": \"1.2\",\r\n  \"basePath\": \"https://theapi.dev:9001/docs?path=\",\r\n  \"apis\":[\r\n    {\"path\":\"\"},\r\n    {\"path\":\"users\"}\r\n  ]\r\n}\r\n```\r\n\r\nI have no problems hitting the endpoint on the hapi side."},"comment":{"url":"https://api.github.com/repos/glennjones/hapi-swagger/issues/comments/86899318","html_url":"https://github.com/glennjones/hapi-swagger/issues/120#issuecomment-86899318","issue_url":"https://api.github.com/repos/glennjones/hapi-swagger/issues/120","id":86899318,"user":{"login":"glennjones","id":175288,"avatar_url":"https://avatars.githubusercontent.com/u/175288?v=3","gravatar_id":"","url":"https://api.github.com/users/glennjones","html_url":"https://github.com/glennjones","followers_url":"https://api.github.com/users/glennjones/followers","following_url":"https://api.github.com/users/glennjones/following{/other_user}","gists_url":"https://api.github.com/users/glennjones/gists{/gist_id}","starred_url":"https://api.github.com/users/glennjones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennjones/subscriptions","organizations_url":"https://api.github.com/users/glennjones/orgs","repos_url":"https://api.github.com/users/glennjones/repos","events_url":"https://api.github.com/users/glennjones/events{/privacy}","received_events_url":"https://api.github.com/users/glennjones/received_events","type":"User","site_admin":false},"created_at":"2015-03-27T10:47:28Z","updated_at":"2015-03-27T10:47:28Z","body":"If it was me, creating a global search and not one just against a single entity then:\r\n\r\n    https://theapi.dev:9001/search?q=search+term\r\n    https://theapi.dev:9001/all?q=search+term\r\n\r\nBoth URL structure do not follow REST design concept completely, but they are not uncommon.  This would mean that Swagger would work and you could extend your API later if needed.\r\n\r\nI tend to try use human readable querystrings, but understand q is a bit of a convention. Maybe:\r\n\r\n    https://theapi.dev:9001/search?text=search+term\r\n\r\nThe root URL could be used for the documentation. You can do that by changing the `documentationPath` property, or if your feeling like customising the page take a look at the custom documentation page setup in https://github.com/glennjones/be-more-hapi project \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"}}