forked from loafle/openapi-generator-original
Support for GSON Decoder in Java Feign Generator (#14254)
* Supporting Gson decoder in Feign * Supporting Gson decoder in Feign * Fixing test failures - and ensuring Jackson is used as the default if nothing selected (back compatible) * Adding in sample files * Updating docs * Switching to echo server version * Adding feign-gson to the github workflow * Empty-Commit
This commit is contained in:
@@ -6,7 +6,6 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import feign.okhttp.OkHttpClient;
|
||||
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||
@@ -44,8 +43,8 @@ public class ApiClient {
|
||||
private Feign.Builder feignBuilder;
|
||||
|
||||
public ApiClient() {
|
||||
objectMapper = createObjectMapper();
|
||||
apiAuthorizations = new LinkedHashMap<String, RequestInterceptor>();
|
||||
objectMapper = createObjectMapper();
|
||||
feignBuilder = Feign.builder()
|
||||
.client(new OkHttpClient())
|
||||
.encoder(new FormEncoder(new JacksonEncoder(objectMapper)))
|
||||
@@ -148,6 +147,7 @@ public class ApiClient {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public ObjectMapper getObjectMapper(){
|
||||
return objectMapper;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user