swagger-codegen-ts
swagger-codegen-ts copied to clipboard
Controllers are generated with unused variable
After starting generate I receive an error in generated controllers.
The error is

generate function is same as test1 in tests
Libs:
"fp-ts": "^2.4.4",
"io-ts": "^2.0.1",
"io-ts-reporters": "^1.0.0",
"io-ts-types": "^0.5.2",
"@devexperts/swagger-codegen-ts": "^2.0.0-alpha.17",
"@devexperts/utils": "^1.0.0-alpha.11",
System: win10
Also, I checked tests here and got the same result.
STR:
- clone project
- yarn install
- yarn test:run

Could you provide the spec?
This is very annoying. @raveclassic do you happen to know how difficult to fix this?
Quickfix - just disable linting on the generated code.
We have the same issue. Vote for the fix! :)
Generally, generated code is not expected to be linted, neither adhere any codestyle. The only option available at the moment is a prettier config for formatting the code. Personally I do agree unused imports should be removed, but at the same time I don't get why this is a problem for the end project which should (and it really should) just disable linting of the generated code. We'd gladly review any PRs facing this issue, but at the moment we consider this as a low priority improvement.
Sounds reasonable :)