Skip to content

Commit 6ed7663

Browse files
committed
add remarks to csharp method
1 parent 3c78e29 commit 6ed7663

File tree

6 files changed

+168
-42
lines changed

6 files changed

+168
-42
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,21 @@ namespace {{packageName}}.Api
1616
{
1717
{{#operation}}
1818
/// <summary>
19-
/// {{summary}} {{notes}}
19+
/// {{summary}}
2020
/// </summary>
21+
/// <remarks>
22+
/// {{notes}}
23+
/// </remarks>
2124
{{#allParams}}/// <param name="{{paramName}}">{{description}}</param>
2225
{{/allParams}}/// <returns>{{#returnType}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}{{/returnType}}</returns>
2326
{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
2427

2528
/// <summary>
26-
/// {{summary}} {{notes}}
29+
/// {{summary}}
2730
/// </summary>
31+
/// <remarks>
32+
/// {{notes}}
33+
/// </remarks>
2834
{{#allParams}}/// <param name="{{paramName}}">{{description}}</param>
2935
{{/allParams}}/// <returns>{{#returnType}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}{{/returnType}}</returns>
3036
{{#returnType}}System.Threading.Tasks.Task<{{{returnType}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{nickname}}Async ({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});

samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs

Lines changed: 64 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,121 +15,169 @@ public interface IPetApi
1515
{
1616

1717
/// <summary>
18-
/// Update an existing pet
18+
/// Update an existing pet
1919
/// </summary>
20+
/// <remarks>
21+
///
22+
/// </remarks>
2023
/// <param name="body">Pet object that needs to be added to the store</param>
2124
/// <returns></returns>
2225
void UpdatePet (Pet body);
2326

2427
/// <summary>
25-
/// Update an existing pet
28+
/// Update an existing pet
2629
/// </summary>
30+
/// <remarks>
31+
///
32+
/// </remarks>
2733
/// <param name="body">Pet object that needs to be added to the store</param>
2834
/// <returns></returns>
2935
System.Threading.Tasks.Task UpdatePetAsync (Pet body);
3036

3137
/// <summary>
32-
/// Add a new pet to the store
38+
/// Add a new pet to the store
3339
/// </summary>
40+
/// <remarks>
41+
///
42+
/// </remarks>
3443
/// <param name="body">Pet object that needs to be added to the store</param>
3544
/// <returns></returns>
3645
void AddPet (Pet body);
3746

3847
/// <summary>
39-
/// Add a new pet to the store
48+
/// Add a new pet to the store
4049
/// </summary>
50+
/// <remarks>
51+
///
52+
/// </remarks>
4153
/// <param name="body">Pet object that needs to be added to the store</param>
4254
/// <returns></returns>
4355
System.Threading.Tasks.Task AddPetAsync (Pet body);
4456

4557
/// <summary>
46-
/// Finds Pets by status Multiple status values can be provided with comma seperated strings
58+
/// Finds Pets by status
4759
/// </summary>
60+
/// <remarks>
61+
/// Multiple status values can be provided with comma seperated strings
62+
/// </remarks>
4863
/// <param name="status">Status values that need to be considered for filter</param>
4964
/// <returns></returns>
5065
List<Pet> FindPetsByStatus (List<string> status);
5166

5267
/// <summary>
53-
/// Finds Pets by status Multiple status values can be provided with comma seperated strings
68+
/// Finds Pets by status
5469
/// </summary>
70+
/// <remarks>
71+
/// Multiple status values can be provided with comma seperated strings
72+
/// </remarks>
5573
/// <param name="status">Status values that need to be considered for filter</param>
5674
/// <returns></returns>
5775
System.Threading.Tasks.Task<List<Pet>> FindPetsByStatusAsync (List<string> status);
5876

5977
/// <summary>
60-
/// Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
78+
/// Finds Pets by tags
6179
/// </summary>
80+
/// <remarks>
81+
/// Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
82+
/// </remarks>
6283
/// <param name="tags">Tags to filter by</param>
6384
/// <returns></returns>
6485
List<Pet> FindPetsByTags (List<string> tags);
6586

6687
/// <summary>
67-
/// Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
88+
/// Finds Pets by tags
6889
/// </summary>
90+
/// <remarks>
91+
/// Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
92+
/// </remarks>
6993
/// <param name="tags">Tags to filter by</param>
7094
/// <returns></returns>
7195
System.Threading.Tasks.Task<List<Pet>> FindPetsByTagsAsync (List<string> tags);
7296

7397
/// <summary>
74-
/// Find pet by ID Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
98+
/// Find pet by ID
7599
/// </summary>
100+
/// <remarks>
101+
/// Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
102+
/// </remarks>
76103
/// <param name="petId">ID of pet that needs to be fetched</param>
77104
/// <returns>Pet</returns>
78105
Pet GetPetById (long? petId);
79106

80107
/// <summary>
81-
/// Find pet by ID Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
108+
/// Find pet by ID
82109
/// </summary>
110+
/// <remarks>
111+
/// Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
112+
/// </remarks>
83113
/// <param name="petId">ID of pet that needs to be fetched</param>
84114
/// <returns>Pet</returns>
85115
System.Threading.Tasks.Task<Pet> GetPetByIdAsync (long? petId);
86116

87117
/// <summary>
88-
/// Updates a pet in the store with form data
118+
/// Updates a pet in the store with form data
89119
/// </summary>
120+
/// <remarks>
121+
///
122+
/// </remarks>
90123
/// <param name="petId">ID of pet that needs to be updated</param>
91124
/// <param name="name">Updated name of the pet</param>
92125
/// <param name="status">Updated status of the pet</param>
93126
/// <returns></returns>
94127
void UpdatePetWithForm (string petId, string name, string status);
95128

96129
/// <summary>
97-
/// Updates a pet in the store with form data
130+
/// Updates a pet in the store with form data
98131
/// </summary>
132+
/// <remarks>
133+
///
134+
/// </remarks>
99135
/// <param name="petId">ID of pet that needs to be updated</param>
100136
/// <param name="name">Updated name of the pet</param>
101137
/// <param name="status">Updated status of the pet</param>
102138
/// <returns></returns>
103139
System.Threading.Tasks.Task UpdatePetWithFormAsync (string petId, string name, string status);
104140

105141
/// <summary>
106-
/// Deletes a pet
142+
/// Deletes a pet
107143
/// </summary>
144+
/// <remarks>
145+
///
146+
/// </remarks>
108147
/// <param name="petId">Pet id to delete</param>
109148
/// <param name="apiKey"></param>
110149
/// <returns></returns>
111150
void DeletePet (long? petId, string apiKey);
112151

113152
/// <summary>
114-
/// Deletes a pet
153+
/// Deletes a pet
115154
/// </summary>
155+
/// <remarks>
156+
///
157+
/// </remarks>
116158
/// <param name="petId">Pet id to delete</param>
117159
/// <param name="apiKey"></param>
118160
/// <returns></returns>
119161
System.Threading.Tasks.Task DeletePetAsync (long? petId, string apiKey);
120162

121163
/// <summary>
122-
/// uploads an image
164+
/// uploads an image
123165
/// </summary>
166+
/// <remarks>
167+
///
168+
/// </remarks>
124169
/// <param name="petId">ID of pet to update</param>
125170
/// <param name="additionalMetadata">Additional data to pass to server</param>
126171
/// <param name="file">file to upload</param>
127172
/// <returns></returns>
128173
void UploadFile (long? petId, string additionalMetadata, Stream file);
129174

130175
/// <summary>
131-
/// uploads an image
176+
/// uploads an image
132177
/// </summary>
178+
/// <remarks>
179+
///
180+
/// </remarks>
133181
/// <param name="petId">ID of pet to update</param>
134182
/// <param name="additionalMetadata">Additional data to pass to server</param>
135183
/// <param name="file">file to upload</param>

samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/StoreApi.cs

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,55 +15,79 @@ public interface IStoreApi
1515
{
1616

1717
/// <summary>
18-
/// Returns pet inventories by status Returns a map of status codes to quantities
18+
/// Returns pet inventories by status
1919
/// </summary>
20+
/// <remarks>
21+
/// Returns a map of status codes to quantities
22+
/// </remarks>
2023
/// <returns></returns>
2124
Dictionary<string, int?> GetInventory ();
2225

2326
/// <summary>
24-
/// Returns pet inventories by status Returns a map of status codes to quantities
27+
/// Returns pet inventories by status
2528
/// </summary>
29+
/// <remarks>
30+
/// Returns a map of status codes to quantities
31+
/// </remarks>
2632
/// <returns></returns>
2733
System.Threading.Tasks.Task<Dictionary<string, int?>> GetInventoryAsync ();
2834

2935
/// <summary>
30-
/// Place an order for a pet
36+
/// Place an order for a pet
3137
/// </summary>
38+
/// <remarks>
39+
///
40+
/// </remarks>
3241
/// <param name="body">order placed for purchasing the pet</param>
3342
/// <returns>Order</returns>
3443
Order PlaceOrder (Order body);
3544

3645
/// <summary>
37-
/// Place an order for a pet
46+
/// Place an order for a pet
3847
/// </summary>
48+
/// <remarks>
49+
///
50+
/// </remarks>
3951
/// <param name="body">order placed for purchasing the pet</param>
4052
/// <returns>Order</returns>
4153
System.Threading.Tasks.Task<Order> PlaceOrderAsync (Order body);
4254

4355
/// <summary>
44-
/// Find purchase order by ID For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
56+
/// Find purchase order by ID
4557
/// </summary>
58+
/// <remarks>
59+
/// For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
60+
/// </remarks>
4661
/// <param name="orderId">ID of pet that needs to be fetched</param>
4762
/// <returns>Order</returns>
4863
Order GetOrderById (string orderId);
4964

5065
/// <summary>
51-
/// Find purchase order by ID For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
66+
/// Find purchase order by ID
5267
/// </summary>
68+
/// <remarks>
69+
/// For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
70+
/// </remarks>
5371
/// <param name="orderId">ID of pet that needs to be fetched</param>
5472
/// <returns>Order</returns>
5573
System.Threading.Tasks.Task<Order> GetOrderByIdAsync (string orderId);
5674

5775
/// <summary>
58-
/// Delete purchase order by ID For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
76+
/// Delete purchase order by ID
5977
/// </summary>
78+
/// <remarks>
79+
/// For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
80+
/// </remarks>
6081
/// <param name="orderId">ID of the order that needs to be deleted</param>
6182
/// <returns></returns>
6283
void DeleteOrder (string orderId);
6384

6485
/// <summary>
65-
/// Delete purchase order by ID For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
86+
/// Delete purchase order by ID
6687
/// </summary>
88+
/// <remarks>
89+
/// For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
90+
/// </remarks>
6791
/// <param name="orderId">ID of the order that needs to be deleted</param>
6892
/// <returns></returns>
6993
System.Threading.Tasks.Task DeleteOrderAsync (string orderId);

0 commit comments

Comments
 (0)