You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bug happens when running the Go generation with both generateUnmarshalJSON and generateMarshalJSON flags set to false.
Some of the resulting model files contain unused imports to bytes and fmt.
Unused imports are disallowed by the Go language, which results in the client being unable to compile
openapi-generator version
Version : openapi-generator-cli 7.12.0-SNAPSHOT
Commit : 9a9c108
Built: -999999999-01-01T00:00:00+18:00
I have found a temporary fix : run goimports -w . to fix the broken imports.
But ideally the broken imports should not be in the generated files in the first place
Description
The bug happens when running the Go generation with both generateUnmarshalJSON and generateMarshalJSON flags set to false.
Some of the resulting model files contain unused imports to
bytes
andfmt
.Unused imports are disallowed by the Go language, which results in the client being unable to compile
openapi-generator version
Version : openapi-generator-cli 7.12.0-SNAPSHOT
Commit : 9a9c108
Built: -999999999-01-01T00:00:00+18:00
OpenAPI declaration file content or url
https://api.reepay.com/openapi.json
Generation Details
Steps to reproduce
command above on any valid input
Related issues/PRs
Suggest a fix
I guess checking for unused imports after the generation, and then deleting them should do it
The text was updated successfully, but these errors were encountered: