@nestjs/swagger
Advanced tools
Comparing version 4.0.6 to 4.0.7
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const typescript_1 = require("typescript"); | ||
const decorators_1 = require("../../decorators"); | ||
const plugin_constants_1 = require("../plugin-constants"); | ||
const plugin_utils_1 = require("./plugin-utils"); | ||
function isArray(type) { | ||
@@ -86,4 +85,3 @@ const symbol = type.getSymbol(); | ||
.expression; | ||
if (identifier && | ||
identifier.escapedText === `${plugin_constants_1.OPENAPI_NAMESPACE}.${decorators_1.ApiResponse.name}`) { | ||
if (plugin_utils_1.isDynamicallyAdded(identifier)) { | ||
return undefined; | ||
@@ -90,0 +88,0 @@ } |
@@ -7,1 +7,2 @@ import * as ts from 'typescript'; | ||
export declare function replaceImportPath(typeReference: string, fileName: string): string; | ||
export declare function isDynamicallyAdded(identifier: ts.Node): boolean; |
@@ -48,3 +48,5 @@ "use strict"; | ||
function hasPropertyKey(key, properties) { | ||
return properties.some(item => item.name.getText() === key); | ||
return properties | ||
.filter(item => !isDynamicallyAdded(item)) | ||
.some(item => item.name.getText() === key); | ||
} | ||
@@ -67,1 +69,5 @@ exports.hasPropertyKey = hasPropertyKey; | ||
exports.replaceImportPath = replaceImportPath; | ||
function isDynamicallyAdded(identifier) { | ||
return identifier && !identifier.parent && identifier.pos === -1; | ||
} | ||
exports.isDynamicallyAdded = isDynamicallyAdded; |
{ | ||
"name": "@nestjs/swagger", | ||
"version": "4.0.6", | ||
"version": "4.0.7", | ||
"description": "Nest - modern, fast, powerful node.js web framework (@swagger)", | ||
@@ -5,0 +5,0 @@ "author": "Kamil Mysliwiec", |
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
152411
2942