<PackageReference Include="NJsonSchema" Version="10.0.10" />

ChildSchemaValidationError

A subschema validation error.
using Newtonsoft.Json.Linq; using System.Collections.Generic; namespace NJsonSchema.Validation { public class ChildSchemaValidationError : ValidationError { public IReadOnlyDictionary<JsonSchema, ICollection<ValidationError>> Errors { get; set; } public ChildSchemaValidationError(ValidationErrorKind kind, string property, string path, IReadOnlyDictionary<JsonSchema, ICollection<ValidationError>> errors, JToken token, JsonSchema schema) : base(kind, property, path, token, schema) { Errors = errors; } public override string ToString() { string text = $"{base.Kind}""{base.Path}"""; foreach (KeyValuePair<JsonSchema, ICollection<ValidationError>> error in Errors) { text += "{\n"; foreach (ValidationError item in error.Value) { text += string.Format(" {0}\n", item.ToString().Replace("\n", "\n ")); } text += "}\n"; } return text; } } }