spring-cloud-gateway
spring-cloud-gateway copied to clipboard
Swagger route locator
Suppose we have some of end points in some micro service...end point 1 to end point 5. But only end point 2 and 4 should be exposed externally.
Would it make sense to implement a predicate which uses some swagger definition to determine if the route should be applied? In this example the swagger would expose only the paths associated with end point 2 and 4.
I did have the thought to have a swagger route locator.
We have implemented a predicate based on basePath + paths + http method defined from swagger 2.0 definition. We would need to clean it up to submit back to scg.
yeah, I saw that. I think folks would be interested.
I have published an OpenAPI Route Definition Locator for Spring Cloud Gateway which creates route definitions dynamically based on OpenAPI (aka Swagger) definitions served by backend (micro)services. I thought it might scratch an itch others are having, too. I'd be interested in feedback (including feature requests).