You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
serverless-offline is looking for contentHandling in the wrong place.
It used to be located events:http:contentHandling when we used serverless-apigwy-binary
However it has been moved to events:http:response:contentHandling now that it is natively supported within serverless.
In order to make it work both offline and when deployed I have to double up the configuration as shown below:
However, this results in a warning when deploying:
Warning: Invalid configuration encountered
at 'functions.getApplePass.events.0.http': unrecognized property 'contentHandling'
Bug Report
Current Behavior
serverless-offline is looking for contentHandling in the wrong place.
It used to be located events:http:contentHandling when we used serverless-apigwy-binary
However it has been moved to events:http:response:contentHandling now that it is natively supported within serverless.
In order to make it work both offline and when deployed I have to double up the configuration as shown below:
However, this results in a warning when deploying:
Warning: Invalid configuration encountered
at 'functions.getApplePass.events.0.http': unrecognized property 'contentHandling'
functions:
getApplePass:
handler: apple/handler.getApplePass
memorySize: 128
timeout : 30
events:
- http:
path: /{version}/passes/{passTypeIdentifier}/{serialNumber}
integration: lambda
contentHandling: CONVERT_TO_BINARY
method: get
cors: true
private: false
request:
parameters:
paths:
version: true
passTypeIdentifier: true
serialNumber: true
response:
contentHandling: CONVERT_TO_BINARY
headers:
Access-Control-Allow-Origin : "'*'"
Content-Type: "'application/vnd.apple.pkpass'"
plugins:
provider:
runtime: nodejs18.x
stage: prod
Expected behavior/code
Environment
serverless
version: 13.3.0serverless-offline
version: 13.3.0node.js
version: 8xOS
: Mac OS 13.6.1The text was updated successfully, but these errors were encountered: