docs: config schema

This commit is contained in:
Dax Raad 2025-06-14 12:22:07 -04:00
parent ef74d97491
commit 9c6aa82ac1
5 changed files with 25 additions and 8 deletions

View file

@ -51,7 +51,7 @@ Project configuration is optional. You can place an `opencode.json` file in the
```json title="opencode.json"
{
"$schema": "https://opencode.ai/schemas/opencode.json"
"$schema": "http://opencode.ai/config.json"
}
```

3
opencode.json Normal file
View file

@ -0,0 +1,3 @@
{
"$schema": "http://opencode.ai/config.json"
}

View file

@ -1,6 +1,9 @@
{
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"provider": {
"type": "object",
"additionalProperties": {
@ -69,7 +72,10 @@
"type": "number"
}
},
"required": ["context", "output"],
"required": [
"context",
"output"
],
"additionalProperties": false
},
"id": {
@ -84,7 +90,9 @@
"additionalProperties": {}
}
},
"required": ["models"],
"required": [
"models"
],
"additionalProperties": false
}
},
@ -112,7 +120,10 @@
}
}
},
"required": ["type", "command"],
"required": [
"type",
"command"
],
"additionalProperties": false
},
{
@ -126,7 +137,10 @@
"type": "string"
}
},
"required": ["type", "url"],
"required": [
"type",
"url"
],
"additionalProperties": false
}
]
@ -135,5 +149,4 @@
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}

View file

@ -111,7 +111,7 @@ if (!snapshot) {
!lower.includes("chore:") &&
!lower.includes("ci:") &&
!lower.includes("docs:") &&
!lower.includes("doc:") &&
!lower.includes("doc:")
)
})
.join("\n")

View file

@ -50,6 +50,7 @@ export namespace Config {
export const Info = z
.object({
$schema: z.string().optional(),
provider: z
.record(
ModelsDev.Provider.partial().extend({