Skip to content

Commit bb3bd0d

Browse files
committed
regenerated clients
1 parent 16eb944 commit bb3bd0d

File tree

19 files changed

+232
-267
lines changed

19 files changed

+232
-267
lines changed

samples/client/petstore/csharp/src/Com/Wordnik/Petstore/Api/PetApi.cs

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,38 @@ public String getBasePath() {
2121
return basePath;
2222
}
2323

24+
/// <summary>
25+
/// uploads an image
26+
/// </summary>
27+
/// <param name="additionalMetadata">Additional data to pass to server</param>
28+
/// <param name="body">file to upload</param>
29+
/// <returns></returns>
30+
public void uploadFile (string additionalMetadata, File body) {
31+
// create path and map variables
32+
var path = "/pet/uploadImage".Replace("{format}","json");
33+
34+
// query params
35+
var queryParams = new Dictionary<String, String>();
36+
var headerParams = new Dictionary<String, String>();
37+
38+
string paramStr = null;
39+
try {
40+
var response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
41+
if(response != null){
42+
return ;
43+
}
44+
else {
45+
return ;
46+
}
47+
} catch (ApiException ex) {
48+
if(ex.ErrorCode == 404) {
49+
return ;
50+
}
51+
else {
52+
throw ex;
53+
}
54+
}
55+
}
2456
/// <summary>
2557
/// Find pet by ID Returns a pet based on ID
2658
/// </summary>
@@ -97,7 +129,7 @@ public void deletePet (string petId) {
97129
/// <param name="petId">ID of pet that needs to be fetched</param>
98130
/// <param name="body">Pet object that needs to be added to the store</param>
99131
/// <returns></returns>
100-
public Array<Pet> partialUpdate (string petId, Pet body) {
132+
public List<Pet> partialUpdate (string petId, Pet body) {
101133
// create path and map variables
102134
var path = "/pet/{petId}".Replace("{format}","json").Replace("{" + "petId" + "}", apiInvoker.escapeString(petId.ToString()));
103135

@@ -113,7 +145,7 @@ public Array<Pet> partialUpdate (string petId, Pet body) {
113145
try {
114146
var response = apiInvoker.invokeAPI(basePath, path, "PATCH", queryParams, body, headerParams);
115147
if(response != null){
116-
return (Array<Pet>) ApiInvoker.deserialize(response, typeof(Array<Pet>));
148+
return (List<Pet>) ApiInvoker.deserialize(response, typeof(List<Pet>));
117149
}
118150
else {
119151
return null;
@@ -165,38 +197,6 @@ public void updatePetWithForm (string petId, string name, string status) {
165197
}
166198
}
167199
/// <summary>
168-
/// uploads an image
169-
/// </summary>
170-
/// <param name="additionalMetadata">Additional data to pass to server</param>
171-
/// <param name="body">file to upload</param>
172-
/// <returns></returns>
173-
public void uploadFile (string additionalMetadata, File body) {
174-
// create path and map variables
175-
var path = "/pet/uploadImage".Replace("{format}","json");
176-
177-
// query params
178-
var queryParams = new Dictionary<String, String>();
179-
var headerParams = new Dictionary<String, String>();
180-
181-
string paramStr = null;
182-
try {
183-
var response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, body, headerParams);
184-
if(response != null){
185-
return ;
186-
}
187-
else {
188-
return ;
189-
}
190-
} catch (ApiException ex) {
191-
if(ex.ErrorCode == 404) {
192-
return ;
193-
}
194-
else {
195-
throw ex;
196-
}
197-
}
198-
}
199-
/// <summary>
200200
/// Add a new pet to the store
201201
/// </summary>
202202
/// <param name="body">Pet object that needs to be added to the store</param>
@@ -271,7 +271,7 @@ public void updatePet (Pet body) {
271271
/// </summary>
272272
/// <param name="status">Status values that need to be considered for filter</param>
273273
/// <returns></returns>
274-
public Array<Pet> findPetsByStatus (string status) {
274+
public List<Pet> findPetsByStatus (string status) {
275275
// create path and map variables
276276
var path = "/pet/findByStatus".Replace("{format}","json");
277277

@@ -291,7 +291,7 @@ public Array<Pet> findPetsByStatus (string status) {
291291
try {
292292
var response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
293293
if(response != null){
294-
return (Array<Pet>) ApiInvoker.deserialize(response, typeof(Array<Pet>));
294+
return (List<Pet>) ApiInvoker.deserialize(response, typeof(List<Pet>));
295295
}
296296
else {
297297
return null;
@@ -310,7 +310,7 @@ public Array<Pet> findPetsByStatus (string status) {
310310
/// </summary>
311311
/// <param name="tags">Tags to filter by</param>
312312
/// <returns></returns>
313-
public Array<Pet> findPetsByTags (string tags) {
313+
public List<Pet> findPetsByTags (string tags) {
314314
// create path and map variables
315315
var path = "/pet/findByTags".Replace("{format}","json");
316316

@@ -330,7 +330,7 @@ public Array<Pet> findPetsByTags (string tags) {
330330
try {
331331
var response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
332332
if(response != null){
333-
return (Array<Pet>) ApiInvoker.deserialize(response, typeof(Array<Pet>));
333+
return (List<Pet>) ApiInvoker.deserialize(response, typeof(List<Pet>));
334334
}
335335
else {
336336
return null;

samples/client/petstore/csharp/src/Com/Wordnik/Petstore/Api/StoreApi.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ public String getBasePath() {
2222
}
2323

2424
/// <summary>
25-
/// Find purchase order by ID For valid response try integer IDs with value &lt;= 5. Anything above 5 or nonintegers will generate API errors
25+
/// Delete purchase order by ID For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
2626
/// </summary>
27-
/// <param name="orderId">ID of pet that needs to be fetched</param>
27+
/// <param name="orderId">ID of the order that needs to be deleted</param>
2828
/// <returns></returns>
29-
public Order getOrderById (string orderId) {
29+
public void deleteOrder (string orderId) {
3030
// create path and map variables
3131
var path = "/store/order/{orderId}".Replace("{format}","json").Replace("{" + "orderId" + "}", apiInvoker.escapeString(orderId.ToString()));
3232

@@ -40,28 +40,28 @@ public Order getOrderById (string orderId) {
4040
}
4141
string paramStr = null;
4242
try {
43-
var response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
43+
var response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams);
4444
if(response != null){
45-
return (Order) ApiInvoker.deserialize(response, typeof(Order));
45+
return ;
4646
}
4747
else {
48-
return null;
48+
return ;
4949
}
5050
} catch (ApiException ex) {
5151
if(ex.ErrorCode == 404) {
52-
return null;
52+
return ;
5353
}
5454
else {
5555
throw ex;
5656
}
5757
}
5858
}
5959
/// <summary>
60-
/// Delete purchase order by ID For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
60+
/// Find purchase order by ID For valid response try integer IDs with value &lt;= 5. Anything above 5 or nonintegers will generate API errors
6161
/// </summary>
62-
/// <param name="orderId">ID of the order that needs to be deleted</param>
62+
/// <param name="orderId">ID of pet that needs to be fetched</param>
6363
/// <returns></returns>
64-
public void deleteOrder (string orderId) {
64+
public Order getOrderById (string orderId) {
6565
// create path and map variables
6666
var path = "/store/order/{orderId}".Replace("{format}","json").Replace("{" + "orderId" + "}", apiInvoker.escapeString(orderId.ToString()));
6767

@@ -75,16 +75,16 @@ public void deleteOrder (string orderId) {
7575
}
7676
string paramStr = null;
7777
try {
78-
var response = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, null, headerParams);
78+
var response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, null, headerParams);
7979
if(response != null){
80-
return ;
80+
return (Order) ApiInvoker.deserialize(response, typeof(Order));
8181
}
8282
else {
83-
return ;
83+
return null;
8484
}
8585
} catch (ApiException ex) {
8686
if(ex.ErrorCode == 404) {
87-
return ;
87+
return null;
8888
}
8989
else {
9090
throw ex;

0 commit comments

Comments
 (0)