@nestjs/swagger
Advanced tools
Comparing version 4.3.1 to 4.3.2
@@ -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; |
@@ -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": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
167777
3515