Rest 如何在不指定所有资源的情况下设置API网关
我有一些EC2应用程序(在node.js中)有许多REST路径,由于仍在开发过程中,路径不断变化 如何在api网关中设置映射到多个路径,而不是指定每个路径Rest 如何在不指定所有资源的情况下设置API网关,rest,amazon-web-services,routes,aws-api-gateway,Rest,Amazon Web Services,Routes,Aws Api Gateway,我有一些EC2应用程序(在node.js中)有许多REST路径,由于仍在开发过程中,路径不断变化 如何在api网关中设置映射到多个路径,而不是指定每个路径 e.g. my ec2 end points have: my.ec2.com/api/test my.ec2.com/api/test1 my.ec2.com/api/test2 my.ec2.com/api/user/time my.ec2.com/api/user/time1 my.ec2.com/api/user/time2 而不
e.g.
my ec2 end points have:
my.ec2.com/api/test
my.ec2.com/api/test1
my.ec2.com/api/test2
my.ec2.com/api/user/time
my.ec2.com/api/user/time1
my.ec2.com/api/user/time2
而不是设置api网关中的所有资源,
我可以做一些类似于:
api-gateway.amazon.com/api,指向my.ec2.com/api/
并且它将解决任何自动指向的调用等问题。从今天起,在API网关控制台中仍然不可能实现 解决办法是大摇大摆。然后我可以使用一些脚本生成Swagger文件并导入到API网关。事实上,这是一个很好的解决方案,因为我可以对Swagger进行源代码控制