Listify/Tooling/body_and_auth_mapping.json
NMerz 2c9334ee9e Client API connection infrastructure
Create the infrastructure for the client to connect to API gateway in a generic manner. Tested with the ListPOST lambda.
2020-09-27 11:54:26 -04:00

4 lines
573 B
JSON

{
"application/json": "#set($allParams = $input.params())\n{\"body\": $input.json('$'),\"params\" : {\n #foreach($type in $allParams.keySet())\n #set($params = $allParams.get($type))\n \"$type\" : {\n #foreach($paramName in $params.keySet())\n \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n #if($foreach.hasNext),#end\n #end\n }\n #if($foreach.hasNext),#end\n #end\n },\"context\" : {\"sub\" : \"$context.authorizer.claims.sub\",\"email\" : \"$context.authorizer.claims.email\"}}"
}