"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createMigrateApplication = void 0;
const utils_1 = require("@autobe/utils");
const migrate_1 = require("@nestia/migrate");
const createMigrateApplication = (document) => {
    const migrate = new migrate_1.NestiaMigrateApplication((0, utils_1.transformOpenApiDocument)(document));
    migrate.getData().routes.forEach((r) => {
        // @todo -> must be optimized
        r.accessor[r.accessor.length - 1] = document.operations.find((o) => o.path === r.path && o.method === r.method).name;
    });
    return migrate;
};
exports.createMigrateApplication = createMigrateApplication;
//# sourceMappingURL=createMigrateApplication.js.map