swagger-api / swagger-api/swagger-codegen
Files aren't renamed if the new filename only differs in casing from old filename
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
This issue came up when we upgraded from swagger-codegen 2.2.3 to 2.3.1. This upgrade resulted in most of our generated files to be regenerated. However, there was a change in filename casing which wasn't picked up by swagger.
The old convention was: 'Test.ts' while the new one is 'test.ts'. After the regeneration was done, all files had updated contents but the file names weren't updated.
Current behaviour:
Filename Before upgrade: 'Test.ts'
Filename After upgrade: 'Test.ts'
Expected behaviour:
Filename Before upgrade: 'Test.ts'
Filename After upgrade: 'test.ts'
After removing all files and regeneration them again they generated with the proper file names.
Swagger-codegen version
2.3.1
Swagger declaration file content or url
N/A
Command line used for generation
swagger-codegen-maven-plugin
Steps to reproduce
- Generate typescript-angular2 code with swagger-codegen-maven-plugin:2.2.3
- Generate typescript-angular code with swagger-codegen-maven-plugin:2.3.1
Related issues/PRs
N/A
Suggest a fix/enhancement
N/A
OS
macOS High Sierra 10.13.6
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 at the swagger-codegen-maven-plugin entry point and reproduce generation first with typescript-angular2 on version 2.2.3, then typescript-angular on 2.3.1. The fix is complete when an existing Test.ts is renamed to test.ts during regeneration without deleting the generated files first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100