-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Closed
Closed
Copy link
Labels
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
Due to vulnerabilities in the current generated RestSharp version
I tried to update 7.8.0 generated C# client to RestSharp 112.0.0 as shown in
But this produced two build warnings. For projects that treat warnings as errors in CI, this will fail the build.
ApiClient.cs(400,17): warning CS0618: 'RestClientOptions.MaxTimeout' is obsolete: 'Use Timeout instead.'
ApiClient.cs(472,24): warning CS0618: 'RestClientExtensions.Deserialize<T>(IRestClient, RestResponse)' is obsolete: 'Please use the async overload with a cancellation token'
The related upstream changes in RestSharp:
- Re-instate old methods, but as obsolete restsharp/RestSharp#2228
- Timeout as TimeSpan, Support custom request timeout restsharp/RestSharp#2078
- Wrapping up interceptors, fixing typos, removing Moq restsharp/RestSharp#2141
Here are where these obsolete methods are still used within openapi-generator
main
branch:
openapi-generator/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache
Line 458 in e914c40
MaxTimeout = configuration.Timeout, |
openapi-generator/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache
Line 557 in e914c40
return client.Deserialize<T>(policyResult.Result); |
openapi-generator version
7.8.0 (with #19507 backport manually applied)