swagger-api / swagger-api/swagger-codegen
CLI option for help/documentation does not work as described
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Following the README I tried to get documentation for the generate command with:
java -jar swagger-codegen-cli-3.0.35.jar help generate
The output is not the documentation, but this:
usage: swagger-codegen [-h] Command ...
named arguments:
-h, --help show this help message and exit
commands:
Command additional help
generate generate
config-help config-help
meta meta
langs langs
version version
Swagger-codegen version
The latest from Maven Central, 3.0.35.
Swagger declaration file content or url
None
Command line used for generation
java -jar swagger-codegen-cli-3.0.35.jar help generate
Also tried
java -jar swagger-codegen-cli-3.0.35.jar -h generate
java -jar swagger-codegen-cli-3.0.35.jar --help generate
with the same result.
This suggestion:
java -jar swagger-codegen-cli-3.0.35.jar config-help
Crashes the program with:
Exception in thread "Thread-0" java.lang.NullPointerException
at java.base/java.lang.String.concat(Unknown Source)
at io.swagger.codegen.v3.CodegenConfigLoader.forName(CodegenConfigLoader.java:31)
at io.swagger.codegen.v3.cli.cmd.ConfigHelp.run(ConfigHelp.java:17)
at java.base/java.lang.Thread.run(Unknown Source)
Steps to reproduce
See description above.
Related issues/PRs
Suggest a fix/enhancement
Do not hide the documentation in the command, but include it this repo and link from the README.
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 README command examples and the stack-trace locations in CodegenConfigLoader.java and ConfigHelp.java. Reproduce the documented help and config-help commands, then verify that the CLI returns the expected documentation without crashing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100