swagger-api / swagger-api/swagger-codegen
custom codegen modules with Homebrew?
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
I installed Swagger via Homebrew. Now i'm wondering how to integrate custom codegen modules with it. I was able to replace the
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar meta \
-o output/myLibrary -n myClientCodegen -p com.my.company.codegen
command with
swagger-codegen meta \
-o output/myLibrary -n myClientCodegen -p com.my.company.codegen
but now i'm wondering how to use my custom module. After building it with Maven, the documentation states to
java -cp output/myLibrary/target/myClientCodegen-swagger-codegen-1.0.0.jar:modules/swagger-codegen-cli/target/swagger-codegen-cli.jar io.swagger.codegen.SwaggerCodegen
which results in
Error: Could not find or load main class io.swagger.codegen.SwaggerCodegen
Caused by: java.lang.ClassNotFoundException: io.swagger.codegen.SwaggerCodegen
I tried mvn clean install instead of mvn package, hoping the swagger-codegen command would then find the installed package for the new module, but that didn't work. Is there any way to do this, or do i have to install Swagger via Maven?
Swagger-codegen version
idk, swagger-codegen doesn't recognize the --version parameter. Installed last friday, so a very current stable release ;)
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 failure using the Homebrew swagger-codegen command and the classpath shown in the issue. Read the custom module instructions around modules/swagger-codegen-cli and output/myLibrary, then determine whether the documented invocation works with the Homebrew installation. Done means the supported integration path or limitation is documented and verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100