This reverts commit 47e300b17e47b6f8f54a2a945673f879ea48cf30, reversing changes made to 243ce1b7e81005d4c2cd2eda0a51f56c715ffe7f.
18 lines
599 B
TypeScript
18 lines
599 B
TypeScript
import * as z from "zod"
|
|
import { OhMyOpenCodeConfigSchema } from "../src/config/schema"
|
|
|
|
export function createOhMyOpenCodeJsonSchema(): Record<string, unknown> {
|
|
const jsonSchema = z.toJSONSchema(OhMyOpenCodeConfigSchema, {
|
|
target: "draft-7",
|
|
unrepresentable: "any",
|
|
})
|
|
|
|
return {
|
|
$schema: "http://json-schema.org/draft-07/schema#",
|
|
$id: "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/dev/assets/oh-my-opencode.schema.json",
|
|
title: "Oh My OpenCode Configuration",
|
|
description: "Configuration schema for oh-my-opencode plugin",
|
|
...jsonSchema,
|
|
}
|
|
}
|