swagger-api / swagger-api/swagger-codegen
Error usin paramater -o in generate for the same folder
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
When you call swagger-cogen-cli in Windows, and you add has value for the parameter -o the simbol ".",
it add previously to the root the same, but didnt erase the "."
For example: If you are in the folder C:/swagger and you call like
java -jar swagger-codegen-cli.jar generate -l java -o ./generated/java/ -i ./json/swagger.json ..........
the console will show:
[main] INFO io.swagger.codegen.AbstractGenerator - writing file C:\swagger\.\generated\java
Swagger-codegen version
2.3.1
Swagger declaration file content or url
Command line used for generation
java -jar swagger-codegen-cli.jar generate -l java -o ./generated/java/ -i ./json/swagger.json
Steps to reproduce
Run it
Related issues/PRs
Suggest a fix/enhancement
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 by reproducing the Windows command shown in the issue with the swagger-codegen CLI and compare the output path when -o uses ./generated/java/. Trace how the generate command handles the output-directory argument. Done means the current-folder marker is normalized rather than retained in the generated path; the payload names no source files or tests.
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
- 42/100