From 3eee23fdb68d0486a55cd47063a89df48121257f Mon Sep 17 00:00:00 2001 From: Tony Han Date: Mon, 24 Jun 2024 21:23:46 +0800 Subject: [PATCH 1/2] Update JsonPathUtilities.cs --- src/NJsonSchema/JsonPathUtilities.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/NJsonSchema/JsonPathUtilities.cs b/src/NJsonSchema/JsonPathUtilities.cs index e83462399..a3b236b9e 100644 --- a/src/NJsonSchema/JsonPathUtilities.cs +++ b/src/NJsonSchema/JsonPathUtilities.cs @@ -63,8 +63,10 @@ public static class JsonPathUtilities if (mappings.Any(p => p.Value == null)) { + var errorItems = mappings.Where(p => p.Value == null).Select(x => x.Key.GetType().FullName); throw new InvalidOperationException("Could not find the JSON path of a referenced schema: " + - "Manually referenced schemas must be added to the " + + string.Join(",", errorItems) + + ",Manually referenced schemas must be added to the " + "'Definitions' of a parent schema."); } @@ -177,4 +179,4 @@ private static bool FindJsonPaths(object obj, Dictionary search return false; } } -} \ No newline at end of file +} From 665b9aa9bd1c6f55f96e0e50d39da9f086271a37 Mon Sep 17 00:00:00 2001 From: Tony Han Date: Thu, 18 Jul 2024 01:20:43 +0800 Subject: [PATCH 2/2] Update src/NJsonSchema/JsonPathUtilities.cs Co-authored-by: Rico Suter --- src/NJsonSchema/JsonPathUtilities.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NJsonSchema/JsonPathUtilities.cs b/src/NJsonSchema/JsonPathUtilities.cs index a3b236b9e..6d1bf0dd4 100644 --- a/src/NJsonSchema/JsonPathUtilities.cs +++ b/src/NJsonSchema/JsonPathUtilities.cs @@ -66,7 +66,7 @@ public static class JsonPathUtilities var errorItems = mappings.Where(p => p.Value == null).Select(x => x.Key.GetType().FullName); throw new InvalidOperationException("Could not find the JSON path of a referenced schema: " + string.Join(",", errorItems) + - ",Manually referenced schemas must be added to the " + + ". Manually referenced schemas must be added to the " + "'Definitions' of a parent schema."); }