mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-05-16 00:21:19 +00:00
added library, date library
This commit is contained in:
@@ -49,6 +49,8 @@ public class JaxRSServerOptionsTest extends JavaClientOptionsTest {
|
||||
times = 1;
|
||||
clientCodegen.setFullJavaUtil(Boolean.valueOf(JaxRSServerOptionsProvider.FULL_JAVA_UTIL_VALUE));
|
||||
times = 1;
|
||||
clientCodegen.setDateLibrary("joda");
|
||||
times = 1;
|
||||
}};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
package io.swagger.codegen.options;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import io.swagger.codegen.languages.JaxRSServerCodegen;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class JaxRSServerOptionsProvider extends JavaOptionsProvider {
|
||||
public static final String JODA_DATE_LIBRARY = "joda";
|
||||
|
||||
@Override
|
||||
public boolean isServer() {
|
||||
return true;
|
||||
@@ -10,4 +17,15 @@ public class JaxRSServerOptionsProvider extends JavaOptionsProvider {
|
||||
public String getLanguage() {
|
||||
return "jaxrs";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> createOptions() {
|
||||
Map<String, String> options = super.createOptions();
|
||||
|
||||
ImmutableMap.Builder<String, String> builder = new ImmutableMap.Builder<String, String>();
|
||||
builder.putAll(options)
|
||||
.put(JaxRSServerCodegen.DATE_LIBRARY, "joda");
|
||||
|
||||
return builder.build();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user