4 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
It's not possible via the parameter mapping but doable within the request body mapping template with request override feature.
https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-override-request-response-parameters.html
Please note that the request/response override is only available in REST API.
répondu il y a 4 ans
0
Hello, first of all, thank you very much for the response.
And yes it worked by using mapping template, I thought they were only for body.
This is the working solution, under
requestTemplates:
application/json:
#set($foo = $input.params('foo'))
#set($userId = $context.authorizer.claims.sub)
$input.json("$")
#set($context.requestOverride.querystring.Message = "{
""foo"": ""$foo"",
""userId"" : ""$userId""
}")"
répondu il y a 4 ans
0
For a mix of numeric and associative arrays one can use this syntax as well:
#set($context.requestOverride.querystring['filter[0][action]'] = "where")
#set($context.requestOverride.querystring['filter[0][attribute]'] = "status")
répondu il y a 9 mois
Contenus pertinents
- demandé il y a un an
- demandé il y a 6 mois