Mock response data

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?)

I have this question as well. Furthermore, when I try to use the example code I get:

Error: Cannot find module '../libs/response-lib'

I want to do something like:

    getEndpoint:
        handler: dummy.handler # we still have to provide dummy functions I guess
        name: dummy_${self:provider.stage}
        description: 'returns mock renditions'
        events:
            - http:
                path: /test/{name}
                method: get
                cors: true
                integration: mock
                request:
                    template:
                        application/json: '{"statusCode": 200}' 
                response:
                  template: 
                      application/json: '{"data": {}}'
                  statusCodes:
                      200:
                          pattern: ''