diff --git a/src/NJsonSchema/JsonPathUtilities.cs b/src/NJsonSchema/JsonPathUtilities.cs index e83462399..6d1bf0dd4 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 +}