I am developing a microservice application using SpringBoot. There is Gateway Microservice which is public facing, it redirects requests to particular microservice (which are running on different hosts).
Now, I've multiple microservices, each microservice has exposed their APIs using Swagger. We would like to aggregate all these API Swagger docs for public clients.
Temporary solution we've incorporated is, just copied the Swagger Annotated classes for each microservice in Gateway Service. What is the right way to do it?
I used Zuul and that solved my problem This is how my app would be deployed
I added this in my
pom.xml
My main class looks like this
I created the aggregator for swagger document
I can add more microservices in this field. (Can be improved to be read from config file)
My
application.properties
looks like following