New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@marxlnfcs/nest-swagger-decorators

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@marxlnfcs/nest-swagger-decorators - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

13

lib/decorators/properties/class-property.decorator.js

@@ -7,8 +7,9 @@ "use strict";

const property_decorator_1 = require("./property.decorator");
const swagger_1 = require("@nestjs/swagger");
function ApiClassProperty(classRef, descriptionOrOptions, opts) {
const [description, options] = [(0, utils_1.extractString)(descriptionOrOptions, opts === null || opts === void 0 ? void 0 : opts.description), (0, utils_1.extractOptions)(descriptionOrOptions, opts) || {}];
const models = (0, utils_1.extractClassRef)(classRef);
return (0, common_1.applyDecorators)((0, property_decorator_1.ApiProperty)(description, Object.assign(options, {
type: models
})));
return (0, common_1.applyDecorators)((0, swagger_1.ApiExtraModels)(...Array.isArray(models) ? models : [models]), (0, property_decorator_1.ApiProperty)(description, Object.assign(options, !Array.isArray(models)
? { $ref: (0, utils_1.getExtraModelReference)(models) }
: { type: 'array', items: { $ref: (0, utils_1.getExtraModelReference)(models[0]) } })));
}

@@ -19,7 +20,7 @@ exports.ApiClassProperty = ApiClassProperty;

const models = (0, utils_1.extractClassRef)(classRef);
return (0, common_1.applyDecorators)((0, property_decorator_1.ApiPropertyOptional)(description, Object.assign(options, {
type: models
})));
return (0, common_1.applyDecorators)((0, swagger_1.ApiExtraModels)(...Array.isArray(models) ? models : [models]), (0, property_decorator_1.ApiPropertyOptional)(description, Object.assign(options, !Array.isArray(models)
? { $ref: (0, utils_1.getExtraModelReference)(models) }
: { type: 'array', items: { $ref: (0, utils_1.getExtraModelReference)(models[0]) } })));
}
exports.ApiClassPropertyOptional = ApiClassPropertyOptional;
//# sourceMappingURL=class-property.decorator.js.map
{
"name": "@marxlnfcs/nest-swagger-decorators",
"private": false,
"version": "0.0.6",
"version": "0.0.7",
"description": "Extended decorators for the @nestjs/swagger module",

@@ -6,0 +6,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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