diff --git a/ext/data/schemas/default-options-overrides-schema.json b/ext/data/schemas/default-options-overrides-schema.json new file mode 100644 index 0000000000..4fd3b751ef --- /dev/null +++ b/ext/data/schemas/default-options-overrides-schema.json @@ -0,0 +1,44 @@ +{ + "$id": "defaultOptionsOverride", + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "Contains data for recommended default options overrides by language.", + "type": "object", + "patternProperties": { + "^.{2,}$": { + "type": "array", + "items": { + "type": "object", + "required": [ + "path", + "value" + ], + "properties": { + "path": { + "type": "string", + "minLength": 2 + }, + "value": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } + } + } + } + } +} diff --git a/test/data/json.json b/test/data/json.json index 9fdda0b86b..ee6079d23f 100644 --- a/test/data/json.json +++ b/test/data/json.json @@ -98,6 +98,11 @@ "typeFile": "types/test/json.d.ts", "type": "AjvSchema" }, + { + "path": "ext/data/schemas/default-options-overrides-schema.json", + "typeFile": "types/test/json.d.ts", + "type": "AjvSchema" + }, { "path": "test/data/translator-test-inputs.json", "typeFile": "types/test/translator.d.ts", @@ -192,6 +197,12 @@ "typeFile": "types/ext/dictionary-recommended.d.ts", "type": "RecommendedDictionaries", "schema": "ext/data/schemas/recommended-dictionaries-schema.json" + }, + { + "path": "ext/data/default-options-overrides.json", + "typeFile": "types/ext/settings-controller.d.ts", + "type": "LanguageSettingOverrides", + "schema": "ext/data/schemas/default-options-overrides-schema.json" } ] }