DianaIonita / serverless-api-gateway-throttling

A plugin for the Serverless framework which configures throttling for API Gateway endpoints.
ISC License
69 stars 7 forks source link

Serverless: Configuration warning at 'functions['export-latest'].events[0].http': unrecognized property 'throttling' #9

Closed crushjelly closed 3 years ago

crushjelly commented 3 years ago

I am getting this warning Serverless: Configuration warning at 'functions['export-latest'].events[0].http': unrecognized property 'throttling' when using http event.


    events:
      - http:
          path: export/item
          method: get
          private: true
          throttling:
            maxRequestsPerSecond: 2000
            maxConcurrentRequests: 1000

When I use global apiGatewayThrottling configuration it works fine. Is my configuration bad?

DianaIonita commented 3 years ago

Hi @crushjelly,

Thanks for raising the issue. Your configuration looks fine. Recently, the Serverless framework added warnings whenever it encounters configuration that isn't native, such as the kind that this plugin uses.

Plugin developers have the option of extending the validation schema, which I plan to do soon, and it will make the warning go away.

In the meantime, you have the option of turning off validation to remove the warning.

The plugin should still work, with or without the configuration warning. If you're having trouble getting it to work, please let me know.

DianaIonita commented 3 years ago

Released v1.0.2.