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
Go client generator will create model files that end in _test.go when a definition / schema name ends in Test, _Test, or _test. These files are unreachable and not compiled in Go per the following:
When compiling packages, build ignores files that end in '_test.go'.
Description
Go client generator will create model files that end in
_test.go
when a definition / schema name ends inTest
,_Test
, or_test
. These files are unreachable and not compiled in Go per the following:Ref: https://godoc.org/github.com/golang/go/src/cmd/go#hdr-Test_packages
The client generator should modify the filename when this is encountered.
openapi-generator version
3.0.3
OpenAPI declaration file content or url
https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
Command line used for generation
Steps to reproduce
Create a program that attempts to use the following generated structs which are created by the spec and command above.
ArrayTest
ArrayTest
model_array_test.go
Enum_Test
EnumTest
model_enum_test.go
format_test
FormatTest
model_format_test.go
MapTest
MapTest
model_map_test.go
Related issues/PRs
#449
Suggest a fix/enhancement
Rename the files with an alternate suffix like
_test_.go
formodel_array_test_.go
similar totoParamName
.The text was updated successfully, but these errors were encountered: