summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorErrorModel.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-12 19:15:39 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-12 19:15:39 -0400
commit0b48c1748b354458059c7607415288de072b01e9 (patch)
treef63fd950f565d363414eb692be9024895cdea174 /src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorErrorModel.cs
parent9fbed0fa1f28a9b0fe0b952a78b10e2d475adb03 (diff)
downloadSMAPI-0b48c1748b354458059c7607415288de072b01e9.tar.gz
SMAPI-0b48c1748b354458059c7607415288de072b01e9.tar.bz2
SMAPI-0b48c1748b354458059c7607415288de072b01e9.zip
enable nullable annotations in the web project & related code (#837)
Diffstat (limited to 'src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorErrorModel.cs')
-rw-r--r--src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorErrorModel.cs15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorErrorModel.cs b/src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorErrorModel.cs
index 3c63b730..4d37d449 100644
--- a/src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorErrorModel.cs
+++ b/src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorErrorModel.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using Newtonsoft.Json.Schema;
namespace StardewModdingAPI.Web.ViewModels.JsonValidator
@@ -11,30 +9,27 @@ namespace StardewModdingAPI.Web.ViewModels.JsonValidator
** Accessors
*********/
/// <summary>The line number on which the error occurred.</summary>
- public int Line { get; set; }
+ public int Line { get; }
/// <summary>The field path in the JSON file where the error occurred.</summary>
- public string Path { get; set; }
+ public string? Path { get; }
/// <summary>A human-readable description of the error.</summary>
- public string Message { get; set; }
+ public string Message { get; }
/// <summary>The schema error type.</summary>
- public ErrorType SchemaErrorType { get; set; }
+ public ErrorType SchemaErrorType { get; }
/*********
** Public methods
*********/
/// <summary>Construct an instance.</summary>
- public JsonValidatorErrorModel() { }
-
- /// <summary>Construct an instance.</summary>
/// <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>
/// <param name="schemaErrorType">The schema error type.</param>
- public JsonValidatorErrorModel(int line, string path, string message, ErrorType schemaErrorType)
+ public JsonValidatorErrorModel(int line, string? path, string message, ErrorType schemaErrorType)
{
this.Line = line;
this.Path = path;