UNPKG

@nestdevx/tenant

Version:

Tenant module for multi-tenant NestJS applications.

26 lines 1.01 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ApiResponseDoc = void 0; const common_1 = require("@nestjs/common"); const swagger_1 = require("@nestjs/swagger"); const response_dto_1 = require("../dtos/response.dto"); const ApiResponseDoc = (model, description, statusCode) => { return (0, common_1.applyDecorators)((0, swagger_1.ApiExtraModels)(response_dto_1.ResponseDto, model), (0, swagger_1.ApiResponse)({ description: description || "Successful response", status: statusCode || 200, schema: { allOf: [ { $ref: (0, swagger_1.getSchemaPath)(response_dto_1.ResponseDto) }, { properties: { data: { $ref: (0, swagger_1.getSchemaPath)(model) }, }, }, ], }, })); }; exports.ApiResponseDoc = ApiResponseDoc; //# sourceMappingURL=api-response.js.map