Skip to content

Commit

Permalink
fix: change condition for the optional antihax/optional imports in ge…
Browse files Browse the repository at this point in the history
…nerated Go code.
  • Loading branch information
michal-raska committed Sep 6, 2022
1 parent 17ec424 commit fb3b2bd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ public Map<String, Object> postProcessOperations(Map<String, Object> objs) {
}
}

// import "optionals" package if the parameter is primitive and optional
if (!param.required && param.isPrimitiveType) {
// import "optionals" package if the parameter is optional
if (!param.required) {
if (!addedOptionalImport) {
imports.add(createMapping("import", "github.com/antihax/optional"));
addedOptionalImport = true;
Expand Down

0 comments on commit fb3b2bd

Please sign in to comment.