Swagger-codegen: [Go] Missing client generator?

Created on 2 Jan 2019  路  8Comments  路  Source: swagger-api/swagger-codegen

Description

Missing Go client generator

Swagger-codegen version

3.0.3

Swagger declaration file content or url

swagger.yaml

Command line used for generation

swagger-codegen generate -i https://raw.githubusercontent.com/danikarik/clicksend-go/master/api/swagger.yaml -l go -o ./ -DpackageName clicksend

Steps to reproduce
mkdir clicksend-go
cd clicksend-go
swagger-codegen generate -i https://raw.githubusercontent.com/danikarik/clicksend-go/master/api/swagger.yaml -l go -o ./ -DpackageName clicksend
Related issues/PRs
Suggest a fix/enhancement

Most helpful comment

I'm getting the same issue.

Full exception:

Exception in thread "main" java.lang.RuntimeException: Can't load config class with name go Available: aspnetcore
csharp
csharp-dotnet2
dynamic-html
html
html2
java
jaxrs-cxf-client
jaxrs-cxf
inflector
jaxrs-cxf-cdi
jaxrs-spec
jaxrs-jersey
jaxrs-di
jaxrs-resteasy-eap
jaxrs-resteasy
spring
openapi
openapi-yaml
kotlin-client
kotlin-server
php
scala
scala-akka-http-server
swift3
swift4
typescript-angular

    at io.swagger.codegen.v3.CodegenConfigLoader.forName(CodegenConfigLoader.java:31)
    at io.swagger.codegen.v3.cli.SwaggerCodegen.main(SwaggerCodegen.java:96)
Caused by: java.lang.ClassNotFoundException: go
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at io.swagger.codegen.v3.CodegenConfigLoader.forName(CodegenConfigLoader.java:29)
    ... 1 more

All 8 comments

I'm getting the same issue.

Full exception:

Exception in thread "main" java.lang.RuntimeException: Can't load config class with name go Available: aspnetcore
csharp
csharp-dotnet2
dynamic-html
html
html2
java
jaxrs-cxf-client
jaxrs-cxf
inflector
jaxrs-cxf-cdi
jaxrs-spec
jaxrs-jersey
jaxrs-di
jaxrs-resteasy-eap
jaxrs-resteasy
spring
openapi
openapi-yaml
kotlin-client
kotlin-server
php
scala
scala-akka-http-server
swift3
swift4
typescript-angular

    at io.swagger.codegen.v3.CodegenConfigLoader.forName(CodegenConfigLoader.java:31)
    at io.swagger.codegen.v3.cli.SwaggerCodegen.main(SwaggerCodegen.java:96)
Caused by: java.lang.ClassNotFoundException: go
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at io.swagger.codegen.v3.CodegenConfigLoader.forName(CodegenConfigLoader.java:29)
    ... 1 more

As I understood, swagger-codegen doesn't support Golang, Ruby and other missed languages from @nitrocode language list for version 3. Check release notes for list of supported languages

If you want to add a generator to version 3, the generators are now in a separate repository

I've searched through the docs but can't seem to see any guides for installing these other generators. How do you use them?

hey guys, actually go generator was recently added:
https://github.com/swagger-api/swagger-codegen-generators/pull/641

@HugoMario Thanks for your reply. I appreciate that the generator was added to the repository, but I'm also looking for the typescript-fetch / typescript-axios generators. I was pointed to the separate repository to indicate it's there, but there is no explanation of how to use them?

@jonlambert
We have typescript-fetch only available for codegen v2 only, i expect to ported to v3 this week, i'll let you know.

about Typescript axios, it's not supported yet on any of the codegen versions. I'll try to take a time to get involve with it and see what can i do to add it

Hey,
I want to use swagger-codegen for ruby. But I get below exception:
Exception in thread "main" java.lang.RuntimeException: Can't load config class with name ruby

What do I need to change/add?

Thanks in advance for any help.

Was this page helpful?
0 / 5 - 0 ratings