fix(schema): generate full JSON schema with Zod v4

This commit is contained in:
YeonGyu-Kim
2026-02-13 11:08:15 +09:00
parent 260acdc140
commit d6754c96bc
4 changed files with 3331 additions and 15 deletions
+17
View File
@@ -0,0 +1,17 @@
import * as z from "zod"
import { OhMyOpenCodeConfigSchema } from "../src/config/schema"
export function createOhMyOpenCodeJsonSchema(): Record<string, unknown> {
const jsonSchema = z.toJSONSchema(OhMyOpenCodeConfigSchema, {
target: "draft-07",
unrepresentable: "any",
})
return {
$schema: "http://json-schema.org/draft-07/schema#",
$id: "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json",
title: "Oh My OpenCode Configuration",
description: "Configuration schema for oh-my-opencode plugin",
...jsonSchema,
}
}