有没有办法在aws apigateway中调试映射模板
Is there a way to debug a mapping template in aws apigateway
我正在尝试创建一个 apigateway 映射模板,将其转换为:
{
"ref": "refs/heads/master"
}
进入这个:
{
"download_url":"http://example.com/master"
}
所以我尝试了这个:
{
"branch": $input.path($.ref).substring($input.path($.ref).lastIndexOf('/')+1)
}
测试这个方法我得到一个简单的错误:
Execution failed due to configuration error: Unable to transform request
现在,我当然想知道为什么失败了。但更重要的是:我该如何调试呢?有没有关于映射模板的更详细的错误消息描述?
不直接与 API Gateway 一起使用,但由于 API Gateway 在后台使用 Velocity template engine,您可能会考虑在自己的计算机上下载和 运行 速度引擎调试您的模板。
我正在尝试创建一个 apigateway 映射模板,将其转换为:
{
"ref": "refs/heads/master"
}
进入这个:
{
"download_url":"http://example.com/master"
}
所以我尝试了这个:
{
"branch": $input.path($.ref).substring($input.path($.ref).lastIndexOf('/')+1)
}
测试这个方法我得到一个简单的错误:
Execution failed due to configuration error: Unable to transform request
现在,我当然想知道为什么失败了。但更重要的是:我该如何调试呢?有没有关于映射模板的更详细的错误消息描述?
不直接与 API Gateway 一起使用,但由于 API Gateway 在后台使用 Velocity template engine,您可能会考虑在自己的计算机上下载和 运行 速度引擎调试您的模板。