mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-24 20:14:44 -07:00
fix: Add $schema property to settings.schema.json (#12763)
Co-authored-by: cornmander <shikhman@google.com>
This commit is contained in:
@@ -6,6 +6,12 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"$schema": {
|
||||||
|
"title": "Schema",
|
||||||
|
"description": "The URL of the JSON schema for this settings file. Used by editors for validation and autocompletion.",
|
||||||
|
"type": "string",
|
||||||
|
"default": "https://raw.githubusercontent.com/google-gemini/gemini-cli/main/schemas/settings.schema.json"
|
||||||
|
},
|
||||||
"mcpServers": {
|
"mcpServers": {
|
||||||
"title": "MCP Servers",
|
"title": "MCP Servers",
|
||||||
"description": "Configuration for MCP servers.",
|
"description": "Configuration for MCP servers.",
|
||||||
|
|||||||
@@ -120,6 +120,14 @@ function buildSchemaObject(schema: SettingsSchemaType): JsonSchema {
|
|||||||
properties: {},
|
properties: {},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
root.properties!['$schema'] = {
|
||||||
|
title: 'Schema',
|
||||||
|
description:
|
||||||
|
'The URL of the JSON schema for this settings file. Used by editors for validation and autocompletion.',
|
||||||
|
type: 'string',
|
||||||
|
default: SCHEMA_ID,
|
||||||
|
};
|
||||||
|
|
||||||
for (const [key, definition] of Object.entries(schema)) {
|
for (const [key, definition] of Object.entries(schema)) {
|
||||||
root.properties![key] = buildSettingSchema(definition, [key], defs);
|
root.properties![key] = buildSettingSchema(definition, [key], defs);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user