forked from loafle/openapi-generator-original
add java8 and async options to springboot codegen
This commit is contained in:
@@ -12,6 +12,8 @@ public class SpringBootServerOptionsProvider extends JavaOptionsProvider {
|
||||
public static final String LIBRARY_VALUE = "j8-async"; //FIXME hidding value from super class
|
||||
public static final String INTERFACE_ONLY = "true";
|
||||
public static final String SINGLE_CONTENT_TYPES = "true";
|
||||
public static final String JAVA_8 = "true";
|
||||
public static final String ASYNC = "true";
|
||||
|
||||
@Override
|
||||
public String getLanguage() {
|
||||
@@ -26,6 +28,8 @@ public class SpringBootServerOptionsProvider extends JavaOptionsProvider {
|
||||
options.put(CodegenConstants.LIBRARY, LIBRARY_VALUE);
|
||||
options.put(SpringBootServerCodegen.INTERFACE_ONLY, INTERFACE_ONLY);
|
||||
options.put(SpringBootServerCodegen.SINGLE_CONTENT_TYPES, SINGLE_CONTENT_TYPES);
|
||||
options.put(SpringBootServerCodegen.JAVA_8, JAVA_8);
|
||||
options.put(SpringBootServerCodegen.ASYNC, ASYNC);
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
@@ -58,6 +58,10 @@ public class SpringBootServerOptionsTest extends JavaClientOptionsTest {
|
||||
times = 1;
|
||||
clientCodegen.setSingleContentTypes(Boolean.valueOf(SpringBootServerOptionsProvider.SINGLE_CONTENT_TYPES));
|
||||
times = 1;
|
||||
clientCodegen.setJava8(Boolean.valueOf(SpringBootServerOptionsProvider.JAVA_8));
|
||||
times = 1;
|
||||
clientCodegen.setAsync(Boolean.valueOf(SpringBootServerOptionsProvider.ASYNC));
|
||||
times = 1;
|
||||
|
||||
}};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user