Swagger codegen produces different line endings / newlines / CRLF

1,317 views
Skip to first unread message

rudie...@gmail.com

unread,
Dec 15, 2016, 4:30:50 AM12/15/16
to Swagger
Hey guys,

we're writing an API client with the following setup:
- existing yaml file
- target language: Java
- swagger-codegen-maven-plugin (2.2.1)

Our problem: This setup produces Java files with LF newlines on one machine and CRLF newlines on another. 
Both machines are pretty similar and most of all: both are Windows 7 machines!

Any ideas that could help us track down the reason for this are appreciated.

Greets
Rudy

rudie...@gmail.com

unread,
Dec 15, 2016, 5:50:20 AM12/15/16
to Swagger
The following solved the problem:
git config --global core.autocrlf false
So it wasn't a Swagger problem at all, but introduced by a gi pull.
Swagger codegen obviously uses LF in every case.

Anyway, and just out of curiosity:
Is there an easy way to tell Swagger codegen, whether to use LF or CRLF ?
Reply all
Reply to author
Forward
0 new messages