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] Problems with code creation #7218
Comments
@karussell Have you built your client against Swagger Codegen before? I have a fix for the configuration issues, which should unblock most of the errors you're receiving. It looks like your model:
As an array of an array of doubles isn't currently supported, so I'd have to look into this since it appears that it may be supported elsewhere. There's another issue #7358 for the last error in your trace regarding I don't have Mono installed locally because I've just gotten a new machine, and it's taking a while to download. I'll go ahead and open the PR with the fix for Configuration. The issue is that the property in the API template isn't prefix with |
I opened #7394 to address the issue with the
Should result in two remaining compilation issues of #7358 (toJson) and missing support for nested arrays. |
Thanks, will try your suggestions!
Other clients, yes. But C# not. |
@karussell are there any other statically typed languages you're generating that support the Also, I've opened #7399 to address the compilation issue of |
Thanks!
Yes, Java. And it compiles :) |
Ah. Looks like the Java client specifically relies on type erasure:
I'll look into applying the generics for nested schemas of array types for C#, although any fix may only be partially functional for API input types as it would most likely complicate initializations. |
@karussell I've opened #7400 to address the compilation issues you've experienced with the C# generator. That PR includes the fixes from the other two, to make it easier for you to evaluate. |
Cool, thanks! |
I can confirm that I can compile the project - thanks a bunch @jimschubert ! Also the test seem to run through:
|
PR was merged into master |
Description
I have no windows here and so I tried to build the c# version of our client library under Ubuntu 16.04, but this fails with:
BTW: Changing the sdk option to just 4.5 removes also the warning "warning CS8001: SDK path could not be resolved". So I do not think that is the root cause.
BTW2: the same problems seems to persist with C# 5 under windows as someone else reported to me in a personal email.
Swagger-codegen version
2.2.3 or master from 14 Nov
Swagger declaration file content or url
https://github.com/graphhopper/directions-api-clients/blob/master/swagger.json
Command line used for generation
java -jar swagger.jar generate -i swagger.json -l csharp --artifact-version 0.10-SNAPSHOT --git-repo-id directions-api-client --git-user-id graphhopper --api-package directions-api-client -o csharp"
Steps to reproduce
install mono on Ubuntu 16.04 via
then do
Related issues/PRs
Nothing found
Suggest a fix/enhancement
No idea
The text was updated successfully, but these errors were encountered: