"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateOpenApi = generateOpenApi;
const zod_to_openapi_1 = require("@asteasolutions/zod-to-openapi");
const registry_1 = require("./registry");
// IMPORTANTE: importar os docs dos módulos
require("../modules/auth/auth.docs");
require("../modules/plano/plano.docs");
require("../modules/dadosPessoais/dadosPessoais.docs");
require("../modules/user/user.docs");
require("../modules/pagamento/pagamento.docs");
require("../modules/chat/chat.docs");
require("../modules/galeria/galeria.docs");
require("../modules/emolumento/emolumento.docs");
require("../modules/historicoActividade/historicoActividade.docs");
require("../modules/notification/notification.docs");
require("../modules/device/device.docs");
require("../modules/referencia/referencia.docs");
require("../modules/noticia/noticia.docs");
require("../modules/access/access.docs");
require("../modules/apiToken/apiToken.docs");
require("../modules/carousel/carousel.docs");
require("../modules/definicaoSistema/definicaoSistema.docs");
require("../modules/emailHistory/emailHistory.docs");
require("../modules/gerarPdf/gerarPdf.docs");
require("../modules/menu/menu.docs");
require("../modules/siteInfo/siteInfo.docs");
require("../modules/aws/aws.docs");
require("../modules/menu/menu.docs");
function generateOpenApi() {
    const generator = new zod_to_openapi_1.OpenApiGeneratorV3(registry_1.registry.definitions);
    const document = generator.generateDocument({
        openapi: '3.0.0',
        info: {
            title: 'Infrasat API',
            version: '1.0.0',
            description: 'API oficial do sistema Infrasat'
        },
        servers: process.env.SERVER_TEST_URL ? JSON.parse(process.env.SERVER_TEST_URL) : [{ url: 'http://localhost:8080' }],
    });
    return document;
}
