Skip to content

Commit 9c6aa82

Browse files
committed
docs: config schema
1 parent ef74d97 commit 9c6aa82

5 files changed

Lines changed: 25 additions & 8 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Project configuration is optional. You can place an `opencode.json` file in the
5151

5252
```json title="opencode.json"
5353
{
54-
"$schema": "https://opencode.ai/schemas/opencode.json"
54+
"$schema": "http://opencode.ai/config.json"
5555
}
5656
```
5757

opencode.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"$schema": "http://opencode.ai/config.json"
3+
}

packages/opencode/config.schema.json

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"type": "object",
33
"properties": {
4+
"$schema": {
5+
"type": "string"
6+
},
47
"provider": {
58
"type": "object",
69
"additionalProperties": {
@@ -69,7 +72,10 @@
6972
"type": "number"
7073
}
7174
},
72-
"required": ["context", "output"],
75+
"required": [
76+
"context",
77+
"output"
78+
],
7379
"additionalProperties": false
7480
},
7581
"id": {
@@ -84,7 +90,9 @@
8490
"additionalProperties": {}
8591
}
8692
},
87-
"required": ["models"],
93+
"required": [
94+
"models"
95+
],
8896
"additionalProperties": false
8997
}
9098
},
@@ -112,7 +120,10 @@
112120
}
113121
}
114122
},
115-
"required": ["type", "command"],
123+
"required": [
124+
"type",
125+
"command"
126+
],
116127
"additionalProperties": false
117128
},
118129
{
@@ -126,7 +137,10 @@
126137
"type": "string"
127138
}
128139
},
129-
"required": ["type", "url"],
140+
"required": [
141+
"type",
142+
"url"
143+
],
130144
"additionalProperties": false
131145
}
132146
]
@@ -135,5 +149,4 @@
135149
},
136150
"additionalProperties": false,
137151
"$schema": "http://json-schema.org/draft-07/schema#"
138-
}
139-
152+
}

packages/opencode/script/publish.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ if (!snapshot) {
111111
!lower.includes("chore:") &&
112112
!lower.includes("ci:") &&
113113
!lower.includes("docs:") &&
114-
!lower.includes("doc:") &&
114+
!lower.includes("doc:")
115115
)
116116
})
117117
.join("\n")

packages/opencode/src/config/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export namespace Config {
5050

5151
export const Info = z
5252
.object({
53+
$schema: z.string().optional(),
5354
provider: z
5455
.record(
5556
ModelsDev.Provider.partial().extend({

0 commit comments

Comments
 (0)