Skip to content

Commit 5aa98c9

Browse files
Merge pull request #21 from mxenabled/openapi-generator-0.4.0
Generated version 0.4.0
2 parents 426226c + 8b48a41 commit 5aa98c9

12 files changed

Lines changed: 215 additions & 202 deletions

File tree

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.3.1
1+
5.4.0

MX.Platform.CSharp.sln

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
22
# Visual Studio 14
33
VisualStudioVersion = 14.0.25420.1
44
MinimumVisualStudioVersion = 10.0.40219.1
5-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MX.Platform.CSharp", "src\MX.Platform.CSharp\MX.Platform.CSharp.csproj", "{9D0CD6BE-A121-498B-A64A-3C884C61FC30}"
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MX.Platform.CSharp", "src\MX.Platform.CSharp\MX.Platform.CSharp.csproj", "{5F2EEEFA-A5DF-4298-BDF0-B3A60359916C}"
66
EndProject
77
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MX.Platform.CSharp.Test", "src\MX.Platform.CSharp.Test\MX.Platform.CSharp.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
88
EndProject
@@ -12,10 +12,10 @@ Global
1212
Release|Any CPU = Release|Any CPU
1313
EndGlobalSection
1414
GlobalSection(ProjectConfigurationPlatforms) = postSolution
15-
{9D0CD6BE-A121-498B-A64A-3C884C61FC30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16-
{9D0CD6BE-A121-498B-A64A-3C884C61FC30}.Debug|Any CPU.Build.0 = Debug|Any CPU
17-
{9D0CD6BE-A121-498B-A64A-3C884C61FC30}.Release|Any CPU.ActiveCfg = Release|Any CPU
18-
{9D0CD6BE-A121-498B-A64A-3C884C61FC30}.Release|Any CPU.Build.0 = Release|Any CPU
15+
{5F2EEEFA-A5DF-4298-BDF0-B3A60359916C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16+
{5F2EEEFA-A5DF-4298-BDF0-B3A60359916C}.Debug|Any CPU.Build.0 = Debug|Any CPU
17+
{5F2EEEFA-A5DF-4298-BDF0-B3A60359916C}.Release|Any CPU.ActiveCfg = Release|Any CPU
18+
{5F2EEEFA-A5DF-4298-BDF0-B3A60359916C}.Release|Any CPU.Build.0 = Release|Any CPU
1919
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2020
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
2121
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU

openapi/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
---
22
packageName: MX.Platform.CSharp
3-
packageVersion: 0.3.7
3+
packageVersion: 0.4.0

openapitools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
33
"spaces": 2,
44
"generator-cli": {
5-
"version": "5.3.1"
5+
"version": "5.4.0"
66
}
77
}

src/MX.Platform.CSharp.Test/MX.Platform.CSharp.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<AssemblyName>MX.Platform.CSharp.Test</AssemblyName>
55
<RootNamespace>MX.Platform.CSharp.Test</RootNamespace>
6-
<TargetFramework>netcoreapp2.0</TargetFramework>
6+
<TargetFramework>netcoreapp3.1</TargetFramework>
77
<IsPackable>false</IsPackable>
88
</PropertyGroup>
99

src/MX.Platform.CSharp/Api/MxPlatformApi.cs

Lines changed: 178 additions & 178 deletions
Large diffs are not rendered by default.

src/MX.Platform.CSharp/Client/ApiClient.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -370,12 +370,15 @@ private RestRequest NewRequest(
370370
{
371371
foreach (var fileParam in options.FileParameters)
372372
{
373-
var bytes = ClientUtils.ReadAsBytes(fileParam.Value);
374-
var fileStream = fileParam.Value as FileStream;
375-
if (fileStream != null)
376-
request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name)));
377-
else
378-
request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided"));
373+
foreach (var file in fileParam.Value)
374+
{
375+
var bytes = ClientUtils.ReadAsBytes(file);
376+
var fileStream = file as FileStream;
377+
if (fileStream != null)
378+
request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name)));
379+
else
380+
request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided"));
381+
}
379382
}
380383
}
381384

src/MX.Platform.CSharp/Client/Configuration.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class Configuration : IReadableConfiguration
3131
/// Version of the package.
3232
/// </summary>
3333
/// <value>Version of the package.</value>
34-
public const string Version = "0.3.7";
34+
public const string Version = "0.4.0";
3535

3636
/// <summary>
3737
/// Identifier for ISO 8601 DateTime Format
@@ -101,7 +101,7 @@ public class Configuration : IReadableConfiguration
101101
public Configuration()
102102
{
103103
Proxy = null;
104-
UserAgent = "OpenAPI-Generator/0.3.7/csharp";
104+
UserAgent = "OpenAPI-Generator/0.4.0/csharp";
105105
BasePath = "https://api.mx.com";
106106
DefaultHeaders = new ConcurrentDictionary<string, string>();
107107
ApiKey = new ConcurrentDictionary<string, string>();
@@ -452,7 +452,7 @@ public static string ToDebugReport()
452452
report += " OS: " + System.Environment.OSVersion + "\n";
453453
report += " .NET Framework Version: " + System.Environment.Version + "\n";
454454
report += " Version of the API: 0.1.0\n";
455-
report += " SDK Package Version: 0.3.7\n";
455+
report += " SDK Package Version: 0.4.0\n";
456456

457457
return report;
458458
}

src/MX.Platform.CSharp/Client/GlobalConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ public static IReadableConfiguration Instance
6464
}
6565
}
6666
}
67-
}
67+
}

src/MX.Platform.CSharp/Client/RequestOptions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class RequestOptions
4646
/// <summary>
4747
/// File parameters to be sent along with the request.
4848
/// </summary>
49-
public Dictionary<string, Stream> FileParameters { get; set; }
49+
public Multimap<string, Stream> FileParameters { get; set; }
5050

5151
/// <summary>
5252
/// Cookies to be sent along with the request.
@@ -67,7 +67,7 @@ public RequestOptions()
6767
QueryParameters = new Multimap<string, string>();
6868
HeaderParameters = new Multimap<string, string>();
6969
FormParameters = new Dictionary<string, string>();
70-
FileParameters = new Dictionary<string, Stream>();
70+
FileParameters = new Multimap<string, Stream>();
7171
Cookies = new List<Cookie>();
7272
}
7373
}

0 commit comments

Comments
 (0)