-
-
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
Generated C# code uses RestSharp 105.1.0 which has a bug in its proxy imlementation #7498
Comments
@ChrisKeut can you please check the latest master, which should have the C# dependencies updated to newer versions? |
@wing328 sorry I'm new to github. I downloaded openapi-generator-cli-5.0.0-beta2.jar but in packages.config 105.1.0 is listed: Have I downloaded the wrong jar? How i get the latest master? |
Search for "SNAPSHOT" in the projecjt's readme and you will find a link to a page listing all the SNAPSHOT version. Then scroll down to find the latest JAR (snapshot version of the latest master) |
OK, done (openapi-generator-cli-5.0.0-20200924.091403-684.jar). But also 105.1.0 in packages.config |
Can you please try |
Yes I have used "csharp" because I have a .Net 4.52 client application. I can't use .Net Core. Any ideas? Thanks! |
What about .NET standard (the default of |
OK, let me install Visual Studio 19 to check it. |
@ChrisKeut I assume it resolves the issue for you, right? |
@wing328 No, not really
|
For 1, I've filed #7504 to fix it. For 2, you may want to use the following option to pick a different .net standard version:
ref: https://docs.microsoft.com/en-us/dotnet/standard/net-standard#net-implementation-support |
Thank you wing328! Ended up to port my Windows Froms application to .Net Core Windows Forms. Now the references to the generated project works. Currently i'm struggling with the new API. |
@wing328 Finally I found out that I didn't had a problem with openapi-codegen or the used RestSharp version. The problem was that the .NET Framework, even if you set Proxy.BypassProxyOnLocal = false, don't uses the proxy on a localhost endpoint. I solved the problem by adding a dot after localhost (like: http://localhost.:8080/...) I needed to set the proxy to test my api with Burp Suite. Still it would be good to update the dependencies for |
The current version of openapi-generator-cli (4.3.1) uses RestSharp 105.1.0 for its C# code generation. RestSharp 105.1.0 has a known bug in its proxy-implementation. A later version (106.3) has fixed this bug. Could you please update this dependency. If I manually change the RestSharp.dll to 106.3.1 I get a compile error in the generated code.
The text was updated successfully, but these errors were encountered: