Socket
Socket
Sign inDemoInstall

@kakkuk/serverless-aws-apigateway-documentation

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kakkuk/serverless-aws-apigateway-documentation - npm Package Compare versions

Comparing version 1.1.5 to 1.1.6

2

package.json
{
"name": "@kakkuk/serverless-aws-apigateway-documentation",
"version": "1.1.5",
"version": "1.1.6",
"description": "Serverless 1.0 plugin to add documentation and models to the serverless generated API Gateway",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -55,2 +55,60 @@ 'use strict';

};
//validation rules for 'documentation' property on 'http' event from 'aws' provider
const docConfigSchema = {
type: 'object',
definitions: {
models: {
type: 'object',
patternProperties: { '*/*': { type: 'string' } }
},
body: {
type: 'object',
properties: { description: { type: 'string' } }
},
arrayOfProps: {
type: 'array',
items: [
{
type: 'object',
properties: { name: { type: 'string' }, description: { type: 'string' } },
required: [ 'name' ]
}
]
}
},
properties: {
documentation: {
type: 'object',
properties: {
summary: { type: 'string' },
description: { type: 'string' },
tags: { type: 'array', items: [ { type: 'string' } ] },
requestBody: { "'$ref'": '#/definitions/body' },
requestHeaders: { "'$ref'": '#/definitions/arrayOfProps' },
queryParams: { "'$ref'": '#/definitions/arrayOfProps' },
pathParams: { "'$ref'": '#/definitions/arrayOfProps' },
requestModels: { "'$ref'": '#/definitions/models' },
methodResponses: {
type: 'array',
items: [
{
type: 'object',
properties: {
statusCode: { type: 'number' },
responseBody: { "'$ref'": '#/definitions/body' },
responseHeaders: { "'$ref'": '#/definitions/arrayOfProps' },
responseModels: { "'$ref'": '#/definitions/models' }
},
required: [ 'statusCode' ]
}
]
}
}
}
}
};
//create schema for 'documentation' property
this.serverless.configSchemaHandler.defineFunctionEventProperties('aws', 'http', docConfigSchema);
}

@@ -57,0 +115,0 @@

Sorry, the diff of this file is too big to display

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