OpenAPITools / OpenAPITools/openapi-generator
[BUG][csharp-netcore] Seems like optionalProjectFile=false isn't used with csharp-netcore
Open
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
- did search through the organisation here with https://github.com/search?p=4&q=org%3AOpenAPITools+optionalProjectFile&type=Code
- found ~ 30 Code-sources, looked through it which of them belong to csharp-netcore and only found Readme-Files and similar. Code usages only in java-generators.
- No fix so far, but if someone can point me to the right file I may help here
Additional question
- should a solution file get created if I don't want to create a projectFile? I would not expect
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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