1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-14 06:38:13 +09:00
hotomoe/packages/backend/scripts/generate_api_json.js
2024-04-04 22:25:28 +09:00

14 lines
406 B
JavaScript

/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { loadConfig } from '../built/config.js'
import { genOpenapiSpec } from '../built/server/api/openapi/gen-spec.js'
import { writeFileSync } from "node:fs";
const config = loadConfig();
const spec = genOpenapiSpec(config, true);
writeFileSync('./built/api.json', JSON.stringify(spec), 'utf-8');