Socket
Socket
Sign inDemoInstall

@nestjs/swagger

Package Overview
Dependencies
Maintainers
4
Versions
206
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nestjs/swagger - npm Package Compare versions

Comparing version 4.3.1 to 4.3.2

9

dist/services/schema-object-factory.d.ts

@@ -12,2 +12,11 @@ import { Type } from '@nestjs/common';

createFromModel(parameters: ParamWithTypeMetadata[], schemas: SchemaObject[], schemaRefsStack?: string[]): Array<ParamWithTypeMetadata | BaseParameterObject>;
createQueryOrParamSchema(param: ParamWithTypeMetadata, schemas: SchemaObject[], schemaRefsStack: string[]): ParamWithTypeMetadata | Partial<ParamWithTypeMetadata & BaseParameterObject> | {
type: any;
name?: string | number | object;
in?: "query" | "header" | "path" | "cookie" | "body" | "placeholder";
isArray?: boolean;
required: true;
enum?: unknown[];
enumName?: string;
};
exploreModelSchema(type: Type<unknown> | Function, schemas: SchemaObject[], schemaRefsStack?: string[]): string;

@@ -14,0 +23,0 @@ mergePropertyWithMetadata(key: string, prototype: Type<unknown>, schemas: SchemaObject[], schemaRefsStack?: string[], metadata?: SchemaObjectMetadata): SchemaObjectMetadata | ReferenceObject;

14

dist/services/schema-object-factory.js

@@ -21,6 +21,3 @@ "use strict";

if (!is_body_parameter_util_1.isBodyParameter(param)) {
if (param.enumName) {
return this.createEnumParam(param, schemas, schemaRefsStack);
}
return param;
return this.createQueryOrParamSchema(param, schemas, schemaRefsStack);
}

@@ -48,2 +45,11 @@ if (this.isPrimitiveType(param.type)) {

}
createQueryOrParamSchema(param, schemas, schemaRefsStack) {
if (param.enumName) {
return this.createEnumParam(param, schemas, schemaRefsStack);
}
if (this.isLazyTypeFunc(param.type)) {
return Object.assign(Object.assign({}, param), { type: param.type() });
}
return param;
}
exploreModelSchema(type, schemas, schemaRefsStack = []) {

@@ -50,0 +56,0 @@ if (this.isLazyTypeFunc(type)) {

{
"name": "@nestjs/swagger",
"version": "4.3.1",
"version": "4.3.2",
"description": "Nest - modern, fast, powerful node.js web framework (@swagger)",

@@ -36,4 +36,4 @@ "author": "Kamil Mysliwiec",

"@types/node": "11.15.0",
"@typescript-eslint/eslint-plugin": "2.20.0",
"@typescript-eslint/parser": "2.20.0",
"@typescript-eslint/eslint-plugin": "2.21.0",
"@typescript-eslint/parser": "2.21.0",
"eslint": "6.8.0",

@@ -46,10 +46,10 @@ "eslint-config-prettier": "6.10.0",

"jest": "25.1.0",
"lint-staged": "10.0.7",
"lint-staged": "10.0.8",
"prettier": "1.19.1",
"reflect-metadata": "0.1.13",
"release-it": "12.6.1",
"release-it": "12.6.2",
"swagger-parser": "8.0.4",
"swagger-ui-express": "4.1.3",
"ts-jest": "25.2.1",
"typescript": "3.8.2"
"typescript": "3.8.3"
},

@@ -56,0 +56,0 @@ "peerDependencies": {

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