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
When attempting to generate GO clients from a schema that uses Enums, it fails with error :
15:58:49.856 [main] INFO i.s.c.v.g.t.AbstractTypeScriptClientCodegen - Template folder: null
15:58:49.856 [main] INFO i.s.c.v.g.t.AbstractTypeScriptClientCodegen - Template engine: io.swagger.codegen.v3.templates.HandlebarTemplateEngine@e98770d
15:58:49.877 [Thread-0] INFO i.s.c.v.g.t.AbstractTypeScriptClientCodegen - Template folder: null
15:58:49.878 [Thread-0] INFO i.s.c.v.g.t.AbstractTypeScriptClientCodegen - Template engine: io.swagger.codegen.v3.templates.HandlebarTemplateEngine@53ba3063
Exception in thread "Thread-0" java.lang.RuntimeException: Could not process model 'ASchemaName'.Please make sure that your schema is correct!
at io.swagger.codegen.v3.DefaultGenerator.generateModels(DefaultGenerator.java:391)
at io.swagger.codegen.v3.DefaultGenerator.generate(DefaultGenerator.java:793)
at io.swagger.codegen.v3.cli.cmd.Generate.run(Generate.java:388)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "codegenModel.dataType" is null
at io.swagger.codegen.v3.generators.DefaultCodegenConfig.fromModel(DefaultCodegenConfig.java:1466)
at io.swagger.codegen.v3.generators.go.AbstractGoCodegen.fromModel(AbstractGoCodegen.java:565)
at io.swagger.codegen.v3.DefaultGenerator.processModels(DefaultGenerator.java:1068)
at io.swagger.codegen.v3.DefaultGenerator.generateModels(DefaultGenerator.java:380)
... 3 more
Swagger-codegen version
Whichever version is in the docker image swaggerapi/swagger-codegen-cli-v3. 3.0.59?
Description
When attempting to generate GO clients from a schema that uses Enums, it fails with error :
Swagger-codegen version
Whichever version is in the docker image swaggerapi/swagger-codegen-cli-v3. 3.0.59?
Swagger declaration file content or url
Command line used for generation
This works
docker run --rm -v ${PWD}:/local swaggerapi/swagger-codegen-cli-v3 generate -i /local/simplest.yml -l javascript -o /local/out/go
This does not
docker run --rm -v ${PWD}:/local swaggerapi/swagger-codegen-cli-v3 generate -i /local/simplest.yml -l go -o /local/out/go
Steps to reproduce
docker run --rm -v ${PWD}:/local swaggerapi/swagger-codegen-cli-v3 generate -i /local/simplest.yml -l go -o /local/out/go
Related issues/PRs
Unknown
Suggest a fix/enhancement
The text was updated successfully, but these errors were encountered: