swagger-api / swagger-api/swagger-codegen
[nancyfx] The CLI option "optionalProjectFile" does nothing
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
The option "optionalProjectFile" is a command line switch, but the value seems to always use the default optionalProjectFileFlag as it is never set from processOpts().
This means the Solution file and a Project file templates are always included and created.
Swagger-codegen version
2.3.1
Command line used for generation
java -jar swagger-codegen-cli-2.3.1.jar generate -l nancyfx -c nancyfx.config --additional-properties "optionalProjectFile=false"
Suggest a fix/enhancement
Add a setter and set it like CSharpClientCodegen does (or better yet, pull the code into the AbstractCSharpCodgen class where the flag is declared)
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
Start with the nancyfx generator's processOpts() and the optionalProjectFileFlag, then compare how CSharpClientCodegen sets the corresponding option. Verify that passing optionalProjectFile=false prevents the solution and project templates from being included and created; consider whether the shared behavior belongs in AbstractCSharpCodgen as suggested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, java
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100