"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const promises_1 = __importDefault(require("fs/promises"));
const service_1 = require("@platformatic/service");
async function clientOpenapi() {
    const server = await (0, service_1.buildServer)({
        $schema: 'https://schemas.platformatic.dev/@platformatic/service/2.60.0.json',
        service: {
            openapi: true
        },
        watch: false,
        plugins: {
            paths: [
                {
                    path: './plugins',
                    encapsulate: false
                },
                './routes'
            ],
            typescript: true
        }
    });
    await server.ready();
    await promises_1.default.writeFile('openapi.json', JSON.stringify(server.swagger(), null, 2));
    await server.close();
}
clientOpenapi();
//# sourceMappingURL=client.openapi.js.map