Can I add request and response mapping templates v...
# sst
s
Can I add request and response mapping templates via sst construct?
f
Hey @Sam Hulick, mapping templates are supported for API Gateway REST API only (not supported for HTTP API)
So it’s not supported for
sst.Api
. You’d have to use
sst.ApiGatewayV1Api
for REST API.
s
@Frank This is first time I've properly done Live Lambda Development. The feedback loop is awesome, feels like I've 10x my development workflow!
f
That’s awesome to hear that! 🎉
@thdxr is actually working on a new version that bring 60% speed boost 💨
s
@Frank Bit of a nube question, but inside my sst app I have a folder services that handles lambda logic. Does sst also scan these folders for package.jsons? What is recommended best practice. Should we keep dependencies for lambdas in services folders separate from sst app.
f
Are you setting
srcPath
for your functions?
s
Hey, yeah I'm setting the srcPath for function.
Copy code
'PUT /spreadsheet/{id}': {
          srcPath: 'services/googleSheets',
          handler: 'updateSheet.main',
        },
f
srcPath
is really meant to point to where the
package.json
is. If it’s at the root, use this instead:
Copy code
'PUT /spreadsheet/{id}': {
          handler: 'services/googleSheets/updateSheet.main',
        },
Or just this
Copy code
'PUT /spreadsheet/{id}': 'services/googleSheets/updateSheet.main',