Skip to content

Commit 035939f

Browse files
committed
Merge Commit '2b41263': fix: Add $schema property to settings.schema.json (google-gemini#12763)
2 parents 90b87e9 + 2b41263 commit 035939f

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

schemas/settings.schema.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
"type": "object",
77
"additionalProperties": false,
88
"properties": {
9+
"$schema": {
10+
"title": "Schema",
11+
"description": "The URL of the JSON schema for this settings file. Used by editors for validation and autocompletion.",
12+
"type": "string",
13+
"default": "https://raw.githubusercontent.com/google-gemini/gemini-cli/main/schemas/settings.schema.json"
14+
},
915
"mcpServers": {
1016
"title": "MCP Servers",
1117
"description": "Configuration for MCP servers.",

scripts/generate-settings-schema.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,14 @@ function buildSchemaObject(schema: SettingsSchemaType): JsonSchema {
120120
properties: {},
121121
};
122122

123+
root.properties!['$schema'] = {
124+
title: 'Schema',
125+
description:
126+
'The URL of the JSON schema for this settings file. Used by editors for validation and autocompletion.',
127+
type: 'string',
128+
default: SCHEMA_ID,
129+
};
130+
123131
for (const [key, definition] of Object.entries(schema)) {
124132
root.properties![key] = buildSettingSchema(definition, [key], defs);
125133
}

0 commit comments

Comments
 (0)