From c336af9cf8bb675766884d1630ce386d97e64082 Mon Sep 17 00:00:00 2001
From: Petr Spacek
Date: Tue, 7 May 2024 09:27:46 +0200
Subject: [PATCH] fix: not schema error message
---
src/languageservice/parser/jsonParser07.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/languageservice/parser/jsonParser07.ts b/src/languageservice/parser/jsonParser07.ts
index b4fdfe4b..c35b2132 100644
--- a/src/languageservice/parser/jsonParser07.ts
+++ b/src/languageservice/parser/jsonParser07.ts
@@ -724,7 +724,7 @@ function validate(
validationResult.problems.push({
location: { offset: node.offset, length: node.length },
severity: DiagnosticSeverity.Warning,
- message: localize('notSchemaWarning', 'Matches a schema that is not allowed.'),
+ message: notSchema.errorMessage || localize('notSchemaWarning', 'Matches a schema that is not allowed.'),
source: getSchemaSource(schema, originalSchema),
schemaUri: getSchemaUri(schema, originalSchema),
});