79206822

Date: 2024-11-20 10:42:06
Score: 1
Natty:
Report link

The issue is that you have parsed the json in the template, what you want is:

##velocity template

#set($output=$input.json('$.output'))

#set($context.responseOverride.status=$input.path('$.output.statusCode')

https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#input-variable-reference

The .json function of the input object will convert it to a json string istead of an object internally in VTL

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: A. van Loon