Open stevwan opened 5 years ago
@stevwan thanks for reporting the issue. May I know if you've time to contribute a fix? I can work with you on that.
I’m happy to create the pull request. You ok with the proposed solution? I haven’t tested all config / option combinations.
On 25 Sep 2018, at 5:24 pm, William Cheng notifications@github.com wrote:
@stevwan thanks for reporting the issue. May I know if you've time to contribute a fix? I can work with you on that.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@stevwan yup, let's try with your proposed solution.
Description
The Async API generated for csharp-nancyfx invokes a non-existent function: Task.ToArray(), causing compile time and runtime errors.
openapi-generator version
3.2.3
OpenAPI declaration file content or url
Cut down version of the default pet store
Config file used for code generation:
Command line used for generation
java -jar openapi-generator-cli.jar -l csharp-nancyfx -i -c -o generatedNancyFxServer
Steps to reproduce
Copy the yml and json into respective files. Run command to generate the NancyFxServer project. Open in VS or simply try to build it.
Related issues/PRs
None found
Suggest a fix/enhancement
In following line of code: https://github.com/OpenAPITools/openapi-generator/blob/8fb3b707a1c4eb462b068bf2c2d20d570d4bb1d9/modules/openapi-generator/src/main/resources/csharp-nancyfx/api.mustache#L34
Current code:
Fix: If asyncServer is set, do not write ".ToArray()"
I've manually removed this and confirmed that the endpoint returns values correctly without the ".ToArray()"