"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/dadosPessoais/dadosPessoais.docs");
require("../modules/user/user.docs");
require("../modules/galeria/galeria.docs");
require("../modules/plano/plano.docs");
require("../modules/emolumento/emolumento.docs");
require("../modules/simulacao/simulacao.docs");
require("../modules/historicoActividade/historicoActividade.docs");
require("../modules/noticia/noticia.docs");
require("../modules/access/access.docs");
require("../modules/carousel/carousel.docs");
require("../modules/definicaoSistema/definicaoSistema.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: 'Novocredito API',
            version: '1.0.0',
            description: 'API oficial do sistema novocredito'
        },
        servers: [{ url: process.env.SERVER_BASE_URL }, { url: 'http://localhost:8080' }]
    });
    return document;
}
