Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

serverless-reqvalidator-plugin

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-reqvalidator-plugin - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

test/fixtures/externalValidatorFunction.yaml

11

package.json
{
"name": "serverless-reqvalidator-plugin",
"version": "2.0.0",
"version": "3.0.0",
"description": "Serverless plugin for setting request validation",
"main": "src/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "jest test"
},

@@ -26,3 +26,8 @@ "repository": {

},
"homepage": "https://github.com/RafPe/serverless-reqvalidator-plugin#readme"
"homepage": "https://github.com/RafPe/serverless-reqvalidator-plugin#readme",
"devDependencies": {
"ajv": "^8.11.2",
"jest": "^29.3.1",
"js-yaml": "^4.1.0"
}
}

@@ -36,2 +36,17 @@ 'use strict';

const ServerlessReqValidatorPluginConfigSchema = {
properties: {
reqValidatorName: {
anyOf: [
{ type: 'string' },
{ type: 'object',
properties: {
'Fn::ImportValue': { type: 'string' }
},
required: ['Fn::ImportValue'],
},
]
},
},
}
class ServerlessReqValidatorPlugin {

@@ -51,7 +66,3 @@ constructor(serverless, options) {

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

@@ -118,1 +129,2 @@ this.hooks = {

module.exports = ServerlessReqValidatorPlugin;
module.exports.ServerlessReqValidatorPluginConfigSchema = ServerlessReqValidatorPluginConfigSchema;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc