Search code examples
swagger-codegen

How to fix missing swagger input or config?


I am facing issue while generating code via swagger cli using csharp-dotnet2 template. It is almost same issue as mentioned Here

I am able to generate the code from https://editor.swagger.io/ but when I am using swagger cli as i need to modify the template I have tried generating code with different version of swagger and currently using swagger-codegen-cli-3.0.27.jar. but it is not working.

Please check attached screenshot here

Command

java -cp swagger-codegen-cli-3.0.27.jar io.swagger.codegen.Codegen -i vendor.yaml -l csharp-dotnet2 -o outputdir.

Solution

  • Use this command instead:

    java -jar swagger-codegen-cli-3.0.27.jar generate -i vendor.yaml -l csharp-dotnet2 -o outputdir