mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-09 21:36:13 +00:00
update csharp reserved words with local variable names in api methods
This commit is contained in:
@@ -307,42 +307,6 @@ namespace IO.Swagger.Api
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> DeletePetAsyncWithHttpInfo (long? petId, string apiKey = null);
|
||||
|
||||
/// <summary>
|
||||
/// downloads an image
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <returns>Stream</returns>
|
||||
Stream DownloadFile ();
|
||||
|
||||
/// <summary>
|
||||
/// downloads an image
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <returns>ApiResponse of Stream</returns>
|
||||
ApiResponse<Stream> DownloadFileWithHttpInfo ();
|
||||
|
||||
/// <summary>
|
||||
/// downloads an image
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <returns>Task of Stream</returns>
|
||||
System.Threading.Tasks.Task<Stream> DownloadFileAsync ();
|
||||
|
||||
/// <summary>
|
||||
/// downloads an image
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <returns>Task of ApiResponse (Stream)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Stream>> DownloadFileAsyncWithHttpInfo ();
|
||||
|
||||
/// <summary>
|
||||
/// uploads an image
|
||||
/// </summary>
|
||||
@@ -1523,131 +1487,6 @@ namespace IO.Swagger.Api
|
||||
null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// downloads an image
|
||||
/// </summary>
|
||||
/// <returns>Stream</returns>
|
||||
public Stream DownloadFile ()
|
||||
{
|
||||
ApiResponse<Stream> response = DownloadFileWithHttpInfo();
|
||||
return response.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// downloads an image
|
||||
/// </summary>
|
||||
/// <returns>ApiResponse of Stream</returns>
|
||||
public ApiResponse< Stream > DownloadFileWithHttpInfo ()
|
||||
{
|
||||
|
||||
|
||||
var path_ = "/pet/{petId}/downloadImage";
|
||||
|
||||
var pathParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, FileParameter>();
|
||||
String postBody = null;
|
||||
|
||||
// to determine the Accept header
|
||||
String[] http_header_accepts = new String[] {
|
||||
"application/octet-stream"
|
||||
};
|
||||
String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts);
|
||||
if (http_header_accept != null)
|
||||
headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts));
|
||||
|
||||
// set "format" to json by default
|
||||
// e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
|
||||
pathParams.Add("format", "json");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||
|
||||
int statusCode = (int) response.StatusCode;
|
||||
|
||||
if (statusCode >= 400)
|
||||
throw new ApiException (statusCode, "Error calling DownloadFile: " + response.Content, response.Content);
|
||||
else if (statusCode == 0)
|
||||
throw new ApiException (statusCode, "Error calling DownloadFile: " + response.ErrorMessage, response.ErrorMessage);
|
||||
|
||||
return new ApiResponse<Stream>(statusCode,
|
||||
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(Stream) Configuration.ApiClient.Deserialize(response, typeof(Stream)));
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// downloads an image
|
||||
/// </summary>
|
||||
/// <returns>Task of Stream</returns>
|
||||
public async System.Threading.Tasks.Task<Stream> DownloadFileAsync ()
|
||||
{
|
||||
ApiResponse<Stream> response = await DownloadFileAsyncWithHttpInfo();
|
||||
return response.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// downloads an image
|
||||
/// </summary>
|
||||
/// <returns>Task of ApiResponse (Stream)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<Stream>> DownloadFileAsyncWithHttpInfo ()
|
||||
{
|
||||
|
||||
|
||||
var path_ = "/pet/{petId}/downloadImage";
|
||||
|
||||
var pathParams = new Dictionary<String, String>();
|
||||
var queryParams = new Dictionary<String, String>();
|
||||
var headerParams = new Dictionary<String, String>();
|
||||
var formParams = new Dictionary<String, String>();
|
||||
var fileParams = new Dictionary<String, FileParameter>();
|
||||
String postBody = null;
|
||||
|
||||
// to determine the Accept header
|
||||
String[] http_header_accepts = new String[] {
|
||||
"application/octet-stream"
|
||||
};
|
||||
String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts);
|
||||
if (http_header_accept != null)
|
||||
headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts));
|
||||
|
||||
// set "format" to json by default
|
||||
// e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
|
||||
pathParams.Add("format", "json");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams);
|
||||
|
||||
int statusCode = (int) response.StatusCode;
|
||||
|
||||
if (statusCode >= 400)
|
||||
throw new ApiException (statusCode, "Error calling DownloadFile: " + response.Content, response.Content);
|
||||
else if (statusCode == 0)
|
||||
throw new ApiException (statusCode, "Error calling DownloadFile: " + response.ErrorMessage, response.ErrorMessage);
|
||||
|
||||
return new ApiResponse<Stream>(statusCode,
|
||||
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(Stream) Configuration.ApiClient.Deserialize(response, typeof(Stream)));
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// uploads an image
|
||||
/// </summary>
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace IO.Swagger.Model
|
||||
///
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class Category : IEquatable<Category>
|
||||
public class Category : IEquatable<Category>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Category" /> class.
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace IO.Swagger.Model
|
||||
///
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class Order : IEquatable<Order>
|
||||
public class Order : IEquatable<Order>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Order" /> class.
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace IO.Swagger.Model
|
||||
///
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class Pet : IEquatable<Pet>
|
||||
public class Pet : IEquatable<Pet>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Pet" /> class.
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace IO.Swagger.Model
|
||||
///
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class Tag : IEquatable<Tag>
|
||||
public class Tag : IEquatable<Tag>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Tag" /> class.
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace IO.Swagger.Model
|
||||
///
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class User : IEquatable<User>
|
||||
public class User : IEquatable<User>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="User" /> class.
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
|
||||
<MonoDevelop.Ide.Workbench ActiveDocument="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs">
|
||||
<Files>
|
||||
<File FileName="TestConfiguration.cs" Line="17" Column="33" />
|
||||
<File FileName="TestPet.cs" Line="81" Column="17" />
|
||||
<File FileName="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs" Line="12" Column="18" />
|
||||
<File FileName="TestConfiguration.cs" Line="1" Column="1" />
|
||||
<File FileName="TestPet.cs" Line="1" Column="1" />
|
||||
<File FileName="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs" Line="15" Column="29" />
|
||||
</Files>
|
||||
</MonoDevelop.Ide.Workbench>
|
||||
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,9 +1,9 @@
|
||||
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttribute.cs
|
||||
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.swagger-logo.png
|
||||
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll.mdb
|
||||
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll
|
||||
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll
|
||||
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll.mdb
|
||||
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/Newtonsoft.Json.dll
|
||||
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/nunit.framework.dll
|
||||
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/RestSharp.dll
|
||||
/Users/williamcheng/Code/tmp/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttribute.cs
|
||||
/Users/williamcheng/Code/tmp/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.swagger-logo.png
|
||||
/Users/williamcheng/Code/tmp/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll.mdb
|
||||
/Users/williamcheng/Code/tmp/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll
|
||||
/Users/williamcheng/Code/tmp/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll
|
||||
/Users/williamcheng/Code/tmp/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll.mdb
|
||||
/Users/williamcheng/Code/tmp/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/Newtonsoft.Json.dll
|
||||
/Users/williamcheng/Code/tmp/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/nunit.framework.dll
|
||||
/Users/williamcheng/Code/tmp/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/RestSharp.dll
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user