{"action":"closed","issue":{"url":"https://api.github.com/repos/domaindrivendev/Swashbuckle/issues/299","labels_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle/issues/299/labels{/name}","comments_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle/issues/299/comments","events_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle/issues/299/events","html_url":"https://github.com/domaindrivendev/Swashbuckle/issues/299","id":71281449,"number":299,"title":"Simplify EnableSwaggerUi template and redirect hander configuration","user":{"login":"Rast1234","id":1562341,"avatar_url":"https://avatars.githubusercontent.com/u/1562341?v=3","gravatar_id":"","url":"https://api.github.com/users/Rast1234","html_url":"https://github.com/Rast1234","followers_url":"https://api.github.com/users/Rast1234/followers","following_url":"https://api.github.com/users/Rast1234/following{/other_user}","gists_url":"https://api.github.com/users/Rast1234/gists{/gist_id}","starred_url":"https://api.github.com/users/Rast1234/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rast1234/subscriptions","organizations_url":"https://api.github.com/users/Rast1234/orgs","repos_url":"https://api.github.com/users/Rast1234/repos","events_url":"https://api.github.com/users/Rast1234/events{/privacy}","received_events_url":"https://api.github.com/users/Rast1234/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/domaindrivendev/Swashbuckle/milestones/5","html_url":"https://github.com/domaindrivendev/Swashbuckle/milestones/v6.0.0","labels_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle/milestones/5/labels","id":1100488,"number":5,"title":"v6.0.0","description":"Target next version of AspNet 6.0 (vNext)\r\n\r\nNOTE: This is currently being developed in the following working repo:\r\n\r\nhttps://github.com/domaindrivendev/ahoy","creator":{"login":"domaindrivendev","id":1434343,"avatar_url":"https://avatars.githubusercontent.com/u/1434343?v=3","gravatar_id":"","url":"https://api.github.com/users/domaindrivendev","html_url":"https://github.com/domaindrivendev","followers_url":"https://api.github.com/users/domaindrivendev/followers","following_url":"https://api.github.com/users/domaindrivendev/following{/other_user}","gists_url":"https://api.github.com/users/domaindrivendev/gists{/gist_id}","starred_url":"https://api.github.com/users/domaindrivendev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domaindrivendev/subscriptions","organizations_url":"https://api.github.com/users/domaindrivendev/orgs","repos_url":"https://api.github.com/users/domaindrivendev/repos","events_url":"https://api.github.com/users/domaindrivendev/events{/privacy}","received_events_url":"https://api.github.com/users/domaindrivendev/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":1,"state":"open","created_at":"2015-05-07T16:23:43Z","updated_at":"2016-01-14T21:09:12Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-04-27T13:18:37Z","updated_at":"2016-01-14T21:09:12Z","closed_at":"2016-01-14T21:09:12Z","body":"For now, if i want to have custom UI route, i have to do this:\r\n\r\n\t\t\tvar uiRouteTemplate = string.Format(\"{0}/{{*assetPath}}\", uiPrefix);  // i have to append {{*assetPath}} by hand\r\n\t\t\tswaggerEnabledConfig.EnableSwaggerUi(uiRouteTemplate);\r\n\r\n\t\t\tvar redirectTo = string.Format(\"{0}/index\", uiPrefix);  // and if i'd like to have a shortcut to \"uiPrefix/index\", i have to open Swashbuckle sources and copypaste this:\r\n\t\t\tconfig.Routes.MapHttpRoute(\"custom_swagger_ui_shortcut\", uiPrefix, null, null, new RedirectHandler(SwaggerDocsConfig.DefaultRootUrlResolver, redirectTo));\r\n\r\nWhy not do something like this?\r\n\r\n\t\t\tswaggerEnabledConfig.EnableSwaggerUi(uiPrefix);  // <-- will automatically append {{*assetPath}} in this method and register redirect route to \"uiPrefix/index\"\r\n\r\nIf you are interested, i can make it and do a pull request."}}