fix(apigateway): prefer path parameters in VTL lookups (#3560)

Co-authored-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>
This commit is contained in:
XuJianandxujiantop-crypto authored and GitHub committed 2026-09-14 10:53:33 -04:00
1 parent 1987bf0c96
commit 166b13a82f
3 files changed
+54 -7

No files matched your search

@@ -239,14 +239,14 @@ public class VtlTemplateEngine {
}
}
/** Searches all parameter types for the given name (querystring, path, header). */
/** Searches all parameter types for the given name (path, querystring, header). */
public String params(String paramName) {
if (ctx.queryParams() != null && ctx.queryParams().containsKey(paramName)) {
return ctx.queryParams().get(paramName);
}
if (ctx.pathParams() != null && ctx.pathParams().containsKey(paramName)) {
return ctx.pathParams().get(paramName);
}
if (ctx.queryParams() != null && ctx.queryParams().containsKey(paramName)) {
return ctx.queryParams().get(paramName);
}
if (ctx.headers() != null && ctx.headers().containsKey(paramName)) {
return ctx.headers().get(paramName);
}