The docs give the following as a mock example:
functions:
hello:
handler: handler.hello
events:
- http:
path: hello
cors: true
method: get
integration: mock
request:
template:
application/json: '{"statusCode": 200}'
response:
template: $input.path('
This does create a mock response…except it’s empty.
How can I actually return data here? I’ve tried adding application/json: {...}
to the responsetemplate
, but that doesn’t work, I’ve tried adding a body under statusCodes
but no luck there either.
There doesn’t seem to be any documentation on this…how can I return an actual mock body?)