From f6edae9494ef41f8a318dc8904f59febe3c2348e Mon Sep 17 00:00:00 2001 From: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> Date: Wed, 22 Jul 2026 23:34:17 -0400 Subject: [PATCH 1/2] Migrated to draft-07 Signed-off-by: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> --- src/schema-validation.jsonc | 3 --- src/schemas/json/staticwebapp.config.json | 4 ++-- src/schemas/json/swa-cli.config.json | 6 +++--- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/schema-validation.jsonc b/src/schema-validation.jsonc index de4bb92d48f..d3bf14df2b8 100644 --- a/src/schema-validation.jsonc +++ b/src/schema-validation.jsonc @@ -1571,9 +1571,6 @@ "pep561-stub-name" ] }, - "staticwebapp.config.json": { - "unknownKeywords": ["examples"] - }, "template.json": { "unknownKeywords": ["deprecationMessage", "sources"] }, diff --git a/src/schemas/json/staticwebapp.config.json b/src/schemas/json/staticwebapp.config.json index e1e462a325f..7b03cc57ea7 100644 --- a/src/schemas/json/staticwebapp.config.json +++ b/src/schemas/json/staticwebapp.config.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/staticwebapp.config.json", "additionalProperties": false, "default": { "navigationFallback": { @@ -438,7 +439,6 @@ } }, "description": "Documentation: https://aka.ms/swa/config-schema", - "id": "https://json.schemastore.org/staticwebapp.config.json", "properties": { "$schema": { "type": "string", diff --git a/src/schemas/json/swa-cli.config.json b/src/schemas/json/swa-cli.config.json index 86024ab14bc..c4ec31030de 100644 --- a/src/schemas/json/swa-cli.config.json +++ b/src/schemas/json/swa-cli.config.json @@ -16,7 +16,7 @@ "type": "number" }, "apiPrefix": { - "enum": ["api"], + "const": "api", "type": "string" }, "appArtifactLocation": { @@ -68,11 +68,11 @@ "type": "string" }, "swaConfigFilename": { - "enum": ["staticwebapp.config.json"], + "const": "staticwebapp.config.json", "type": "string" }, "swaConfigFilenameLegacy": { - "enum": ["routes.json"], + "const": "routes.json", "type": "string" }, "swaConfigLocation": { From 230c973796299d54948fab5458830d19b5513842 Mon Sep 17 00:00:00 2001 From: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> Date: Wed, 22 Jul 2026 23:35:10 -0400 Subject: [PATCH 2/2] Enabled strict validation Signed-off-by: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> --- src/schema-validation.jsonc | 1 - src/schemas/json/staticwebapp.config.json | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schema-validation.jsonc b/src/schema-validation.jsonc index d3bf14df2b8..1ab73f07051 100644 --- a/src/schema-validation.jsonc +++ b/src/schema-validation.jsonc @@ -230,7 +230,6 @@ "solidaritySchema.json", "sprite.json", "stale.json", - "staticwebapp.config.json", "stylelintrc.json", "taurus.json", "template.json", diff --git a/src/schemas/json/staticwebapp.config.json b/src/schemas/json/staticwebapp.config.json index 7b03cc57ea7..d67cff498c1 100644 --- a/src/schemas/json/staticwebapp.config.json +++ b/src/schemas/json/staticwebapp.config.json @@ -348,6 +348,7 @@ "type": "object", "patternProperties": { ".*": { + "type": "object", "required": ["registration", "login"], "properties": { "enabled": {