Socket
Socket
Sign inDemoInstall

@martinsson/serverless-openapi-documentation

Package Overview
Dependencies
95
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.3 to 1.2.4

11

DefinitionGenerator.js

@@ -53,5 +53,5 @@ "use strict";

this.definition.components.schemas = yield parse_1.parseModels(models, this.root);
this.config.models = _.map(this.definition.components.schemas, crateModel);
function crateModel(value, key) {
return { name: key, contentType: 'application/json', schema: value, description: '', example: {} };
this.config.models = _.map(this.definition.components.schemas, createModel);
function createModel(value, key) {
return { name: key, contentType: 'application/json', schema: value };
}

@@ -76,2 +76,5 @@ return this;

readFunctions(config) {
function normalizePath(path) {
return path.startsWith('/') ? path : '/' + path;
}
// loop through function configurations

@@ -85,3 +88,3 @@ for (const funcConfig of config) {

const pathConfig = {
[`/${httpEventConfig.path}`]: {
[normalizePath(httpEventConfig.path)]: {
[httpEventConfig.method.toLowerCase()]: this.getOperationFromConfig(funcConfig._functionName, httpEventConfig.documentation)

@@ -88,0 +91,0 @@ }

{
"name": "@martinsson/serverless-openapi-documentation",
"version": "1.2.3",
"version": "1.2.4",
"description": "Serverless 1.0 plugin to generate OpenAPI V3 documentation from serverless configuration",

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

@@ -5,7 +5,7 @@ import { JSONSchema7 } from "json-schema";

name: string;
description: string;
description?: string;
contentType: string;
schema: string | JSONSchema7;
examples: Array<any>;
example: object;
examples?: Array<any>;
example?: object;
}

@@ -12,0 +12,0 @@ export interface DefinitionConfig {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc