forked from loafle/openapi-generator-original
Merge pull request #4072 from cbornet/spring_response_wrappers
[spring] add an option to choose the response wrapper type
This commit is contained in:
@@ -15,6 +15,7 @@ public class SpringOptionsProvider extends JavaOptionsProvider {
|
||||
public static final String SINGLE_CONTENT_TYPES = "true";
|
||||
public static final String JAVA_8 = "true";
|
||||
public static final String ASYNC = "true";
|
||||
public static final String RESPONSE_WRAPPER = "Callable";
|
||||
|
||||
@Override
|
||||
public String getLanguage() {
|
||||
@@ -32,6 +33,7 @@ public class SpringOptionsProvider extends JavaOptionsProvider {
|
||||
options.put(SpringCodegen.SINGLE_CONTENT_TYPES, SINGLE_CONTENT_TYPES);
|
||||
options.put(SpringCodegen.JAVA_8, JAVA_8);
|
||||
options.put(SpringCodegen.ASYNC, ASYNC);
|
||||
options.put(SpringCodegen.RESPONSE_WRAPPER, RESPONSE_WRAPPER);
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
@@ -64,6 +64,8 @@ public class SpringOptionsTest extends JavaClientOptionsTest {
|
||||
times = 1;
|
||||
clientCodegen.setAsync(Boolean.valueOf(SpringOptionsProvider.ASYNC));
|
||||
times = 1;
|
||||
clientCodegen.setResponseWrapper(SpringOptionsProvider.RESPONSE_WRAPPER);
|
||||
times = 1;
|
||||
|
||||
}};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user