UNPKG

@eddaic/nestjs-decorators

Version:

Additional decorators intended for use with NestJS framework.

40 lines (39 loc) 1.24 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ApiPropertyInt = ApiPropertyInt; exports.ApiPropertyIntOptional = ApiPropertyIntOptional; exports.ApiPropertyBigInt = ApiPropertyBigInt; exports.ApiPropertyBigIntOptional = ApiPropertyBigIntOptional; const api_property_decorator_1 = require("@nestjs/swagger/dist/decorators/api-property.decorator"); function ApiPropertyInt(options) { return (0, api_property_decorator_1.createApiPropertyDecorator)({ ...options, type: 'integer', format: 'int', required: true, }); } function ApiPropertyIntOptional(options) { return (0, api_property_decorator_1.createApiPropertyDecorator)({ ...options, type: 'integer', format: 'int', required: false, }); } function ApiPropertyBigInt(options) { return (0, api_property_decorator_1.createApiPropertyDecorator)({ ...options, type: 'integer', format: 'int64', required: true, }); } function ApiPropertyBigIntOptional(options) { return (0, api_property_decorator_1.createApiPropertyDecorator)({ ...options, type: 'integer', format: 'int64', required: false, }); }