Skip to content

Commit f521d6e

Browse files
committed
minor fix to docstring in csharp
1 parent 94f8661 commit f521d6e

File tree

10 files changed

+53
-6
lines changed

10 files changed

+53
-6
lines changed

modules/swagger-codegen/src/main/resources/csharp/Configuration.mustache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ namespace {{packageName}}.Client
2525
/// <param name="tempFolderPath">Temp folder path</param>
2626
/// <param name="dateTimeFormat">DateTime format string</param>
2727
/// <param name="timeout">HTTP connection timeout (in milliseconds)</param>
28+
/// <param name="userAgent">HTTP user agent</param>
2829
public Configuration(ApiClient apiClient = null,
2930
Dictionary<String, String> defaultHeader = null,
3031
string username = null,
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
public enum {{vendorExtensions.plainDatatypeWithEnum}} {
1+
public enum {{vendorExtensions.plainDatatypeWithEnum}} {
22
{{#allowableValues}}{{#enumVars}}
33
[EnumMember(Value = "{{jsonname}}")]
44
{{name}}{{^-last}},
55
{{/-last}}{{#-last}}{{/-last}}{{/enumVars}}{{/allowableValues}}
6-
}
6+
}

modules/swagger-codegen/src/main/resources/csharp/model.mustache

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@ namespace {{packageName}}.Model
2020
public partial class {{classname}} : {{#parent}}{{{parent}}}, {{/parent}} IEquatable<{{classname}}>
2121
{ {{#vars}}{{#isEnum}}
2222

23+
/// <summary>
24+
/// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}}
25+
/// </summary>{{#description}}
26+
/// <value>{{{description}}}</value>{{/description}}
2327
[JsonConverter(typeof(StringEnumConverter))]
24-
{{>enumClass}}{{/isEnum}}{{#items.isEnum}}{{#items}}
25-
{{>enumClass}}{{/items}}{{/items.isEnum}}{{/vars}}
28+
{{>enumClass}}{{/isEnum}}{{#items.isEnum}}{{#items}}
29+
{{>enumClass}}{{/items}}{{/items.isEnum}}{{/vars}}
2630
{{#vars}}{{#isEnum}}
2731
/// <summary>
2832
/// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}}

samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/NameTests.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,15 @@ public void _NameTest()
6060
// TODO: unit test for the property '_Name'
6161
}
6262

63+
/// <summary>
64+
/// Test the property 'SnakeCase'
65+
/// </summary>
66+
[Test]
67+
public void SnakeCaseTest()
68+
{
69+
// TODO: unit test for the property 'SnakeCase'
70+
}
71+
6372

6473
}
6574

samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/Configuration.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public class Configuration
2525
/// <param name="tempFolderPath">Temp folder path</param>
2626
/// <param name="dateTimeFormat">DateTime format string</param>
2727
/// <param name="timeout">HTTP connection timeout (in milliseconds)</param>
28+
/// <param name="userAgent">HTTP user agent</param>
2829
public Configuration(ApiClient apiClient = null,
2930
Dictionary<String, String> defaultHeader = null,
3031
string username = null,

samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/InlineResponse200.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ namespace IO.Swagger.Model
1818
public partial class InlineResponse200 : IEquatable<InlineResponse200>
1919
{
2020

21+
/// <summary>
22+
/// pet status in the store
23+
/// </summary>
24+
/// <value>pet status in the store</value>
2125
[JsonConverter(typeof(StringEnumConverter))]
2226
public enum StatusEnum {
2327

@@ -30,6 +34,7 @@ public enum StatusEnum {
3034
[EnumMember(Value = "sold")]
3135
Sold
3236
}
37+
3338

3439
/// <summary>
3540
/// pet status in the store

samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Name.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ public partial class Name : IEquatable<Name>
2323
/// Initializes a new instance of the <see cref="Name" />class.
2424
/// </summary>
2525
/// <param name="_Name">_Name.</param>
26+
/// <param name="SnakeCase">SnakeCase.</param>
2627

27-
public Name(int? _Name = null)
28+
public Name(int? _Name = null, int? SnakeCase = null)
2829
{
2930
this._Name = _Name;
31+
this.SnakeCase = SnakeCase;
3032

3133
}
3234

@@ -37,6 +39,12 @@ public Name(int? _Name = null)
3739
[DataMember(Name="name", EmitDefaultValue=false)]
3840
public int? _Name { get; set; }
3941

42+
/// <summary>
43+
/// Gets or Sets SnakeCase
44+
/// </summary>
45+
[DataMember(Name="snake_case", EmitDefaultValue=false)]
46+
public int? SnakeCase { get; set; }
47+
4048
/// <summary>
4149
/// Returns the string presentation of the object
4250
/// </summary>
@@ -46,6 +54,7 @@ public override string ToString()
4654
var sb = new StringBuilder();
4755
sb.Append("class Name {\n");
4856
sb.Append(" _Name: ").Append(_Name).Append("\n");
57+
sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n");
4958

5059
sb.Append("}\n");
5160
return sb.ToString();
@@ -87,6 +96,11 @@ public bool Equals(Name other)
8796
this._Name == other._Name ||
8897
this._Name != null &&
8998
this._Name.Equals(other._Name)
99+
) &&
100+
(
101+
this.SnakeCase == other.SnakeCase ||
102+
this.SnakeCase != null &&
103+
this.SnakeCase.Equals(other.SnakeCase)
90104
);
91105
}
92106

@@ -105,6 +119,9 @@ public override int GetHashCode()
105119
if (this._Name != null)
106120
hash = hash * 59 + this._Name.GetHashCode();
107121

122+
if (this.SnakeCase != null)
123+
hash = hash * 59 + this.SnakeCase.GetHashCode();
124+
108125
return hash;
109126
}
110127
}

samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Order.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ namespace IO.Swagger.Model
1818
public partial class Order : IEquatable<Order>
1919
{
2020

21+
/// <summary>
22+
/// Order Status
23+
/// </summary>
24+
/// <value>Order Status</value>
2125
[JsonConverter(typeof(StringEnumConverter))]
2226
public enum StatusEnum {
2327

@@ -30,6 +34,7 @@ public enum StatusEnum {
3034
[EnumMember(Value = "delivered")]
3135
Delivered
3236
}
37+
3338

3439
/// <summary>
3540
/// Order Status

samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Pet.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ namespace IO.Swagger.Model
1818
public partial class Pet : IEquatable<Pet>
1919
{
2020

21+
/// <summary>
22+
/// pet status in the store
23+
/// </summary>
24+
/// <value>pet status in the store</value>
2125
[JsonConverter(typeof(StringEnumConverter))]
2226
public enum StatusEnum {
2327

@@ -30,6 +34,7 @@ public enum StatusEnum {
3034
[EnumMember(Value = "sold")]
3135
Sold
3236
}
37+
3338

3439
/// <summary>
3540
/// pet status in the store

samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.userprefs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
33
<MonoDevelop.Ide.Workbench ActiveDocument="TestPet.cs">
44
<Files>
5-
<File FileName="TestPet.cs" Line="218" Column="47" />
5+
<File FileName="TestPet.cs" Line="23" Column="17" />
66
<File FileName="TestOrder.cs" Line="1" Column="1" />
77
</Files>
88
</MonoDevelop.Ide.Workbench>

0 commit comments

Comments
 (0)