diff --git a/Rest.Net.Example/Program.cs b/Rest.Net.Example/Program.cs index 30997a8..2dd34d1 100644 --- a/Rest.Net.Example/Program.cs +++ b/Rest.Net.Example/Program.cs @@ -50,7 +50,7 @@ namespace MontoyaTech.Rest.Net.Example public string[] Array = null; - public ulong Property { get; set; } + public ulong? Property { get; set; } public User() { } diff --git a/Rest.Net/Rest.Net.csproj b/Rest.Net/Rest.Net.csproj index f56033e..a15e711 100644 --- a/Rest.Net/Rest.Net.csproj +++ b/Rest.Net/Rest.Net.csproj @@ -17,7 +17,7 @@ MontoyaTech.Rest.Net MontoyaTech.Rest.Net True - 1.9.3 + 1.9.4 Logo_Symbol_Black_Outline.png README.md diff --git a/Rest.Net/RestJavascriptClientGenerator.cs b/Rest.Net/RestJavascriptClientGenerator.cs index 5c58afb..5b53fbe 100644 --- a/Rest.Net/RestJavascriptClientGenerator.cs +++ b/Rest.Net/RestJavascriptClientGenerator.cs @@ -185,8 +185,12 @@ namespace MontoyaTech.Rest.Net protected internal override string GetTypeFullyResolvedName(Type type) { var typeCode = Type.GetTypeCode(type); - - if (typeof(Array).IsAssignableFrom(type)) + + if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>)) + { + return $"?{GetTypeFullyResolvedName(Nullable.GetUnderlyingType(type))}"; + } + else if (typeof(Array).IsAssignableFrom(type)) { return $"Array<{this.GetTypeFullyResolvedName(type.GetElementType())}>"; }