summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorRequestModel.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/JsonValidatorRequestModel.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/JsonValidatorRequestModel.cs')
-rw-r--r--src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorRequestModel.cs19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorRequestModel.cs b/src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorRequestModel.cs
index 43114d94..3edb58db 100644
--- a/src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorRequestModel.cs
+++ b/src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorRequestModel.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
namespace StardewModdingAPI.Web.ViewModels.JsonValidator
{
/// <summary>The view model for a JSON validation request.</summary>
@@ -9,9 +7,22 @@ namespace StardewModdingAPI.Web.ViewModels.JsonValidator
** Accessors
*********/
/// <summary>The schema name with which to validate the JSON.</summary>
- public string SchemaName { get; set; }
+ public string SchemaName { get; }
/// <summary>The raw content to validate.</summary>
- public string Content { get; set; }
+ public string Content { get; }
+
+
+ /*********
+ ** Accessors
+ *********/
+ /// <summary>Construct an instance.</summary>
+ /// <param name="schemaName">The schema name with which to validate the JSON.</param>
+ /// <param name="content">The raw content to validate.</param>
+ public JsonValidatorRequestModel(string schemaName, string content)
+ {
+ this.SchemaName = schemaName;
+ this.Content = content;
+ }
}
}