Skip to content

Commit 67e5154

Browse files
authored
Adding the useOptional in the ApiController (#6735)
* Adding the useOptional in the ApiController * If jdk8 is disabled but useOptional is enabled, avoid duplicate import.
1 parent a3f0125 commit 67e5154

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

modules/openapi-generator/src/main/resources/JavaSpring/apiController.mustache

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ import javax.validation.Valid;
3737
{{#jdk8}}
3838
import java.util.Optional;
3939
{{/jdk8}}
40+
{{^jdk8}}
41+
{{#useOptional}}
42+
import java.util.Optional;
43+
{{/useOptional}}
44+
{{/jdk8}}
4045
{{^jdk8}}
4146
import java.util.List;
4247
import java.util.Map;

0 commit comments

Comments
 (0)