serverless-plugin-canary-deployments icon indicating copy to clipboard operation
serverless-plugin-canary-deployments copied to clipboard

feat(api-gateway): support v1 authorizer

Open FrankSpitulski opened this issue 4 years ago • 2 comments

Proposed changes

this adds support for api gateway v1 authorizers (for http eventsources). right now if you try to use an authorizer that has a canary config api gateway will throw 500 authorizer configuration exceptions.

Types of changes

What types of changes does your code introduce to the plugin? Put an x in the boxes that apply

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • [x] Lint and unit tests pass locally with my changes
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] I have added necessary documentation (if appropriate)

Further comments

tested only locally, didn't want to change the examples too much since it would mean changing the http event source to a complex type. will change if that's okay.

FrankSpitulski avatar Jun 17 '20 20:06 FrankSpitulski

Thanks a lot for your contribution @FrankSpitulski, and sorry for the late reply. Before merging this PR, could you please add some unit and integration tests? For the latter, you'd only need to create the service configuration, the original CloudFormation template and the expected outcome. You can see examples of that in the fixtures/ folder. Also, could you please modify the sample project (under example/), so that it includes an example of how to use the new functionality? Thanks!

davidgf avatar Aug 11 '20 18:08 davidgf

@davidgf I added the example, but I am very much not familiar with CloudFormation. I'm afraid I'll have to leave it here in terms of the CloudFormation template.

FrankSpitulski avatar Aug 12 '20 23:08 FrankSpitulski