Skip to content

Commit

Permalink
Merge pull request #17 from RafPe/fix-validations
Browse files Browse the repository at this point in the history
Fixes validation errors #16
  • Loading branch information
RafPe authored Jan 3, 2021
2 parents 9f24ade + a0c2849 commit cd32a0b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ class ServerlessReqValidatorPlugin {

this._beforeDeploy = this.beforeDeploy.bind(this)

// Create schema for your properties. For reference use https://github.com/ajv-validator/ajv
serverless.configSchemaHandler.defineFunctionEventProperties('aws', 'http', {
properties: {
reqValidatorName: { type: 'string' },
},
required: ['reqValidatorName'],
});

this.hooks = {
'before:package:finalize': this._beforeDeploy
};
Expand Down

0 comments on commit cd32a0b

Please sign in to comment.