opencode_offline/packages/opencode/script/schema.ts

9 lines
263 B
TypeScript
Raw Normal View History

2025-06-15 00:12:56 +08:00
#!/usr/bin/env bun
import "zod-openapi/extend"
import { Config } from "../src/config/config"
import { zodToJsonSchema } from "zod-to-json-schema"
const result = zodToJsonSchema(Config.Info)
await Bun.write("config.schema.json", JSON.stringify(result, null, 2))