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:
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.1