jbretsch / openapi-route-definition-locator

A RouteDefinitionLocator for Spring Cloud Gateway which creates route definitions dynamically based on OpenAPI (aka Swagger) definitions served by backend (micro)services.
MIT License
16 stars 5 forks source link

Read attributes for route definitions from even more places #5

Closed jbretsch closed 1 year ago

jbretsch commented 1 year ago

Attributes for the routes definitions created by the OpenAPI Route Definition Locator can already be set at various places:

  1. Globally within each OpenAPI definition.
  2. For each operation within an OpenAPI definition.
  3. Via OpenApiRouteDefinitionCustomizer beans.
  4. Via Spring Cloud Gateway default-filters.

But people may like to configure those attributes also

  1. For each service within the openapi-route-definition-locator object, i.e.
    openapi-route-definition-locator:
      services:
        - id: service1
          uri: http://service1:8080
          # Here.
  2. Globally for all routes created by the OpenAPI Route Definition Locator but no other registered RouteDefinitionLocator.
    openapi-route-definition-locator:
      # Here.
      services:
        - id: service1
          uri: http://service1:8080
jbretsch commented 1 year ago

Implemented with release v0.6.5-sc-2022.0 / v0.6.5-sc-2021.0.