| 1 | package com.fwmotion.threescale.cms.support; | |
| 2 | ||
| 3 | import com.fasterxml.jackson.databind.ObjectMapper; | |
| 4 | import com.fwmotion.threescale.cms.mixins.EnumHandlerMixIn; | |
| 5 | import com.redhat.threescale.rest.cms.ApiClient; | |
| 6 | import com.redhat.threescale.rest.cms.model.EnumHandler; | |
| 7 | import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; | |
| 8 | ||
| 9 | public final class ApiClientBuilder { | |
| 10 | ||
| 11 | private ApiClientBuilder() { | |
| 12 | } | |
| 13 | ||
| 14 | public static ApiClient buildApiClient(CloseableHttpClient httpClient) { | |
| 15 | ApiClient apiClient = new ApiClient(httpClient); | |
| 16 | ||
| 17 |
1
1. buildApiClient : removed call to com/fwmotion/threescale/cms/support/ApiClientBuilder::applyMixIns → SURVIVED |
applyMixIns(apiClient.getObjectMapper()); |
| 18 | ||
| 19 |
1
1. buildApiClient : replaced return value with null for com/fwmotion/threescale/cms/support/ApiClientBuilder::buildApiClient → KILLED |
return apiClient; |
| 20 | } | |
| 21 | ||
| 22 | /** | |
| 23 | * openapi-generator doesn't generate things exactly as intended in some | |
| 24 | * cases, so use mixins to fix | |
| 25 | * | |
| 26 | * @param objectMapper the Jackson {@link ObjectMapper} to apply MixIns | |
| 27 | */ | |
| 28 | static void applyMixIns(ObjectMapper objectMapper) { | |
| 29 | objectMapper.addMixIn(EnumHandler.class, EnumHandlerMixIn.class); | |
| 30 | } | |
| 31 | ||
| 32 | } | |
Mutations | ||
| 17 |
1.1 |
|
| 19 |
1.1 |