Replace ^M with new line (\r) in mustache template#3865
Replace ^M with new line (\r) in mustache template#3865wing328 merged 7 commits intoswagger-api:masterfrom
Conversation
ePaul
left a comment
There was a problem hiding this comment.
I don't see any change in the model.mustache file, so maybe that was added in a different pull request.
| /** | ||
| * Pet | ||
| * A pet for sale in the pet store | ||
| */ |
There was a problem hiding this comment.
Hmm, now the comment is here twice?
There was a problem hiding this comment.
This seems to be happening for all the java model files.
There was a problem hiding this comment.
I don't see duplicated comments. Can you share a URL to the lines of code with duplicated comments in the latest master?
There was a problem hiding this comment.
@ePaul thanks for the details. I'll take a deeper look tomorrow.
|
@wing328 Just a note about terminology: \r and ^M represent the same thing, the carriage return character (aka CR, 0x0D, U+000D). Newline is also known as Line feed, 0x0A, LF, \n, ^J, U+000A. I think you meant to say you replaced all CRLF sequences (and possibly some single CRs?) by just LF (\n). (I couldn't really see what changed in the diffs, but that would be my guess as this fixes what Windows editors do wrong sometimes.) |
|
@Epual you're definitely right. Actually I used \r when using grep and ^M in vim. The title was (incorrectly) "borrowed" from a stackoverflow question and I'll be more careful with the terminology moving forward. |
* upstream/master: (79 commits) add undertow Add a new cli command to output version information (2nd attempt) swagger-api#3892 (swagger-api#3899) fix python flask controller without tag (default_controller) [aspnet5] Fix basePath application to operations (swagger-api#3911) Bugfix/issue 3723 (swagger-api#3726) Cgardens nested object regex (swagger-api#3879) [Cpprest] Fixing issue swagger-api#3773 (swagger-api#3876) escape callback parameter for java(okhttp) and python fix warning in html generator [PHP] fix PHPUnit invocation, add basic phpunit.xml.dist (swagger-api#3864) [Java] Remove duplicated model description in Spring, JAX-RS models (swagger-api#3887) [PHP] Better PSR2 compatibility (swagger-api#3863) Mention security script in pull request template [Swift] Use thread safe manager dictionary Replace ^M with new line (\r) in mustache template (swagger-api#3865) [swfit] fix url param with base name [JaxRS]Show correct default value on CLI option description (swagger-api#3862) add title, description to HTML output (swagger-api#3860) fix trailing comma in go api client fix typescript-fetch base path by removing ending slash ...
|
FYI. Added scripts to detect the issue moving forward via #4526 |
PR checklist
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.shif updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates)2.3.0branch for breaking (non-backward compatible) changes.Description of the PR
Replace ^M with new line (\r) in the mustache templates under
modules/swagger-codegen/src/main/resourcesTODO: update CI (travis) to catch the issue moving forward.