mirror of
https://github.com/anomalyco/opencode.git
synced 2026-09-28 13:33:35 +08:00
fix(cli): keep generated config schema closed to unknown keys
This commit is contained in:
@@ -5,7 +5,7 @@ import { Info, SchemaURL } from "../src/config/schema"
|
||||
const target = process.argv[2]
|
||||
if (!target) throw new Error("A schema output path is required")
|
||||
|
||||
const document = Schema.toJsonSchemaDocument(Info)
|
||||
const document = Schema.toJsonSchemaDocument(Info, { onExcessProperty: "error" })
|
||||
const content = await format(
|
||||
JSON.stringify({
|
||||
$schema: "https://json-schema.org/draft/2020-12/schema",
|
||||
|
||||
Reference in New Issue
Block a user