forked from loafle/openapi-generator-original
[Go][Experimental] Avoid duplicated import in enum model (#6355)
* avoid double import of fmt * update go exp petstore oas3 * import for go client exp only
This commit is contained in:
parent
2f9aa282e5
commit
096b8f8828
@ -641,6 +641,10 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
|
||||
}
|
||||
}
|
||||
|
||||
if (this instanceof GoClientExperimentalCodegen && model.isEnum) {
|
||||
imports.add(createMapping("import", "fmt"));
|
||||
}
|
||||
|
||||
// if oneOf contains "null" type
|
||||
if (model.oneOf != null && !model.oneOf.isEmpty() && model.oneOf.contains("nil")) {
|
||||
model.isNullable = true;
|
||||
|
@ -1,7 +1,3 @@
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// {{{classname}}} {{#description}}{{{.}}}{{/description}}{{^description}}the model '{{{classname}}}'{{/description}}
|
||||
type {{{classname}}} {{^format}}{{dataType}}{{/format}}{{#format}}{{{format}}}{{/format}}
|
||||
|
||||
|
@ -11,9 +11,6 @@ package petstore
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
|
@ -11,9 +11,6 @@ package petstore
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
|
@ -11,9 +11,6 @@ package petstore
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
|
@ -11,9 +11,6 @@ package petstore
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
|
@ -11,9 +11,6 @@ package petstore
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
|
@ -11,9 +11,6 @@ package petstore
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
|
@ -11,9 +11,6 @@ package petstore
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user