2024-03-13 06:37:18 -07:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2024-04-04 06:25:28 -07:00
|
|
|
import { loadConfig } from '../built/config.js'
|
|
|
|
import { genOpenapiSpec } from '../built/server/api/openapi/gen-spec.js'
|
2023-11-22 00:08:56 -08:00
|
|
|
import { writeFileSync } from "node:fs";
|
|
|
|
|
|
|
|
const config = loadConfig();
|
2024-02-01 19:47:07 -08:00
|
|
|
const spec = genOpenapiSpec(config, true);
|
2023-11-22 00:08:56 -08:00
|
|
|
|
2024-03-13 06:37:18 -07:00
|
|
|
writeFileSync('./built/api.json', JSON.stringify(spec), 'utf-8');
|