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; set; }
/// The field path in the JSON file where the error occurred.
public string Path { get; set; }
/// A human-readable description of the error.
public string Message { get; set; }
/// The schema error type.
public ErrorType SchemaErrorType { get; set; }
/*********
** Public methods
*********/
/// Construct an instance.
public JsonValidatorErrorModel() { }
/// 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;
}
}
}