dherault / serverless-offline

Emulate AWS λ and API Gateway locally when developing your Serverless project
MIT License
5.16k stars 794 forks source link

contentHandling #1752

Open ianbale opened 5 months ago

ianbale commented 5 months ago

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:

plugins:

provider: runtime: nodejs18.x stage: prod

Expected behavior/code

Environment