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

ChildSchemaValidationError

A subschema validation error.
using Newtonsoft.Json.Linq; using System.Collections.Generic; namespace NJsonSchema.Validation { public class ChildSchemaValidationError : ValidationError { public IDictionary<JsonSchema4, ICollection<ValidationError>> Errors { get; set; } public ChildSchemaValidationError(ValidationErrorKind kind, string property, string path, IDictionary<JsonSchema4, ICollection<ValidationError>> errors, JToken token, JsonSchema4 schema) : base(kind, property, path, token, schema) { Errors = errors; } public override string ToString() { string text = $"{base.Kind}""{base.Path}"""; foreach (KeyValuePair<JsonSchema4, 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; } } }