{"action":"created","issue":{"url":"https://api.github.com/repos/domaindrivendev/Swashbuckle.AspNetCore/issues/870","repository_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle.AspNetCore","labels_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle.AspNetCore/issues/870/labels{/name}","comments_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle.AspNetCore/issues/870/comments","events_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle.AspNetCore/issues/870/events","html_url":"https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/870","id":355233672,"node_id":"MDU6SXNzdWUzNTUyMzM2NzI=","number":870,"title":"How to replace the Api path in the swagger.json file with the API gateway?","user":{"login":"zengqinglei","id":7374317,"node_id":"MDQ6VXNlcjczNzQzMTc=","avatar_url":"https://avatars0.githubusercontent.com/u/7374317?v=4","gravatar_id":"","url":"https://api.github.com/users/zengqinglei","html_url":"https://github.com/zengqinglei","followers_url":"https://api.github.com/users/zengqinglei/followers","following_url":"https://api.github.com/users/zengqinglei/following{/other_user}","gists_url":"https://api.github.com/users/zengqinglei/gists{/gist_id}","starred_url":"https://api.github.com/users/zengqinglei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zengqinglei/subscriptions","organizations_url":"https://api.github.com/users/zengqinglei/orgs","repos_url":"https://api.github.com/users/zengqinglei/repos","events_url":"https://api.github.com/users/zengqinglei/events{/privacy}","received_events_url":"https://api.github.com/users/zengqinglei/received_events","type":"User","site_admin":false},"labels":[{"id":290912540,"node_id":"MDU6TGFiZWwyOTA5MTI1NDA=","url":"https://api.github.com/repos/domaindrivendev/Swashbuckle.AspNetCore/labels/waiting%20for%20response","name":"waiting for response","color":"f7c6c7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-08-29T16:13:28Z","updated_at":"2018-09-10T01:09:08Z","closed_at":null,"author_association":"NONE","body":"# Instructions\r\n## I created two services: UserService, ProductService\r\n* The routing template of the UserService is: api/users/{id}\r\n* The routing template of the ProductService is: api/products/{id}\r\n### Then I created an Ocelot gateway service: ApiGateway\r\n**It is such a proxy for these two services:**\r\n* /userService/swagger/{url}          -->   /swagger/{url}\r\n* /userService/{url}                         -->    /api/{url}\r\n* /productService/swagger/{url}    -->   /swagger/{url}\r\n* /productService/{url}                   -->    /api/{url}\r\n\r\n**An example is shown below:**\r\n![image](https://user-images.githubusercontent.com/7374317/44800606-67ae3580-abe9-11e8-8784-67c4bffeafd0.png)\r\n\r\n**The ui display is normal, but the obtained swagger.json file because of the road strength is: /api/users/{id}, which makes it impossible to use the test function provided by ui. How can I replace the api road force in swagger.json with What about gateway routing?**\r\n\r\n**_Thank you!_**"},"comment":{"url":"https://api.github.com/repos/domaindrivendev/Swashbuckle.AspNetCore/issues/comments/419760046","html_url":"https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/870#issuecomment-419760046","issue_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle.AspNetCore/issues/870","id":419760046,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTc2MDA0Ng==","user":{"login":"zengqinglei","id":7374317,"node_id":"MDQ6VXNlcjczNzQzMTc=","avatar_url":"https://avatars0.githubusercontent.com/u/7374317?v=4","gravatar_id":"","url":"https://api.github.com/users/zengqinglei","html_url":"https://github.com/zengqinglei","followers_url":"https://api.github.com/users/zengqinglei/followers","following_url":"https://api.github.com/users/zengqinglei/following{/other_user}","gists_url":"https://api.github.com/users/zengqinglei/gists{/gist_id}","starred_url":"https://api.github.com/users/zengqinglei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zengqinglei/subscriptions","organizations_url":"https://api.github.com/users/zengqinglei/orgs","repos_url":"https://api.github.com/users/zengqinglei/repos","events_url":"https://api.github.com/users/zengqinglei/events{/privacy}","received_events_url":"https://api.github.com/users/zengqinglei/received_events","type":"User","site_admin":false},"created_at":"2018-09-10T01:09:08Z","updated_at":"2018-09-10T01:09:08Z","author_association":"NONE","body":"@domaindrivendev Yes, as @WeihanLi  said !\r\nWhen you access the api via gateway,the url may be **http://gateway/userService/users/123**, api gateway will forward the request to: **http://192.168.0.102/api/users/123**, but the swagger ui requests may request http://gateway/api/users/123, can I config any option or do something else to proxy the swagger ui request forware to the gateway ?"}}
{"actor":{"display_login":"zengqinglei"}}