How to configure Swagger in Spring Boot Microservices behind an API Gateway to avoid internal Docker URLs? #148573
Replies: 2 comments
-
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
Thanks for posting in the GitHub Community, @devAyyoub! We're happy you're here. You are more likely to get a useful response if you are posting your question in the applicable category, the Discussions category is solely related to conversations around the GitHub product Discussions. This question should be in the Programming Help category. I've gone ahead and moved it for you. Good luck! |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Bug
Body
I’m developing a microservices architecture using Spring Boot, Eureka Service Discovery, and a Spring Cloud API Gateway. Each microservice is registered with Eureka and uses SpringDoc Swagger for API documentation. All services are running within Docker containers.
I can successfully access the Swagger UI for each service through the API Gateway, but when I try to execute any endpoint, the requests are directed to the internal Docker network hostname provided by Eureka, rather than through the API Gateway URL.
For example, the generated request URL is:
curl -X 'GET'
'http://e8f4d6d79b78:39835/customer/customer/V1'
-H 'accept: /'
Instead of going through the API Gateway at: http://localhost:8081/customer/V1
Beta Was this translation helpful? Give feedback.
All reactions