forked from loafle/openapi-generator-original
fix optional import (#1083)
This commit is contained in:
parent
da8cf01dfa
commit
3a71e59e00
@ -374,8 +374,8 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// import "optionals" package if the parameter is primitive and optional
|
// import "optionals" package if the parameter is optional
|
||||||
if (!param.required && param.isPrimitiveType) {
|
if (!param.required) {
|
||||||
if (!addedOptionalImport) {
|
if (!addedOptionalImport) {
|
||||||
imports.add(createMapping("import", "github.com/antihax/optional"));
|
imports.add(createMapping("import", "github.com/antihax/optional"));
|
||||||
addedOptionalImport = true;
|
addedOptionalImport = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user