bd723b5163
- Fix zod/v4 imports in background-task schema tests - Remove ZWSP prefix from agent-key-remapper test (fixed in #3136) - Use toMatchObject for openai-only catalog tests (fallback_models added by #3144) - Replace z.toJSONSchema (zod v4) with zodToJsonSchema (zod v3 compat) - Fix task-list.ts type narrowing for zod v3 inferred types
18 lines
631 B
TypeScript
18 lines
631 B
TypeScript
import { zodToJsonSchema } from "zod-to-json-schema"
|
|
import { OhMyOpenCodeConfigSchema } from "../src/config/schema"
|
|
|
|
export function createOhMyOpenCodeJsonSchema(): Record<string, unknown> {
|
|
const jsonSchema = zodToJsonSchema(OhMyOpenCodeConfigSchema, {
|
|
target: "jsonSchema7",
|
|
$refStrategy: "none",
|
|
})
|
|
|
|
return {
|
|
$schema: "http://json-schema.org/draft-07/schema#",
|
|
$id: "https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/dev/assets/oh-my-opencode.schema.json",
|
|
title: "Oh My OpenCode Configuration",
|
|
description: "Configuration schema for oh-my-opencode plugin",
|
|
...jsonSchema,
|
|
}
|
|
}
|