forked from loafle/openapi-generator-original
Merge pull request #3003 from Cosium/feign-disable-fail_on_unknwon_properties
Feign: disable FAIL_ON_UNKNOWN_PROPERTIES by default
This commit is contained in:
@@ -22,7 +22,7 @@ import {{invokerPackage}}.auth.OAuth.AccessTokenListener;
|
||||
public class ApiClient {
|
||||
public interface Api {}
|
||||
|
||||
private ObjectMapper objectMapper;
|
||||
protected ObjectMapper objectMapper;
|
||||
private String basePath = "{{basePath}}";
|
||||
private Map<String, RequestInterceptor> apiAuthorizations;
|
||||
private Feign.Builder feignBuilder;
|
||||
@@ -128,6 +128,11 @@ public class ApiClient {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
|
||||
objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
|
||||
objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
|
||||
return objectMapper;
|
||||
}
|
||||
|
||||
public ObjectMapper getObjectMapper(){
|
||||
return objectMapper;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user