forked from loafle/openapi-generator-original
[csharp] Mustache fully qualify namespace for Path (#19349)
* fix: csharp mustash fully qualify namespace Path The generated code of Csharp get a fully quallify namespace for PATH using Path = global::System.IO.Path; * mend * Remove alias for fully qualify Path class
This commit is contained in:
parent
b627e1cc67
commit
9452873b99
@ -109,7 +109,7 @@ namespace {{packageName}}.Client
|
||||
if (response.Headers != null)
|
||||
{
|
||||
var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath)
|
||||
? Path.GetTempPath()
|
||||
? global::System.IO.Path.GetTempPath()
|
||||
: _configuration.TempFolderPath;
|
||||
var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$");
|
||||
foreach (var header in response.Headers)
|
||||
@ -377,7 +377,7 @@ namespace {{packageName}}.Client
|
||||
var bytes = ClientUtils.ReadAsBytes(file);
|
||||
var fileStream = file as FileStream;
|
||||
if (fileStream != null)
|
||||
request.AddFile(fileParam.Key, bytes, Path.GetFileName(fileStream.Name));
|
||||
request.AddFile(fileParam.Key, bytes, global::System.IO.Path.GetFileName(fileStream.Name));
|
||||
else
|
||||
request.AddFile(fileParam.Key, bytes, "no_file_name_provided");
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ namespace Org.OpenAPITools.Client
|
||||
if (response.Headers != null)
|
||||
{
|
||||
var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath)
|
||||
? Path.GetTempPath()
|
||||
? global::System.IO.Path.GetTempPath()
|
||||
: _configuration.TempFolderPath;
|
||||
var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$");
|
||||
foreach (var header in response.Headers)
|
||||
@ -377,7 +377,7 @@ namespace Org.OpenAPITools.Client
|
||||
var bytes = ClientUtils.ReadAsBytes(file);
|
||||
var fileStream = file as FileStream;
|
||||
if (fileStream != null)
|
||||
request.AddFile(fileParam.Key, bytes, Path.GetFileName(fileStream.Name));
|
||||
request.AddFile(fileParam.Key, bytes, global::System.IO.Path.GetFileName(fileStream.Name));
|
||||
else
|
||||
request.AddFile(fileParam.Key, bytes, "no_file_name_provided");
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ namespace Org.OpenAPITools.Client
|
||||
if (response.Headers != null)
|
||||
{
|
||||
var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath)
|
||||
? Path.GetTempPath()
|
||||
? global::System.IO.Path.GetTempPath()
|
||||
: _configuration.TempFolderPath;
|
||||
var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$");
|
||||
foreach (var header in response.Headers)
|
||||
@ -377,7 +377,7 @@ namespace Org.OpenAPITools.Client
|
||||
var bytes = ClientUtils.ReadAsBytes(file);
|
||||
var fileStream = file as FileStream;
|
||||
if (fileStream != null)
|
||||
request.AddFile(fileParam.Key, bytes, Path.GetFileName(fileStream.Name));
|
||||
request.AddFile(fileParam.Key, bytes, global::System.IO.Path.GetFileName(fileStream.Name));
|
||||
else
|
||||
request.AddFile(fileParam.Key, bytes, "no_file_name_provided");
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ namespace Org.OpenAPITools.Client
|
||||
if (response.Headers != null)
|
||||
{
|
||||
var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath)
|
||||
? Path.GetTempPath()
|
||||
? global::System.IO.Path.GetTempPath()
|
||||
: _configuration.TempFolderPath;
|
||||
var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$");
|
||||
foreach (var header in response.Headers)
|
||||
@ -378,7 +378,7 @@ namespace Org.OpenAPITools.Client
|
||||
var bytes = ClientUtils.ReadAsBytes(file);
|
||||
var fileStream = file as FileStream;
|
||||
if (fileStream != null)
|
||||
request.AddFile(fileParam.Key, bytes, Path.GetFileName(fileStream.Name));
|
||||
request.AddFile(fileParam.Key, bytes, global::System.IO.Path.GetFileName(fileStream.Name));
|
||||
else
|
||||
request.AddFile(fileParam.Key, bytes, "no_file_name_provided");
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ namespace Org.OpenAPITools.Client
|
||||
if (response.Headers != null)
|
||||
{
|
||||
var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath)
|
||||
? Path.GetTempPath()
|
||||
? global::System.IO.Path.GetTempPath()
|
||||
: _configuration.TempFolderPath;
|
||||
var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$");
|
||||
foreach (var header in response.Headers)
|
||||
@ -378,7 +378,7 @@ namespace Org.OpenAPITools.Client
|
||||
var bytes = ClientUtils.ReadAsBytes(file);
|
||||
var fileStream = file as FileStream;
|
||||
if (fileStream != null)
|
||||
request.AddFile(fileParam.Key, bytes, Path.GetFileName(fileStream.Name));
|
||||
request.AddFile(fileParam.Key, bytes, global::System.IO.Path.GetFileName(fileStream.Name));
|
||||
else
|
||||
request.AddFile(fileParam.Key, bytes, "no_file_name_provided");
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ namespace Org.OpenAPITools.Client
|
||||
if (response.Headers != null)
|
||||
{
|
||||
var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath)
|
||||
? Path.GetTempPath()
|
||||
? global::System.IO.Path.GetTempPath()
|
||||
: _configuration.TempFolderPath;
|
||||
var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$");
|
||||
foreach (var header in response.Headers)
|
||||
@ -378,7 +378,7 @@ namespace Org.OpenAPITools.Client
|
||||
var bytes = ClientUtils.ReadAsBytes(file);
|
||||
var fileStream = file as FileStream;
|
||||
if (fileStream != null)
|
||||
request.AddFile(fileParam.Key, bytes, Path.GetFileName(fileStream.Name));
|
||||
request.AddFile(fileParam.Key, bytes, global::System.IO.Path.GetFileName(fileStream.Name));
|
||||
else
|
||||
request.AddFile(fileParam.Key, bytes, "no_file_name_provided");
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ namespace Org.OpenAPITools.Client
|
||||
if (response.Headers != null)
|
||||
{
|
||||
var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath)
|
||||
? Path.GetTempPath()
|
||||
? global::System.IO.Path.GetTempPath()
|
||||
: _configuration.TempFolderPath;
|
||||
var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$");
|
||||
foreach (var header in response.Headers)
|
||||
@ -376,7 +376,7 @@ namespace Org.OpenAPITools.Client
|
||||
var bytes = ClientUtils.ReadAsBytes(file);
|
||||
var fileStream = file as FileStream;
|
||||
if (fileStream != null)
|
||||
request.AddFile(fileParam.Key, bytes, Path.GetFileName(fileStream.Name));
|
||||
request.AddFile(fileParam.Key, bytes, global::System.IO.Path.GetFileName(fileStream.Name));
|
||||
else
|
||||
request.AddFile(fileParam.Key, bytes, "no_file_name_provided");
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ namespace Org.OpenAPITools.Client
|
||||
if (response.Headers != null)
|
||||
{
|
||||
var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath)
|
||||
? Path.GetTempPath()
|
||||
? global::System.IO.Path.GetTempPath()
|
||||
: _configuration.TempFolderPath;
|
||||
var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$");
|
||||
foreach (var header in response.Headers)
|
||||
@ -377,7 +377,7 @@ namespace Org.OpenAPITools.Client
|
||||
var bytes = ClientUtils.ReadAsBytes(file);
|
||||
var fileStream = file as FileStream;
|
||||
if (fileStream != null)
|
||||
request.AddFile(fileParam.Key, bytes, Path.GetFileName(fileStream.Name));
|
||||
request.AddFile(fileParam.Key, bytes, global::System.IO.Path.GetFileName(fileStream.Name));
|
||||
else
|
||||
request.AddFile(fileParam.Key, bytes, "no_file_name_provided");
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ namespace Org.OpenAPITools.Client
|
||||
if (response.Headers != null)
|
||||
{
|
||||
var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath)
|
||||
? Path.GetTempPath()
|
||||
? global::System.IO.Path.GetTempPath()
|
||||
: _configuration.TempFolderPath;
|
||||
var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$");
|
||||
foreach (var header in response.Headers)
|
||||
@ -377,7 +377,7 @@ namespace Org.OpenAPITools.Client
|
||||
var bytes = ClientUtils.ReadAsBytes(file);
|
||||
var fileStream = file as FileStream;
|
||||
if (fileStream != null)
|
||||
request.AddFile(fileParam.Key, bytes, Path.GetFileName(fileStream.Name));
|
||||
request.AddFile(fileParam.Key, bytes, global::System.IO.Path.GetFileName(fileStream.Name));
|
||||
else
|
||||
request.AddFile(fileParam.Key, bytes, "no_file_name_provided");
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ namespace Org.OpenAPITools.Client
|
||||
if (response.Headers != null)
|
||||
{
|
||||
var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath)
|
||||
? Path.GetTempPath()
|
||||
? global::System.IO.Path.GetTempPath()
|
||||
: _configuration.TempFolderPath;
|
||||
var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$");
|
||||
foreach (var header in response.Headers)
|
||||
@ -376,7 +376,7 @@ namespace Org.OpenAPITools.Client
|
||||
var bytes = ClientUtils.ReadAsBytes(file);
|
||||
var fileStream = file as FileStream;
|
||||
if (fileStream != null)
|
||||
request.AddFile(fileParam.Key, bytes, Path.GetFileName(fileStream.Name));
|
||||
request.AddFile(fileParam.Key, bytes, global::System.IO.Path.GetFileName(fileStream.Name));
|
||||
else
|
||||
request.AddFile(fileParam.Key, bytes, "no_file_name_provided");
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ namespace Org.OpenAPITools.Client
|
||||
if (response.Headers != null)
|
||||
{
|
||||
var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath)
|
||||
? Path.GetTempPath()
|
||||
? global::System.IO.Path.GetTempPath()
|
||||
: _configuration.TempFolderPath;
|
||||
var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$");
|
||||
foreach (var header in response.Headers)
|
||||
@ -378,7 +378,7 @@ namespace Org.OpenAPITools.Client
|
||||
var bytes = ClientUtils.ReadAsBytes(file);
|
||||
var fileStream = file as FileStream;
|
||||
if (fileStream != null)
|
||||
request.AddFile(fileParam.Key, bytes, Path.GetFileName(fileStream.Name));
|
||||
request.AddFile(fileParam.Key, bytes, global::System.IO.Path.GetFileName(fileStream.Name));
|
||||
else
|
||||
request.AddFile(fileParam.Key, bytes, "no_file_name_provided");
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ namespace Org.OpenAPITools.Client
|
||||
if (response.Headers != null)
|
||||
{
|
||||
var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath)
|
||||
? Path.GetTempPath()
|
||||
? global::System.IO.Path.GetTempPath()
|
||||
: _configuration.TempFolderPath;
|
||||
var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$");
|
||||
foreach (var header in response.Headers)
|
||||
@ -378,7 +378,7 @@ namespace Org.OpenAPITools.Client
|
||||
var bytes = ClientUtils.ReadAsBytes(file);
|
||||
var fileStream = file as FileStream;
|
||||
if (fileStream != null)
|
||||
request.AddFile(fileParam.Key, bytes, Path.GetFileName(fileStream.Name));
|
||||
request.AddFile(fileParam.Key, bytes, global::System.IO.Path.GetFileName(fileStream.Name));
|
||||
else
|
||||
request.AddFile(fileParam.Key, bytes, "no_file_name_provided");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user