openapi-typescript-codegen icon indicating copy to clipboard operation
openapi-typescript-codegen copied to clipboard

Two consecutive blank lines are generated at the end of files

Open IrvingWash opened this issue 2 years ago • 3 comments

Describe the bug An excess blank line is added to the generated files, at least when using these options

openapi -i my-source-folder/rest-api.yaml -o my-output-folder/openapi --exportCore false --exportServices false --useUnionTypes --indent tab

IrvingWash avatar May 12 '23 09:05 IrvingWash

This is relevant when using the end-of-file-fixer pre-commit hook. The two newlines will cause the hook to fail.

calohmn avatar Aug 02 '23 03:08 calohmn

is there a solution for this? Having same problem while working with users which using Windows 11 (generating 1 line) and me working with Linux Ubuntu 22.04 (generating 2 lines.). Please solve this issue, having too many new github changes. Otherwise library is perfect

spanwair avatar Aug 31 '23 06:08 spanwair

@spanwair why don't you use a tool like Prettier to format the output according to your rules?

mrlubos avatar Mar 13 '24 10:03 mrlubos