forked from loafle/openapi-generator-original
add test for options #4091
This commit is contained in:
parent
5b532fd10e
commit
24f486164a
@ -56,6 +56,8 @@ public class JaxRSServerOptionsTest extends AbstractOptionsTest {
|
|||||||
times = 1;
|
times = 1;
|
||||||
clientCodegen.setSupportJava6(false);
|
clientCodegen.setSupportJava6(false);
|
||||||
times = 1;
|
times = 1;
|
||||||
|
clientCodegen.setUseBeanValidation(Boolean.valueOf(JaxRSServerOptionsProvider.USE_BEANVALIDATION));
|
||||||
|
times = 1;
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package io.swagger.codegen.options;
|
|||||||
|
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
import io.swagger.codegen.CodegenConstants;
|
import io.swagger.codegen.CodegenConstants;
|
||||||
|
import io.swagger.codegen.languages.JavaCXFServerCodegen;
|
||||||
import io.swagger.codegen.languages.JavaClientCodegen;
|
import io.swagger.codegen.languages.JavaClientCodegen;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -25,6 +26,8 @@ public class JaxRSServerOptionsProvider implements OptionsProvider {
|
|||||||
public static final String JODA_DATE_LIBRARY = "joda";
|
public static final String JODA_DATE_LIBRARY = "joda";
|
||||||
public static final String IMPL_FOLDER_VALUE = "src/main/java/impl";
|
public static final String IMPL_FOLDER_VALUE = "src/main/java/impl";
|
||||||
public static final String JAXRS_DEFAULT_LIBRARY_VALUE = "jersey1";
|
public static final String JAXRS_DEFAULT_LIBRARY_VALUE = "jersey1";
|
||||||
|
public static final String USE_BEANVALIDATION = "true";
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isServer() {
|
public boolean isServer() {
|
||||||
@ -60,7 +63,8 @@ public class JaxRSServerOptionsProvider implements OptionsProvider {
|
|||||||
.put(CodegenConstants.LIBRARY, JAXRS_DEFAULT_LIBRARY_VALUE)
|
.put(CodegenConstants.LIBRARY, JAXRS_DEFAULT_LIBRARY_VALUE)
|
||||||
.put(CodegenConstants.SERIALIZE_BIG_DECIMAL_AS_STRING, "true")
|
.put(CodegenConstants.SERIALIZE_BIG_DECIMAL_AS_STRING, "true")
|
||||||
//.put(JavaClientCodegen.DATE_LIBRARY, "joda")
|
//.put(JavaClientCodegen.DATE_LIBRARY, "joda")
|
||||||
.put("hideGenerationTimestamp", "true");
|
.put("hideGenerationTimestamp", "true")
|
||||||
|
.put(JavaCXFServerCodegen.USE_BEANVALIDATION, USE_BEANVALIDATION);
|
||||||
|
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user