Spring-cloud-gateway: Swagger route locator

Created on 24 Jan 2018  路  3Comments  路  Source: spring-cloud/spring-cloud-gateway

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.

enhancement

Most helpful comment

I did have the thought to have a swagger route locator.

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings