Swagger-codegen: Golang stub code generation issue v.3.0.0

Created on 26 Sep 2018  路  9Comments  路  Source: swagger-api/swagger-codegen

Version

Golang stub code generation issue v3.0.0
OpenAPI v3

Description

Hello, I was trying to generate a Golang server stub following the steps here https://github.com/swagger-api/swagger-codegen/wiki/Server-stub-generator-HOWTO#go-server but
either it doesn't build(1st screenshot) or can not generate Golang code because it doesn't exist for it (2nd screenshot).

Steps to reproduce
  1. Following the steps here
    https://github.com/swagger-api/swagger-codegen/wiki/Server-stub-generator-HOWTO#go-server

it can't even build the project, it is also pointing to v2.4.0.

Maven output :

ps-codegen

  1. If you download the zip from https://github.com/swagger-api/swagger-codegen/releases and then extract and build it using the steps here https://github.com/swagger-api/swagger-codegen/wiki/Server-stub-generator-HOWTO#go-server - it builds. But when you try to generate a Golang server stub it gives this error

cmd-codegen3 0 0

Hopefully this will be fixed soon :)

General OAS 3.0 spec support

Most helpful comment

hello @adamdecaf for codegen v3, we place the generator class in this repo: https://github.com/swagger-api/swagger-codegen-generators

We have been working on generator classes migration and Golang is in plan.

All 9 comments

i thought the problem was you were generating code files in a Music folder 馃槅

Now, seriously. We have present this issue. i'll try to fix it the maven build soon. and hope to add go generator next week. i'll let you know here.

I ran into this as well (generating a client) Need any help?

I noticed the Go client/server classes still exist, but maybe aren't registered?

https://github.com/swagger-api/swagger-codegen/blob/4607a90d7b69463a0ae8fc94fac68fc95d80965e/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/GoClientCodegen.java

hello @adamdecaf for codegen v3, we place the generator class in this repo: https://github.com/swagger-api/swagger-codegen-generators

We have been working on generator classes migration and Golang is in plan.

Cool! Have you started on the Go generator? I could try and poke around to get that going.

@adamdecaf i'll try to get it done for earlier next week. if you can help me with some feedback it would be pretty helpful

Hello friends! Any update on this issue? I'd be happy to be a beta tester for this go generation.

it seems the V3.0.8 is not supporting GoLang codegen. can anyone please update by when the codegen support for OpenAPIV3 support will be provided for GoLang?

I use v4.0.2 to generate Go clients. You should try the 4.x series of openapi-generator.

Was this page helpful?
0 / 5 - 0 ratings