OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.36k stars 6.46k forks source link

[BUG][csharp-netcore] Seems like optionalProjectFile=false isn't used with csharp-netcore #14460

Open Cyber1000 opened 1 year ago

Cyber1000 commented 1 year ago
Description
openapi-generator version
Related issues/PRs
Suggest a fix

Additional question

Cyber1000 commented 1 year ago

Found this file which seems to use optionalProjectFileFlag (excluding sln + csproj if false), I just don't know what I'm doing wrong here.

Cyber1000 commented 1 year ago

Sorry didn't mention the file in my latest post: found the usage in https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java but not in https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java

So -g csharp works as expected, but -g csharp-netcore doesn't.

Cyber1000 commented 1 year ago

btw. there seems to be an undocumented additionalparameter named "excludeTests" whcih seems to work for both templates

vicdotexe commented 1 year ago

Any update on this? I'm using the latest version where csharp-netcore got merged with csharp, so I'm just using -g csharp, but optionalProjectFile=false still seems to produce a csproj file.

aong3-wx commented 6 months ago

Yep, getting the same problem, where optionalProjectFile=false inside config.json still produces a csproj file. I'm using the docker image v7.3.0