Open SzabKel opened 5 years ago
I can confirm I am seeing the same thing, missing variable names in the model constructors (as well as the broken sln file).
I have the same issue. Note this doesn't work even on the Petstore example:
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i https://gist.githubusercontent.com/danielflower/5c5ae8a46a0a49aee508690c19b33ada/raw/b06ff4d9764b5800424f6a21a40158c35277ee65/petstore.json -l csharp --additional-properties targetFramework=v5.0 useDateTimeOffset=true netCoreProjectFile=true -o ~/Downloads/csharp2/
The cause of this problem is that the template modelGeneric.mustache uses {{#lambda.camelcase_param}} helper that is not supported in handlebars.
From handlebars docs: The optional Mustache-style lambdas are not supported. Instead Handlebars provides its own lambda resolution that follows the behaviors of helpers.
The bug is actually in the other repo: https://github.com/swagger-api/swagger-codegen-generators
I created a bug in that repo: https://github.com/swagger-api/swagger-codegen-generators/issues/358
Description
Using version 3, I tried to generate C# code for Magento 2.3's API. The generated code did not compile.
I used Windows 10 x64, Oracle JDK 1.8_201
Command line used for generation
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i https://devdocs.magento.com/swagger/schemas/latest-2.3.schema.json -l csharp -o C:\workspace\swagger-codegen\generated-v3-190606
Steps to reproduce
mvn clean package -Dmaven.test.skip=true
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i https://devdocs.magento.com/swagger/schemas/latest-2.3.schema.json -l csharp -o C:\workspace\swagger-codegen\generated-v3-190606