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:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user