I am trying to use the spring cloud API gateway with micronaut microservice, for routes routing as we can see in the below diagram, both the application are register to Consul discovery service.
I use Micronaut for rest API because it is fast and less memory consumption, however, I use spring API gateway because Micronaut has no built-in API gateway service.
Now Micronaut microservice expose the open API in YAML schema, however, spring open API expose in JSON schema
As per spring gateway
gateway:
routes:
- id: product-service
uri: lb://PRODUCT-SERVICE
predicates:
- Path= /product/**
filters:
- name: CircuitBreaker
args:
name: Product-service
fallbackuri: forward:/productFallBack
- RewritePath=/product/(?<path>.*), /$\{path}
- id: openapi
uri: http://localhost:${server.port}
predicates:
- Path=/v3/api-docs/**
filters:
- RewritePath=/v3/api-docs/(?<path>.*), /$\{path}/v3/api-docs
How can I make this work or I am doing something wrong