|
15 | 15 | import java.util.Arrays;
|
16 | 16 | import java.util.EnumSet;
|
17 | 17 | import java.util.HashMap;
|
| 18 | +import java.util.Map; |
18 | 19 |
|
19 | 20 | import static org.openapitools.codegen.CodegenConstants.INVOKER_PACKAGE;
|
20 | 21 |
|
@@ -97,18 +98,18 @@ public JavaMicronautClientCodegen() {
|
97 | 98 | cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations", useBeanValidation));
|
98 | 99 |
|
99 | 100 | CliOption buildToolOption = new CliOption(OPT_BUILD, "Specify for which build tool to generate files").defaultValue(buildTool);
|
100 |
| - buildToolOption.setEnum(new HashMap<String, String>() {{ |
101 |
| - put(OPT_BUILD_GRADLE, "Gradle configuration is generated for the project"); |
102 |
| - put(OPT_BUILD_MAVEN, "Maven configuration is generated for the project"); |
103 |
| - put(OPT_BUILD_ALL, "Both Gradle and Maven configurations are generated"); |
104 |
| - }}); |
| 101 | + Map buildToolOptionMap = new HashMap(); |
| 102 | + buildToolOptionMap.put(OPT_BUILD_GRADLE, "Gradle configuration is generated for the project"); |
| 103 | + buildToolOptionMap.put(OPT_BUILD_MAVEN, "Maven configuration is generated for the project"); |
| 104 | + buildToolOptionMap.put(OPT_BUILD_ALL, "Both Gradle and Maven configurations are generated"); |
| 105 | + buildToolOption.setEnum(buildToolOptionMap); |
105 | 106 | cliOptions.add(buildToolOption);
|
106 | 107 |
|
107 | 108 | CliOption testToolOption = new CliOption(OPT_TEST, "Specify which test tool to generate files for").defaultValue(testTool);
|
108 |
| - testToolOption.setEnum(new HashMap<String, String>() {{ |
109 |
| - put(OPT_TEST_JUNIT, "Use JUnit as test tool"); |
110 |
| - put(OPT_TEST_SPOCK, "Use Spock as test tool"); |
111 |
| - }}); |
| 109 | + Map testToolOptionMap = new HashMap(); |
| 110 | + testToolOptionMap.put(OPT_TEST_JUNIT, "Use JUnit as test tool"); |
| 111 | + testToolOptionMap.put(OPT_TEST_SPOCK, "Use Spock as test tool"); |
| 112 | + testToolOption.setEnum(testToolOptionMap); |
112 | 113 | cliOptions.add(testToolOption);
|
113 | 114 |
|
114 | 115 | // Remove the date library option
|
|
0 commit comments