I have microservice environment and have list of service.
Also have api gateway. api authentication is done via gateway and then it routes request to destination service. so no direct call to any service APIs.
I have serviceA, serviceB, serviceC and serviceGateway.
Service A to C have their own swagger config and UI.
http://localhost:8081/serviceA/swagger-ui/index.html
http://localhost:8082/serviceB/swagger-ui/index.html
http://localhost:8083/serviceC/swagger-ui/index.html
if I will invoke api via swagger ui then api authentication will not take place as it’s calling direct api.
Is there anyway that when I call any service’s API via swagger ui, it will go via gateway?
Is there anyway to customise springdoc-openapi bean that will help to update context?
current call:
http://localhost:8081/serviceA/controllerX/api1
expected:
http://localhost:8084/gateway/serviceA/controllerX/api1
In short I want each and every call to be passed via gateway, even if it is generated from swagger ui of any of the service.