{"action":"opened","issue":{"url":"https://api.github.com/repos/domaindrivendev/Ahoy/issues/242","repository_url":"https://api.github.com/repos/domaindrivendev/Ahoy","labels_url":"https://api.github.com/repos/domaindrivendev/Ahoy/issues/242/labels{/name}","comments_url":"https://api.github.com/repos/domaindrivendev/Ahoy/issues/242/comments","events_url":"https://api.github.com/repos/domaindrivendev/Ahoy/issues/242/events","html_url":"https://github.com/domaindrivendev/Ahoy/issues/242","id":193607667,"number":242,"title":"swagger.json not generated with respect to base route","user":{"login":"sparksterz","id":1699679,"avatar_url":"https://avatars.githubusercontent.com/u/1699679?v=3","gravatar_id":"","url":"https://api.github.com/users/sparksterz","html_url":"https://github.com/sparksterz","followers_url":"https://api.github.com/users/sparksterz/followers","following_url":"https://api.github.com/users/sparksterz/following{/other_user}","gists_url":"https://api.github.com/users/sparksterz/gists{/gist_id}","starred_url":"https://api.github.com/users/sparksterz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sparksterz/subscriptions","organizations_url":"https://api.github.com/users/sparksterz/orgs","repos_url":"https://api.github.com/users/sparksterz/repos","events_url":"https://api.github.com/users/sparksterz/events{/privacy}","received_events_url":"https://api.github.com/users/sparksterz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-05T20:55:42Z","updated_at":"2016-12-05T20:55:42Z","closed_at":null,"body":"I'm trying to deploy a small API in a scenario where we access resources via a reverse proxy with essentially a virtual path reference to the deployed service and I'm having issues. \r\n\r\nI'm currently using 6.0.0-preview-0035 on a .Net Core 1.1 MVC project with the following configuration:\r\n```\r\napp.UseSwaggerUi(c =>\r\n{\r\n         c.BaseRoute = env.ApplicationName + \"/help\";\r\n});\r\n```\r\nThis allows for the swagger index to point to `/ApplicationName/help/index.html` and that loads the page and content fine with the exception of it missing a swagger.json file, but that's expected I didn't give it a location.\r\n\r\nI then try to add the following inside my lambda block:\r\n```\r\nc.SwaggerEndpoint(\"/\" + c.BaseRoute + \"/swagger/v1/swagger.json\", \"V1 Docs\");\r\n```\r\nThis generates an error message stating:\r\n> Can't read swagger JSON from http://localhost:50212/ApplicationName/help/swagger/v1/swagger.json\r\n\r\nWhich confuses me a bit as all the other swagger resources for css, js, pngs all load using `~/ApplicationName/help` as the base URI. I then try to do some digging and found if I try to hit `~/swagger/v1/swagger.json` I get a 500 error with the following trace:\r\n```\r\nSwashbuckle.Swagger.Model.UnknownSwaggerDocument: Unknown Swagger document - v1\r\n   at Swashbuckle.SwaggerGen.Generator.SwaggerGenerator.GetSwagger(String documentName, String host, String basePath, String[] schemes)\r\n   at Swashbuckle.Swagger.Application.SwaggerMiddleware.<Invoke>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.<Invoke>d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Frame`1.<RequestProcessingAsync>d__2.MoveNext()\r\ninfo: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]\r\n      Request finished in 13.6516ms 500\r\n```\r\nAny other request I formed in order to try and access swagger.json returned me a 404 with the exception of that request `http://localhost:50212/swagger/v1/swagger.json` which leads me to believe it's failing to be generated properly.\r\n\r\nI noticed this pull request which might be aimed at this specific problem dating from quite a while back: https://github.com/domaindrivendev/Ahoy/pull/106 Though I'm not positive if I'm having the same issue. Is there something I should try? Or a specific workflow I should do instead in this case?"}}
{"actor":{"display_login":"sparksterz"}}