-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[csharp] Address MaxTimeout obsolete build warning #19875
[csharp] Address MaxTimeout obsolete build warning #19875
Conversation
modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache
Outdated
Show resolved
Hide resolved
379d455
to
69b59eb
Compare
Good news @wing328! We can actually simplify down and lose the fallback config option. RestSharp already disregards MaxTimeout and uses the Timeout value, so setting Timeout will have the desired effect of using MaxTimeout.
|
4ecccc6
to
ec8bda4
Compare
/// </summary> | ||
public virtual int Timeout { get; set; } | ||
public virtual TimeSpan Timeout { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if users call the getter of Timeout in their code, they will need to update their code accordingly updating the C# client to a newer version including this change, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, if they use the 7.10.0 version of the generator to generate their client, they will need to update usages of Timeout.
3783085
to
ec8bda4
Compare
Added an option |
@wing328 , this adds that option to enable use of MaxTimeout over Timeout, but it defaults to the non-obsolete option by default. Fix #19525.
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master
(upcoming7.x.0
minor release - breaking changes with fallbacks),8.0.x
(breaking changes without fallbacks)