Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save meetbryce/8ccd9747b5e3abe709b652b5521cfcaf to your computer and use it in GitHub Desktop.
Save meetbryce/8ccd9747b5e3abe709b652b5521cfcaf to your computer and use it in GitHub Desktop.
Template for adding new key:value pair (property) to your AWS API Gateway Body Mapping Template
{
"stage" : "$context.stage",
#foreach( $key in $input.path('$').keySet() )
"$key": "$input.path('$').get($key)"#if($foreach.hasNext),
#end
#end
}
{
"edited": "yes",
#foreach( $key in $input.path('$').keySet() )
"$key": "$input.path('$').get($key)"#if($foreach.hasNext),
#end
#end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment