spring-boot - Maintaining multiple API representations in an API Gateway for a set of Spring Boot Microservices
问题描述
I am using AWS API Gateway and would like to construct multiple API's for a set of Spring Boot micro-services that exist behind the scenes, but do so automatically.
For example, lets say I have a User and Contract Micro-service and they expose a simple CRUD, I would like to make 2 API representations inside the API Gateway for these 2 micro-services however they will be in the context of an Admin and a User.
The Admin API would have full access to all operations (CRUD) of both micro-services, however, the User API would only allow Read from both micro-services.
My question is about maintaining the representation of these 2 API contexts (Admin and User) is there any way to easily generate the swagger(s) that I would need that I can synchronize the API Gateway with without having to manually maintain this? Or is there a better approach that others are doing that im missing?
I have found spring fox which I was able to use and generate the swagger defs for the API at the microservice levels, but this only satisfies the Admin Use case and not the User one from what I can tell.
Has anyone found an elegant solution to this?
解决方案
推荐阅读
- ms-access - MS Access 子表单的多个分离条件
- javascript - jestjs 如何测试使用 performance.now() 的函数?
- cordova - 使用可访问的资源构建电子窗口应用程序
- spring-boot - 是否可以在同一个 springboot 应用程序中配置 jmsTemplate 主题发布者和队列消息生产者
- python - 类装饰器禁用 __init_subclass__
- c# - 在不同页面上使用数据访问层调用方法不会更新数据库
- python - 在python中正确转义反斜杠
- python-3.x - 如何根据多个键对嵌套字典进行排序
- jquery - jQuery滚动功能上的CSS边框消失
- r - devtools::install_github 错误:SEC_E_UNTRUSTED_ROOT - 证书链由不可靠的实体颁发