swagger-api / swagger-api/swagger-codegen

[nancyfx] The CLI option "optionalProjectFile" does nothing

Open
#7,746 0 comments 0 reactions 0 assignees View on GitHub

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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.