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

[BUG] [csharp] Obsolete build warnings after PR to update to RestSharp 112.0.0 #19525

Open
2 of 6 tasks
johnthagen opened this issue Sep 4, 2024 · 1 comment
Open
2 of 6 tasks

Comments

@johnthagen
Copy link
Contributor

johnthagen commented Sep 4, 2024

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:

Here are where these obsolete methods are still used within openapi-generator main branch:

return client.Deserialize<T>(policyResult.Result);

openapi-generator version

7.8.0 (with #19507 backport manually applied)

@johnthagen
Copy link
Contributor Author

CC @wing328

@johnthagen johnthagen changed the title [BUG] [csharp] Build warnings after PR to update to RestSharp 112.0.0 [BUG] [csharp] Obsolete build warnings after PR to update to RestSharp 112.0.0 Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant