diff --git a/Rest.Net/Rest.Net.csproj b/Rest.Net/Rest.Net.csproj
index 3c33dd9..15d02b1 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.1
+ 1.9.2
Logo_Symbol_Black_Outline.png
README.md
diff --git a/Rest.Net/RestJavascriptClientGenerator.cs b/Rest.Net/RestJavascriptClientGenerator.cs
index 344f40e..3256d89 100644
--- a/Rest.Net/RestJavascriptClientGenerator.cs
+++ b/Rest.Net/RestJavascriptClientGenerator.cs
@@ -81,8 +81,8 @@ namespace MontoyaTech.Rest.Net
writer.WriteBreak().WriteLine("/**").Indent();
writer.WriteLine("Initializes this api client with a given baseUrl of where to send requests.");
writer.WriteLine("@param {string} baseUrl Base url of the server to make requests against.");
- writer.WriteLine("@param {Function} urlHandler An optional function to process request urls before they are sent. This must return the url.");
- writer.WriteLine("@param {Function} requestHandler An optional function to process requests before they are sent. This must return the request.");
+ writer.WriteLine("@param {Function} urlHandler An optional function to process request urls before they are sent. This must return the url. Default is null.");
+ writer.WriteLine("@param {Function} requestHandler An optional function to process requests before they are sent. This must return the request. Default is null.");
writer.Outdent().WriteLine("*/");
if (this.NamedParameters)
writer.Write("static Init({ baseUrl, urlHandler = null, requestHandler = null } = {}) ");
@@ -116,8 +116,8 @@ namespace MontoyaTech.Rest.Net
writer.WriteBreak().WriteLine("/**").Indent();
writer.WriteLine("Initializes this api client with a given baseUrl of where to send requests.");
writer.WriteLine("@param {string} baseUrl Base url of the server to make requests against.");
- writer.WriteLine("@param {Function} urlHandler An optional function to process request urls before they are sent. This must return the url.");
- writer.WriteLine("@param {Function} requestHandler An optional function to process requests before they are sent. This must return the request.");
+ writer.WriteLine("@param {Function} urlHandler An optional function to process request urls before they are sent. This must return the url. Default is null.");
+ writer.WriteLine("@param {Function} requestHandler An optional function to process requests before they are sent. This must return the request. Default is null.");
writer.Outdent().WriteLine("*/");
if (this.NamedParameters)
writer.Write("constructor({ baseUrl, urlHandler = null, requestHandler = null } = {}) ");
@@ -370,18 +370,22 @@ namespace MontoyaTech.Rest.Net
foreach (var field in fields)
{
if (this.UseJsonNames)
- writer.WriteLine($"@param {{{this.GetTypeFullyResolvedName(field.FieldType)}}} {EscapeName(field.GetCustomAttribute()?.PropertyName ?? field.Name)}");
+ writer.Write($"@param {{{this.GetTypeFullyResolvedName(field.FieldType)}}} {EscapeName(field.GetCustomAttribute()?.PropertyName ?? field.Name)}");
else
- writer.WriteLine($"@param {{{this.GetTypeFullyResolvedName(field.FieldType)}}} {EscapeName(field.Name)}");
+ writer.Write($"@param {{{this.GetTypeFullyResolvedName(field.FieldType)}}} {EscapeName(field.Name)}");
+
+ writer.WriteSpacer().Write("Default is ").Write(this.GetTypeDefaultValue(field.FieldType)).WriteLine('.');
}
//Document the properties
foreach (var property in properties)
{
if (this.UseJsonNames)
- writer.WriteLine($"@param {{{this.GetTypeFullyResolvedName(property.PropertyType)}}} {EscapeName(property.GetCustomAttribute()?.PropertyName ?? property.Name)}");
+ writer.Write($"@param {{{this.GetTypeFullyResolvedName(property.PropertyType)}}} {EscapeName(property.GetCustomAttribute()?.PropertyName ?? property.Name)}");
else
- writer.WriteLine($"@param {{{this.GetTypeFullyResolvedName(property.PropertyType)}}} {EscapeName(property.Name)}");
+ writer.Write($"@param {{{this.GetTypeFullyResolvedName(property.PropertyType)}}} {EscapeName(property.Name)}");
+
+ writer.WriteSpacer().Write("Default is ").Write(this.GetTypeDefaultValue(property.PropertyType)).WriteLine('.');
}
writer.Outdent().WriteLine("*/");