michangarrito/apps/backend/node_modules/@nestjs/swagger/dist/utils/get-schema-path.util.js
rckrdmrd 97f407c661 [MIGRATION-V2] feat: Migrar michangarrito a estructura v2
- Prefijo v2: MCH
- TRACEABILITY-MASTER.yml creado
- Listo para integracion como submodulo

Workspace: v2.0.0 | SIMCO: v4.0.0
2026-01-10 11:28:54 -06:00

16 lines
536 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.refs = exports.getSchemaPath = void 0;
const shared_utils_1 = require("@nestjs/common/utils/shared.utils");
function getSchemaPath(model) {
const modelName = (0, shared_utils_1.isString)(model) ? model : model && model.name;
return `#/components/schemas/${modelName}`;
}
exports.getSchemaPath = getSchemaPath;
function refs(...models) {
return models.map((item) => ({
$ref: getSchemaPath(item.name)
}));
}
exports.refs = refs;