diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-08-06 01:16:55 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-09-14 19:05:59 -0400 |
commit | d88d3505ec75c3633cdd5d57058a5d290e558dfb (patch) | |
tree | 2dcab084db69b491998b51efa43d7a6b3fc65090 /src/SMAPI.Web/ViewModels/JsonValidator | |
parent | e51638948f4355c27d6b3f02d637d4ed754ccb73 (diff) | |
download | SMAPI-d88d3505ec75c3633cdd5d57058a5d290e558dfb.tar.gz SMAPI-d88d3505ec75c3633cdd5d57058a5d290e558dfb.tar.bz2 SMAPI-d88d3505ec75c3633cdd5d57058a5d290e558dfb.zip |
add error type code to HTML for convenience when adding custom error messages (#654)
Diffstat (limited to 'src/SMAPI.Web/ViewModels/JsonValidator')
-rw-r--r-- | src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorErrorModel.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorErrorModel.cs b/src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorErrorModel.cs index f9497a38..62b95501 100644 --- a/src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorErrorModel.cs +++ b/src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorErrorModel.cs @@ -1,3 +1,5 @@ +using Newtonsoft.Json.Schema; + namespace StardewModdingAPI.Web.ViewModels.JsonValidator { /// <summary>The view model for a JSON validator error.</summary> @@ -15,6 +17,9 @@ namespace StardewModdingAPI.Web.ViewModels.JsonValidator /// <summary>A human-readable description of the error.</summary> public string Message { get; set; } + /// <summary>The schema error type.</summary> + public ErrorType SchemaErrorType { get; set; } + /********* ** Public methods @@ -26,11 +31,13 @@ namespace StardewModdingAPI.Web.ViewModels.JsonValidator /// <param name="line">The line number on which the error occurred.</param> /// <param name="path">The field path in the JSON file where the error occurred.</param> /// <param name="message">A human-readable description of the error.</param> - public JsonValidatorErrorModel(int line, string path, string message) + /// <param name="schemaErrorType">The schema error type.</param> + public JsonValidatorErrorModel(int line, string path, string message, ErrorType schemaErrorType) { this.Line = line; this.Path = path; this.Message = message; + this.SchemaErrorType = schemaErrorType; } } } |