From e7ddf9fbc8760c3fbd10e9540aea98fd38d5ba11 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Tue, 10 Jun 2025 18:15:58 -0400 Subject: [PATCH] Move hmm schema to its own file. --- .vscode/schema/hmm.json | 66 ++++++++++++++++++++++++++++++++++++++++ .vscode/settings.json | 67 +---------------------------------------- 2 files changed, 67 insertions(+), 66 deletions(-) create mode 100644 .vscode/schema/hmm.json diff --git a/.vscode/schema/hmm.json b/.vscode/schema/hmm.json new file mode 100644 index 000000000..bc48a2c21 --- /dev/null +++ b/.vscode/schema/hmm.json @@ -0,0 +1,66 @@ +{ + "type": "object", + "properties": { + "dependencies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "description": "The name of the Haxe library" + }, + "type": { + "title": "Type", + "type": "string", + "description": "one of haxelib, git, hg, or dev", + "enum": ["haxelib", "git", "hg", "dev"] + }, + "ref": { + "type": "string", + "description": "the git/hg ref (branch, commit, tag, etc.)" + }, + "url": { + "title": "URL", + "type": "string", + "description": "the git/hg URL" + }, + "version": { + "title": "Version", + "type": "string", + "description": "the haxelib library version. Must be in SemVer format (MAJOR.MINOR.PATCH)", + "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$" + } + }, + "required": ["name", "type"], + "dependentSchemas": { + "type": { + "if": { + "properties": { + "type": { + "const": "git" + } + } + }, + "then": { + "required": ["url"] + }, + "else": { + "if": { + "properties": { + "type": { + "const": "haxelib" + } + } + }, + "then": { + "required": ["version"] + } + } + } + } + } + } + } +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 0117bf47d..14bf5d11e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -232,72 +232,7 @@ "json.schemas": [ { "fileMatch": ["/hmm.json"], - "schema": { - "type": "object", - "properties": { - "dependencies": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "title": "Name", - "type": "string", - "description": "The name of the Haxe library" - }, - "type": { - "title": "Type", - "type": "string", - "description": "one of haxelib, git, hg, or dev", - "enum": ["haxelib", "git", "hg", "dev"] - }, - "ref": { - "type": "string", - "description": "the git/hg ref (branch, commit, tag, etc.)" - }, - "url": { - "title": "URL", - "type": "string", - "description": "the git/hg URL" - }, - "version": { - "title": "Version", - "type": "string", - "description": "the haxelib library version. Must be in SemVer format (MAJOR.MINOR.PATCH)", - "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$" - } - }, - "required": ["name", "type"], - "dependentSchemas": { - "type": { - "if": { - "properties": { - "type": { - "const": "git" - } - } - }, - "then": { - "required": ["url"] - }, - "else": { - "if": { - "properties": { - "type": { - "const": "haxelib" - } - } - }, - "then": { - "required": ["version"] - } - } - } - } - } - } - } - } + "url": "./.vscode/schema/hmm.json" } ] }