{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/979","labels_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/979/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/979/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/979/events","html_url":"https://github.com/swagger-api/swagger-ui/issues/979","id":59447042,"number":979,"title":"Incorrect api path","user":{"login":"tapan-d-thakkar","id":4955666,"avatar_url":"https://avatars.githubusercontent.com/u/4955666?v=3","gravatar_id":"","url":"https://api.github.com/users/tapan-d-thakkar","html_url":"https://github.com/tapan-d-thakkar","followers_url":"https://api.github.com/users/tapan-d-thakkar/followers","following_url":"https://api.github.com/users/tapan-d-thakkar/following{/other_user}","gists_url":"https://api.github.com/users/tapan-d-thakkar/gists{/gist_id}","starred_url":"https://api.github.com/users/tapan-d-thakkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tapan-d-thakkar/subscriptions","organizations_url":"https://api.github.com/users/tapan-d-thakkar/orgs","repos_url":"https://api.github.com/users/tapan-d-thakkar/repos","events_url":"https://api.github.com/users/tapan-d-thakkar/events{/privacy}","received_events_url":"https://api.github.com/users/tapan-d-thakkar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-02T07:22:34Z","updated_at":"2015-03-02T17:37:22Z","closed_at":null,"body":"Hi, I have downloaded swagger from https://github.com/swagger-api/swagger-ui. I am able to see swagger API page successfully. But when I try to execute any API, its generating incorrect URI.\r\n\r\nfor eg: my app is running on http://localhost:8080/app, swagger api docs url is http://localhost:8080/app/api-docs.\r\n\r\nI have one API to fetch client details as http://localhost:8080/app/client/{id}, but when i execute that API using swagger it generates url as http://localhost:8080/app/app/client/{id}.\r\n\r\nI am not sure why its adding /app twice, i tried to debug code, in this method of swagger-client.js\r\nSwaggerOperation.prototype.urlify = function(args), value of this.resource.basePath is coming like http://localhost:8080/app/app/ and it appends client/{id} to it which is wrong.\r\n\r\nLet me know if i have to make any changes for this.\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/comments/76758951","html_url":"https://github.com/swagger-api/swagger-ui/issues/979#issuecomment-76758951","issue_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/979","id":76758951,"user":{"login":"tapan-d-thakkar","id":4955666,"avatar_url":"https://avatars.githubusercontent.com/u/4955666?v=3","gravatar_id":"","url":"https://api.github.com/users/tapan-d-thakkar","html_url":"https://github.com/tapan-d-thakkar","followers_url":"https://api.github.com/users/tapan-d-thakkar/followers","following_url":"https://api.github.com/users/tapan-d-thakkar/following{/other_user}","gists_url":"https://api.github.com/users/tapan-d-thakkar/gists{/gist_id}","starred_url":"https://api.github.com/users/tapan-d-thakkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tapan-d-thakkar/subscriptions","organizations_url":"https://api.github.com/users/tapan-d-thakkar/orgs","repos_url":"https://api.github.com/users/tapan-d-thakkar/repos","events_url":"https://api.github.com/users/tapan-d-thakkar/events{/privacy}","received_events_url":"https://api.github.com/users/tapan-d-thakkar/received_events","type":"User","site_admin":false},"created_at":"2015-03-02T17:37:22Z","updated_at":"2015-03-02T17:37:22Z","body":"@Ron, this is resource url http://localhost:8080/app/api-docs/client, below is the json response ...\r\n```json\r\n{\r\n    \"apiVersion\": \"1.4.0-SNAPSHOT\",\r\n    \"swaggerVersion\": \"1.2\",\r\n    \"basePath\": \"app\",\r\n    \"resourcePath\": \"/client\",\r\n    \"produces\": [\r\n        \"application/json\"\r\n    ],\r\n    \"consumes\": [\r\n        \"application/json\"\r\n    ],\r\n    \"apis\": [\r\n        {\r\n            \"path\": \"/client/{id}\",\r\n            \"operations\": [\r\n                {\r\n                    \"method\": \"GET\",\r\n                    \"summary\": \"Get client by Id.\",\r\n                    \"notes\": \"\",\r\n                    \"type\": \"clientProxy\",\r\n                    \"nickname\": \"findById\",\r\n                    \"parameters\": [\r\n                        {\r\n                            \"name\": \"Username\",\r\n                            \"description\": \"Username of the acting user\",\r\n                            \"required\": true,\r\n                            \"type\": \"string\",\r\n                            \"paramType\": \"header\",\r\n                            \"allowMultiple\": false\r\n                        },\r\n                        {\r\n                            \"name\": \"id\",\r\n                            \"description\": \"Id of the requested client\",\r\n                            \"required\": true,\r\n                            \"type\": \"integer\",\r\n                            \"format\": \"int64\",\r\n                            \"paramType\": \"path\",\r\n                            \"allowMultiple\": false\r\n                        },\r\n                        {\r\n                            \"name\": \"verbose\",\r\n                            \"description\": \"Whether or not to return sub-objects; defaults to false\",\r\n                            \"required\": false,\r\n                            \"type\": \"boolean\",\r\n                            \"paramType\": \"query\",\r\n                            \"allowMultiple\": false\r\n                        }\r\n                    ],\r\n                    \"responseMessages\": [\r\n                        {\r\n                            \"code\": 200,\r\n                            \"message\": \"Success\"\r\n                        },\r\n                        {\r\n                            \"code\": 400,\r\n                            \"message\": \"Invalid Parameter supplied\"\r\n                        },\r\n                        {\r\n                            \"code\": 404,\r\n                            \"message\": \"Site with specified id not found.\"\r\n                        },\r\n                        {\r\n                            \"code\": 500,\r\n                            \"message\": \"Internal Server Error\"\r\n                        }\r\n                    ]\r\n                }\r\n            ]\r\n        }\r\n    ]\r\n}\r\n```"}}