Last active
January 10, 2019 01:45
-
-
Save hallaji/f0dc81473f4913633f03923d6ff3e061 to your computer and use it in GitHub Desktop.
AWS API Gateway Mapping Template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#set($allParams = $input.params()) | |
{ | |
"context": { | |
"httpMethod": "$context.httpMethod", | |
"path": "$context.path" | |
}, | |
"params" : { | |
#foreach($type in $allParams.keySet()) | |
#set($params = $allParams.get($type)) | |
"$type": { | |
#foreach($paramName in $params.keySet()) | |
"$paramName" : "$util.escapeJavaScript($params.get($paramName))" | |
#if($foreach.hasNext),#end | |
#end | |
} | |
#if($foreach.hasNext),#end | |
#end | |
}, | |
"body": $input.json('$') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment