@@ -63,7 +63,7 @@ public class CreateCmd extends Cmd {
6363 private boolean kotlin ;
6464
6565 @ CommandLine .Option (
66- names = {"-s" , "- -stork" },
66+ names = {"--stork" },
6767 description = "Add Stork Maven plugin to build (Maven only)"
6868 )
6969 private boolean stork ;
@@ -81,7 +81,7 @@ public class CreateCmd extends Cmd {
8181 private String server ;
8282
8383 @ CommandLine .Option (
84- names = {"-d" , "- -docker" },
84+ names = {"--docker" },
8585 description = "Generates a Dockerfile"
8686 )
8787 private boolean docker ;
@@ -92,6 +92,12 @@ public class CreateCmd extends Cmd {
9292 )
9393 private boolean mvc ;
9494
95+ @ CommandLine .Option (
96+ names = {"--openapi" },
97+ description = "Configure build to generate OpenAPI files"
98+ )
99+ private boolean openapi ;
100+
95101 @ Override public void run (@ Nonnull Context ctx ) throws Exception {
96102 Path projectDir = ctx .getWorkspace ().resolve (name );
97103 if (Files .exists (projectDir )) {
@@ -116,6 +122,8 @@ public class CreateCmd extends Cmd {
116122
117123 mvc = yesNo (ctx .readLine ("Use MVC (yes/No): " ));
118124
125+ openapi = yesNo (ctx .readLine ("Configure OpenAPI (yes/No): " ));
126+
119127 server = server (ctx .readLine ("Choose a server (jetty, netty or undertow): " ));
120128
121129 if (!gradle ) {
@@ -157,6 +165,8 @@ public class CreateCmd extends Cmd {
157165 }
158166
159167 Map <String , Object > model = new HashMap <>();
168+ model .putAll (ctx .getDependencyMap ());
169+
160170 model .put ("package" , packageName );
161171 model .put ("groupId" , packageName );
162172 model .put ("artifactId" , name );
@@ -171,6 +181,7 @@ public class CreateCmd extends Cmd {
171181 model .put ("maven" , !gradle );
172182 model .put ("docker" , docker );
173183 model .put ("mvc" , mvc );
184+ model .put ("openapi" , openapi );
174185 model .put ("kapt" , mvc && kotlin );
175186 model .put ("apt" , mvc && !kotlin );
176187 model .put ("finalArtifactId" , finalArtifactId );
0 commit comments