OpenAPITools / OpenAPITools/openapi-generator

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

Open
#14,460 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Description
  • Executing the following:
    openapi-generator-cli generate -i https://petstore3.swagger.io/api/v3/openapi.json -g csharp-netcore -o api --additional-properties=optionalProjectFile=false,sourceFolder=test
  • Same Problem with master: tested with latest master (amd64 - digest on dockerhub: 267dafcbfb97):
    docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli:latest generate \ -i https://petstore3.swagger.io/api/v3/openapi.json -g csharp-netcore -o api \ --additional-properties=optionalProjectFile=false,sourceFolder=test \ -o /local/out/csharp
  • I found optionalProjectFile only in readmes like this, but not in code: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/csharp-netcore.md
  • expected behaviour: at the end of generating der is no Org.OpenAPITools.csproj
  • actual behaviour: this flag doesn't change anything, as far as I can see
openapi-generator version
  • 6.2.1 (but even master)
Related issues/PRs
  • No related found so far
Suggest a fix

Additional question

  • should a solution file get created if I don't want to create a projectFile? I would not expect
image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the command shown in the issue with the csharp-netcore generator, then compare its behavior with docs/generators/csharp-netcore.md, where optionalProjectFile is documented. Locate the csharp-netcore generator entry point and project templates, and verify that optionalProjectFile=false prevents Org.OpenAPITools.csproj generation while checking the expected solution-file behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, openapi
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.