using Newtonsoft.Json.Schema; namespace StardewModdingAPI.Web.ViewModels.JsonValidator { /// The view model for a JSON validator error. public class JsonValidatorErrorModel { /********* ** Accessors *********/ /// The line number on which the error occurred. public int Line { get; } /// The field path in the JSON file where the error occurred. public string? Path { get; } /// A human-readable description of the error. public string Message { get; } /// The schema error type. public ErrorType SchemaErrorType { get; } /********* ** Public methods *********/ /// Construct an instance. /// The line number on which the error occurred. /// The field path in the JSON file where the error occurred. /// A human-readable description of the error. /// The schema error type. public JsonValidatorErrorModel(int line, string? path, string message, ErrorType schemaErrorType) { this.Line = line; this.Path = path; this.Message = message; this.SchemaErrorType = schemaErrorType; } } }