Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update csharp-netcore dependencies to the latest stable version #7194

Merged
merged 10 commits into from
Aug 17, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -385,14 +385,27 @@ namespace {{packageName}}.Client
var existingDeserializer = req.JsonSerializer as IDeserializer;
if (existingDeserializer != null)
{
client.AddHandler(() => existingDeserializer, "application/json", "text/json", "text/x-json", "text/javascript", "*+json");
client.AddHandler("application/json", () => existingDeserializer);
client.AddHandler("text/json", () => existingDeserializer);
client.AddHandler("text/x-json", () => existingDeserializer);
client.AddHandler("text/javascript", () => existingDeserializer);
client.AddHandler("*+json", () => existingDeserializer);
}
else
{
client.AddHandler(() => new CustomJsonCodec(configuration), "application/json", "text/json", "text/x-json", "text/javascript", "*+json");
var customDeserializer = new CustomJsonCodec(configuration);
client.AddHandler("application/json", () => customDeserializer);
client.AddHandler("text/json", () => customDeserializer);
client.AddHandler("text/x-json", () => customDeserializer);
client.AddHandler("text/javascript", () => customDeserializer);
client.AddHandler("*+json", () => customDeserializer);
}

client.AddHandler(() => new XmlDeserializer(), "application/xml", "text/xml", "*+xml", "*");
var xmlDeserializer = new XmlDeserializer();
client.AddHandler("application/xml", () => xmlDeserializer);
client.AddHandler("text/xml", () => xmlDeserializer);
client.AddHandler("*+xml", () => xmlDeserializer);
client.AddHandler("*", () => xmlDeserializer);

client.Timeout = configuration.Timeout;

Expand Down Expand Up @@ -456,14 +469,27 @@ namespace {{packageName}}.Client
var existingDeserializer = req.JsonSerializer as IDeserializer;
if (existingDeserializer != null)
{
client.AddHandler(() => existingDeserializer, "application/json", "text/json", "text/x-json", "text/javascript", "*+json");
client.AddHandler("application/json", () => existingDeserializer);
client.AddHandler("text/json", () => existingDeserializer);
client.AddHandler("text/x-json", () => existingDeserializer);
client.AddHandler("text/javascript", () => existingDeserializer);
client.AddHandler("*+json", () => existingDeserializer);
}
else
{
client.AddHandler(() => new CustomJsonCodec(configuration), "application/json", "text/json", "text/x-json", "text/javascript", "*+json");
var customDeserializer = new CustomJsonCodec(configuration);
client.AddHandler("application/json", () => customDeserializer);
client.AddHandler("text/json", () => customDeserializer);
client.AddHandler("text/x-json", () => customDeserializer);
client.AddHandler("text/javascript", () => customDeserializer);
client.AddHandler("*+json", () => customDeserializer);
}

client.AddHandler(() => new XmlDeserializer(), "application/xml", "text/xml", "*+xml", "*");
var xmlDeserializer = new XmlDeserializer();
client.AddHandler("application/xml", () => xmlDeserializer);
client.AddHandler("text/xml", () => xmlDeserializer);
client.AddHandler("*+xml", () => xmlDeserializer);
client.AddHandler("*", () => xmlDeserializer);

client.Timeout = configuration.Timeout;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ This C# SDK is automatically generated by the [OpenAPI Generator](https://openap
<a name="dependencies"></a>
## Dependencies

- [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.10.1 or later
- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 12.0.1 or later
- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.5.2 or later
- [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.11.4 or later
- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 12.0.3 or later
- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.7.0 or later
{{#useCompareNetObjects}}
- [CompareNETObjects](https://www.nuget.org/packages/CompareNETObjects) - 4.57.0 or later
- [CompareNETObjects](https://www.nuget.org/packages/CompareNETObjects) - 4.66.0 or later
{{/useCompareNetObjects}}
{{#validatable}}
- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 4.5.0 or later
- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 4.7.0 or later
{{/validatable}}

The DLLs included in the package may not be the latest version. We recommend using [NuGet](https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@

<ItemGroup>
{{#useCompareNetObjects}}
<PackageReference Include="CompareNETObjects" Version="4.57.0" />
<PackageReference Include="CompareNETObjects" Version="4.66.0" />
{{/useCompareNetObjects}}
<PackageReference Include="JsonSubTypes" Version="1.5.2" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="RestSharp" Version="106.10.1" />
<PackageReference Include="JsonSubTypes" Version="1.7.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="RestSharp" Version="106.11.4" />
{{#validatable}}
<PackageReference Include="System.ComponentModel.Annotations" Version="4.5.0" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" />
{{/validatable}}
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
<!-- Dependencies are automatically installed when the package is installed -->
<dependencies>

<dependency id="Newtonsoft.Json" version="12.0.1" />
<dependency id="RestSharp" version="106.10.1" />
<dependency id="Newtonsoft.Json" version="12.0.3" />
<dependency id="RestSharp" version="106.11.4" />
{{#useCompareNetObjects}}
<dependency id="CompareNETObjects" version="4.57.0" />
<dependency id="CompareNETObjects" version="4.66.0" />
{{/useCompareNetObjects}}
<dependency id="JsonSubTypes" version="1.5.2" />
<dependency id="JsonSubTypes" version="1.7.0" />
{{#validatable}}
<dependency id="System.ComponentModel.Annotations" version="4.5.0" />
<dependency id="System.ComponentModel.Annotations" version="4.7.0" />
{{/validatable}}

</dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
{{#useCompareNetObjects}}
<package id="CompareNETObjects" version="4.57.0" targetFramework="{{targetFrameworkNuget}}" developmentDependency="true" />
<package id="CompareNETObjects" version="4.66.0" targetFramework="{{targetFrameworkNuget}}" developmentDependency="true" />
{{/useCompareNetObjects}}
<package id="RestSharp" version="106.10.1" targetFramework="{{^netStandard}}net452{{/netStandard}}{{#netStandard}}netstandard2.0{{/netStandard}}" developmentDependency="true" />
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="{{targetFrameworkNuget}}" developmentDependency="true" />
<package id="JsonSubTypes" version="1.5.2" targetFramework="{{targetFrameworkNuget}}" developmentDependency="true" />
<package id="RestSharp" version="106.11.4" targetFramework="{{^netStandard}}net452{{/netStandard}}{{#netStandard}}netstandard2.0{{/netStandard}}" developmentDependency="true" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="{{targetFrameworkNuget}}" developmentDependency="true" />
<package id="JsonSubTypes" version="1.7.0" targetFramework="{{targetFrameworkNuget}}" developmentDependency="true" />
{{#validatable}}
<package id="System.ComponentModel.Annotations" version="4.5.0" targetFramework="{{targetFrameworkNuget}}" developmentDependency="true" />
<package id="System.ComponentModel.Annotations" version="4.7.0" targetFramework="{{targetFrameworkNuget}}" developmentDependency="true" />
{{/validatable}}
</packages>
10 changes: 5 additions & 5 deletions samples/client/petstore/csharp-netcore/OpenAPIClient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ This C# SDK is automatically generated by the [OpenAPI Generator](https://openap
<a name="dependencies"></a>
## Dependencies

- [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.10.1 or later
- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 12.0.1 or later
- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.5.2 or later
- [CompareNETObjects](https://www.nuget.org/packages/CompareNETObjects) - 4.57.0 or later
- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 4.5.0 or later
- [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.11.4 or later
- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 12.0.3 or later
- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.7.0 or later
- [CompareNETObjects](https://www.nuget.org/packages/CompareNETObjects) - 4.66.0 or later
- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 4.7.0 or later

The DLLs included in the package may not be the latest version. We recommend using [NuGet](https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages:
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,14 +388,27 @@ private ApiResponse<T> Exec<T>(RestRequest req, IReadableConfiguration configura
var existingDeserializer = req.JsonSerializer as IDeserializer;
if (existingDeserializer != null)
{
client.AddHandler(() => existingDeserializer, "application/json", "text/json", "text/x-json", "text/javascript", "*+json");
client.AddHandler("application/json", () => existingDeserializer);
client.AddHandler("text/json", () => existingDeserializer);
client.AddHandler("text/x-json", () => existingDeserializer);
client.AddHandler("text/javascript", () => existingDeserializer);
client.AddHandler("*+json", () => existingDeserializer);
}
else
{
client.AddHandler(() => new CustomJsonCodec(configuration), "application/json", "text/json", "text/x-json", "text/javascript", "*+json");
var customDeserializer = new CustomJsonCodec(configuration);
client.AddHandler("application/json", () => customDeserializer);
client.AddHandler("text/json", () => customDeserializer);
client.AddHandler("text/x-json", () => customDeserializer);
client.AddHandler("text/javascript", () => customDeserializer);
client.AddHandler("*+json", () => customDeserializer);
}

client.AddHandler(() => new XmlDeserializer(), "application/xml", "text/xml", "*+xml", "*");
var xmlDeserializer = new XmlDeserializer();
client.AddHandler("application/xml", () => xmlDeserializer);
client.AddHandler("text/xml", () => xmlDeserializer);
client.AddHandler("*+xml", () => xmlDeserializer);
client.AddHandler("*", () => xmlDeserializer);

client.Timeout = configuration.Timeout;

Expand Down Expand Up @@ -458,14 +471,27 @@ private ApiResponse<T> Exec<T>(RestRequest req, IReadableConfiguration configura
var existingDeserializer = req.JsonSerializer as IDeserializer;
if (existingDeserializer != null)
{
client.AddHandler(() => existingDeserializer, "application/json", "text/json", "text/x-json", "text/javascript", "*+json");
client.AddHandler("application/json", () => existingDeserializer);
client.AddHandler("text/json", () => existingDeserializer);
client.AddHandler("text/x-json", () => existingDeserializer);
client.AddHandler("text/javascript", () => existingDeserializer);
client.AddHandler("*+json", () => existingDeserializer);
}
else
{
client.AddHandler(() => new CustomJsonCodec(configuration), "application/json", "text/json", "text/x-json", "text/javascript", "*+json");
var customDeserializer = new CustomJsonCodec(configuration);
client.AddHandler("application/json", () => customDeserializer);
client.AddHandler("text/json", () => customDeserializer);
client.AddHandler("text/x-json", () => customDeserializer);
client.AddHandler("text/javascript", () => customDeserializer);
client.AddHandler("*+json", () => customDeserializer);
}

client.AddHandler(() => new XmlDeserializer(), "application/xml", "text/xml", "*+xml", "*");
var xmlDeserializer = new XmlDeserializer();
client.AddHandler("application/xml", () => xmlDeserializer);
client.AddHandler("text/xml", () => xmlDeserializer);
client.AddHandler("*+xml", () => xmlDeserializer);
client.AddHandler("*", () => xmlDeserializer);

client.Timeout = configuration.Timeout;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CompareNETObjects" Version="4.57.0" />
<PackageReference Include="JsonSubTypes" Version="1.5.2" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="RestSharp" Version="106.10.1" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.5.0" />
<PackageReference Include="CompareNETObjects" Version="4.66.0" />
<PackageReference Include="JsonSubTypes" Version="1.7.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="RestSharp" Version="106.11.4" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ This C# SDK is automatically generated by the [OpenAPI Generator](https://openap
<a name="dependencies"></a>
## Dependencies

- [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.10.1 or later
- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 12.0.1 or later
- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.5.2 or later
- [CompareNETObjects](https://www.nuget.org/packages/CompareNETObjects) - 4.57.0 or later
- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 4.5.0 or later
- [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.11.4 or later
- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 12.0.3 or later
- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.7.0 or later
- [CompareNETObjects](https://www.nuget.org/packages/CompareNETObjects) - 4.66.0 or later
- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 4.7.0 or later

The DLLs included in the package may not be the latest version. We recommend using [NuGet](https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages:
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,27 @@ private ApiResponse<T> Exec<T>(RestRequest req, IReadableConfiguration configura
var existingDeserializer = req.JsonSerializer as IDeserializer;
if (existingDeserializer != null)
{
client.AddHandler(() => existingDeserializer, "application/json", "text/json", "text/x-json", "text/javascript", "*+json");
client.AddHandler("application/json", () => existingDeserializer);
client.AddHandler("text/json", () => existingDeserializer);
client.AddHandler("text/x-json", () => existingDeserializer);
client.AddHandler("text/javascript", () => existingDeserializer);
client.AddHandler("*+json", () => existingDeserializer);
}
else
{
client.AddHandler(() => new CustomJsonCodec(configuration), "application/json", "text/json", "text/x-json", "text/javascript", "*+json");
var customDeserializer = new CustomJsonCodec(configuration);
client.AddHandler("application/json", () => customDeserializer);
client.AddHandler("text/json", () => customDeserializer);
client.AddHandler("text/x-json", () => customDeserializer);
client.AddHandler("text/javascript", () => customDeserializer);
client.AddHandler("*+json", () => customDeserializer);
}

client.AddHandler(() => new XmlDeserializer(), "application/xml", "text/xml", "*+xml", "*");
var xmlDeserializer = new XmlDeserializer();
client.AddHandler("application/xml", () => xmlDeserializer);
client.AddHandler("text/xml", () => xmlDeserializer);
client.AddHandler("*+xml", () => xmlDeserializer);
client.AddHandler("*", () => xmlDeserializer);

client.Timeout = configuration.Timeout;

Expand Down Expand Up @@ -459,14 +472,27 @@ private ApiResponse<T> Exec<T>(RestRequest req, IReadableConfiguration configura
var existingDeserializer = req.JsonSerializer as IDeserializer;
if (existingDeserializer != null)
{
client.AddHandler(() => existingDeserializer, "application/json", "text/json", "text/x-json", "text/javascript", "*+json");
client.AddHandler("application/json", () => existingDeserializer);
client.AddHandler("text/json", () => existingDeserializer);
client.AddHandler("text/x-json", () => existingDeserializer);
client.AddHandler("text/javascript", () => existingDeserializer);
client.AddHandler("*+json", () => existingDeserializer);
}
else
{
client.AddHandler(() => new CustomJsonCodec(configuration), "application/json", "text/json", "text/x-json", "text/javascript", "*+json");
var customDeserializer = new CustomJsonCodec(configuration);
client.AddHandler("application/json", () => customDeserializer);
client.AddHandler("text/json", () => customDeserializer);
client.AddHandler("text/x-json", () => customDeserializer);
client.AddHandler("text/javascript", () => customDeserializer);
client.AddHandler("*+json", () => customDeserializer);
}

client.AddHandler(() => new XmlDeserializer(), "application/xml", "text/xml", "*+xml", "*");
var xmlDeserializer = new XmlDeserializer();
client.AddHandler("application/xml", () => xmlDeserializer);
client.AddHandler("text/xml", () => xmlDeserializer);
client.AddHandler("*+xml", () => xmlDeserializer);
client.AddHandler("*", () => xmlDeserializer);

client.Timeout = configuration.Timeout;

Expand Down
Loading