Skip to content

[BUG] openapi-generator-maven-plugin generates incorrect package import for go-server #8448

@jixuan1989

Description

@jixuan1989
Description

When using openapi-generator-maven-plugin to generate go-server codes, there are two errors in the generated codes:
(openapi-generator-version is 5.0.0)

  1. "mime/multipart" is forget to import in router.go
  2. `github.com/gorilla/mux` should not be imported in `api_default.go` file.
    

How to produce:

I can stable reproduce it using the following file:

  1. get codes from: https://github.com/apache/iotdb/tree/openapi/openapi
  2. run mvn generate-codes
  3. the generated source is under target/generated-sources/go

see the codes and error tips by GoLand.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions