Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

fix: ensure to extend function schema only if method available #175

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pgrzesik
Copy link

@pgrzesik pgrzesik commented Apr 28, 2021

What did you implement:

Closes #173

In order to not break the plugin for serverless in version lower than 2.10.0 where defineFunctionProperties was added (https://github.com/serverless/serverless/blob/master/CHANGELOG.md#2100-2020-11-03), we should check for it's existence before extending the schema

How did you implement it:

Checking for the existence of defineFunctionProperties before calling it

How can we verify it:

If you try to use plugin with serverless in version <2.10.0, it will fail as described in the linked issue. With this change, it will no longer fail.

Todos:

  • [] Write tests
  • [] Write documentation
  • Fix linting errors
  • [] Provide verification config/commands/resources

@AdamSlack
Copy link

AdamSlack commented Aug 26, 2021

Currently working on a project that is using a version of serverless affected by this. Is there anything i can do to help this PR?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

serverless.configSchemaHandler.defineFunctionProperties is not a function
3 participants