Skip to content

Commit cd32a0b

Browse files
authored
Merge pull request #17 from RafPe/fix-validations
Fixes validation errors #16
2 parents 9f24ade + a0c2849 commit cd32a0b

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ class ServerlessReqValidatorPlugin {
4646

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

49+
// Create schema for your properties. For reference use https://github.com/ajv-validator/ajv
50+
serverless.configSchemaHandler.defineFunctionEventProperties('aws', 'http', {
51+
properties: {
52+
reqValidatorName: { type: 'string' },
53+
},
54+
required: ['reqValidatorName'],
55+
});
56+
4957
this.hooks = {
5058
'before:package:finalize': this._beforeDeploy
5159
};

0 commit comments

Comments
 (0)