From 9aaf6a575af6fc834389e27ba70531d9292789a5 Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 19 Feb 2024 21:07:15 +0100 Subject: [PATCH] add titles and descriptions to the schema --- data/bangs.schema.json | 48 ++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/data/bangs.schema.json b/data/bangs.schema.json index cc2e106..00d310c 100644 --- a/data/bangs.schema.json +++ b/data/bangs.schema.json @@ -1,12 +1,35 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Generated schema for Root", + "title": "Kagi Bangs Schema", + "description": "This schema defines the structure for bangs used by Kagi Search", "type": "array", "items": { "type": "object", "properties": { + "s": { + "type": "string", + "title": "Website Name", + "description": "The name of the website associated with the bang." + }, + "d": { + "type": "string", + "title": "Domain", + "description": "The domain name of the website." + }, + "t": { + "type": "string", + "title": "Trigger", + "description": "The specific trigger word or phrase used to invoke the bang." + }, + "u": { + "type": "string", + "title": "Template URL", + "description": "The URL template to use when the bang is invoked, where `{{{s}}}` is replaced by the user's query." + }, "c": { "type": "string", + "title": "Category", + "description": "The category of the website, if applicable.", "enum": [ "Entertainment", "Man Page", @@ -19,23 +42,15 @@ "Translation" ] }, - "d": { - "type": "string" - }, - "s": { - "type": "string" - }, "sc": { - "type": "string" - }, - "t": { - "type": "string" - }, - "u": { - "type": "string" + "type": "string", + "title": "Subcategory", + "description": "The subcategory of the website, if applicable." }, "fmt": { "type": "array", + "title": "Format", + "description": "The format flags indicating how the query should be processed.", "uniqueItems": true, "minItems": 0, "maxItems": 3, @@ -54,6 +69,7 @@ "s", "t", "u" - ] + ], + "additionalProperties": false } -} +} \ No newline at end of file