I am developing a new application using microservices and Spring Boot. At the backend, the microservices can communicate with each other through an API gateway. I'm looking to use Spring Cloud Gateway which would expose all microservice APIs (secured using OAuth).
What I also want to do is expose a limited frontend API for consumers. This would:
- Only include selected APIs that consumers can call (i.e. not all backend functionality). I would need to be able specify which APIs and methods can be called.
- Have a single OpenAPI spec (with Swagger) which would document all APIs available (as opposed to having a spec for each service). I would ideally like to use spring-doc-open-api
- Handle rate limiting, apikeys etc
What is the best practice to set this up? Should I create another API gateway for the frontend API?
Any recommendations or alternatives would be much appreciated.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…