swagger-api / swagger-api/swagger-codegen
[codegen, JAVA] Trying to generate mustache template variables but get full codegen output instead
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
I'm following the information here: https://github.com/swagger-api/swagger-codegen/wiki/Mustache-Template-Variables
Attempting to generate either the models or the operations will load the full codegen folder instead of a json file with variables as expected
its as if the -DdebugOperations or -DdebugModels flags are not being recognized
Swagger-codegen version
2.4.0 (master)
Command line used for generation
java -DdebugOperations -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i http://petstore.swagger.io/v2/swagger.json -l csharp -o operations.json
Steps to reproduce
- Check out master (2.4.0)
- Run
mvn clean install -DskipTests - run above command to attempt to generate operations variables into a file called operations.json, note that a directory is created with full codegen output instead. The same occurs when trying to generate models
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 CLI generation path built by modules/swagger-codegen-cli and reproduce the command using -DdebugOperations, then compare it with -DdebugModels. Verify whether these flags are recognized during the Maven-built CLI invocation. Done means the requested debug output is written as a JSON file instead of a full generated code directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100