Open tony95271 opened 1 year ago
We found several problems when using the Go generator version 6.2.1 to generate client code inside our Go project,
package xxx_test import ( "context" "testing" openapiclient "path/to/our/go/project/gen/xxx/openapi" // ... )
got
package xxx_test import ( "context" "testing" openapiclient "../openapi" // ... )
the xxx is packageName option pass to Go generator tool via configuration file.
xxx
packageName
BTW: the option isGoSubmodule does not help no matter set it true or false.
isGoSubmodule
We have to remove go.mod go.sum from client source code folder to fix it by manual every time we update client code.
Please consider providing two options noTest one for disable generating test code, and another noGoMod for diable go.mod go.sum, thanks.
noTest
noGoMod
https://openapi-generator.tech/docs/generators/go/#config-options
+1 please 😭
Is your feature request related to a problem? Please describe.
We found several problems when using the Go generator version 6.2.1 to generate client code inside our Go project,
expected path/to/gen/test/api_xxx.test.go
got
the
xxx
ispackageName
option pass to Go generator tool via configuration file.BTW: the option
isGoSubmodule
does not help no matter set it true or false.We have to remove go.mod go.sum from client source code folder to fix it by manual every time we update client code.
Describe the solution you'd like
Please consider providing two options
noTest
one for disable generating test code, and anothernoGoMod
for diable go.mod go.sum, thanks.https://openapi-generator.tech/docs/generators/go/#config-options
Describe alternatives you've considered
Additional context