rewritten endpoint parsing
This commit is contained in:
parent
775b3b042d
commit
5eb12c6526
BIN
Calculator-1.0.0.zip
Normal file
BIN
Calculator-1.0.0.zip
Normal file
Binary file not shown.
@ -1,6 +1,7 @@
|
|||||||
package cz.trask.migration.impl.v45;
|
package cz.trask.migration.impl.v45;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -103,10 +104,10 @@ public class ExportToWso2FromV32 extends AbstractProcess {
|
|||||||
byte[] data = prepareApiZipFile32to45(client, ver, ref);
|
byte[] data = prepareApiZipFile32to45(client, ver, ref);
|
||||||
String fileName = api.getName() + "-" + ver.getVersion() + ".zip";
|
String fileName = api.getName() + "-" + ver.getVersion() + ".zip";
|
||||||
|
|
||||||
// FileOutputStream fos = new FileOutputStream(fileName);
|
FileOutputStream fos = new FileOutputStream(fileName);
|
||||||
// fos.write(data);
|
fos.write(data);
|
||||||
// fos.flush();
|
fos.flush();
|
||||||
// fos.close();
|
fos.close();
|
||||||
//System.exit(0);
|
//System.exit(0);
|
||||||
|
|
||||||
if (data != null && data.length > 0 && fileName != null && !fileName.isEmpty()) {
|
if (data != null && data.length > 0 && fileName != null && !fileName.isEmpty()) {
|
||||||
@ -185,12 +186,12 @@ public class ExportToWso2FromV32 extends AbstractProcess {
|
|||||||
addGenericPolicyMetadata(zos, baseDir + subDir, specialName.replace(".j2", ".yaml"), r);
|
addGenericPolicyMetadata(zos, baseDir + subDir, specialName.replace(".j2", ".yaml"), r);
|
||||||
} else if (FileType.POLICY_OUT.toString().equals(amd.getGroupId())) {
|
} else if (FileType.POLICY_OUT.toString().equals(amd.getGroupId())) {
|
||||||
subDir = "Policies/";
|
subDir = "Policies/";
|
||||||
specialName = r.getName().replace(".xml", "_v1_common.j2");
|
specialName = r.getName().replace(".xml", "_v1_api.j2");
|
||||||
content = convertSequenceToPolicy(content);
|
content = convertSequenceToPolicy(content);
|
||||||
addGenericPolicyMetadata(zos, baseDir + subDir, specialName.replace(".j2", ".yaml"), r);
|
addGenericPolicyMetadata(zos, baseDir + subDir, specialName.replace(".j2", ".yaml"), r);
|
||||||
} else if (FileType.POLICY_FAULT.toString().equals(amd.getGroupId())) {
|
} else if (FileType.POLICY_FAULT.toString().equals(amd.getGroupId())) {
|
||||||
subDir = "Policies/";
|
subDir = "Policies/";
|
||||||
specialName = r.getName().replace(".xml", "_v1_common.j2");
|
specialName = r.getName().replace(".xml", "_v1_api.j2");
|
||||||
content = convertSequenceToPolicy(content);
|
content = convertSequenceToPolicy(content);
|
||||||
addGenericPolicyMetadata(zos, baseDir + subDir, specialName.replace(".j2", ".yaml"), r);
|
addGenericPolicyMetadata(zos, baseDir + subDir, specialName.replace(".j2", ".yaml"), r);
|
||||||
} else if (FileType.OPENAPI.toString().equals(amd.getGroupId())) {
|
} else if (FileType.OPENAPI.toString().equals(amd.getGroupId())) {
|
||||||
|
|||||||
@ -3,12 +3,12 @@ package cz.trask.migration.mapper;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
|
||||||
import cz.trask.migration.AbstractProcess;
|
import cz.trask.migration.AbstractProcess;
|
||||||
@ -17,7 +17,6 @@ import cz.trask.migration.model.v45.ApiDefinition45;
|
|||||||
import cz.trask.migration.model.v45.ApiDefinition45.ApiPolicies;
|
import cz.trask.migration.model.v45.ApiDefinition45.ApiPolicies;
|
||||||
import cz.trask.migration.model.v45.ApiDefinition45.Operation;
|
import cz.trask.migration.model.v45.ApiDefinition45.Operation;
|
||||||
import cz.trask.migration.model.v45.ApiDefinition45.OperationPolicies;
|
import cz.trask.migration.model.v45.ApiDefinition45.OperationPolicies;
|
||||||
import cz.trask.migration.util.CredentialsDecoder;
|
|
||||||
|
|
||||||
public class ApiDefinitionMapper32to45 {
|
public class ApiDefinitionMapper32to45 {
|
||||||
|
|
||||||
@ -100,7 +99,7 @@ public class ApiDefinitionMapper32to45 {
|
|||||||
data.setCorsConfiguration(mapCors(oldApi.getCorsConfiguration()));
|
data.setCorsConfiguration(mapCors(oldApi.getCorsConfiguration()));
|
||||||
|
|
||||||
// ---------- endpoint ----------
|
// ---------- endpoint ----------
|
||||||
data.setEndpointConfig(mapEndpointConfig(oldApi.getEndpointConfig()));
|
data.setEndpointConfig(oldApi.getEndpointConfig());
|
||||||
data.setEndpointImplementationType(oldApi.getImplementation());
|
data.setEndpointImplementationType(oldApi.getImplementation());
|
||||||
|
|
||||||
// ---------- API policies ----------
|
// ---------- API policies ----------
|
||||||
@ -124,9 +123,15 @@ public class ApiDefinitionMapper32to45 {
|
|||||||
data.setGatewayType("wso2/synapse");
|
data.setGatewayType("wso2/synapse");
|
||||||
|
|
||||||
// ---------- business & monetization ----------
|
// ---------- business & monetization ----------
|
||||||
data.setBusinessInformation(oldApi.getMonetizationProperties());
|
data.setBusinessInformation(new HashMap<>());
|
||||||
data.setAdditionalProperties(Collections.emptyList());
|
data.getBusinessInformation().put("businessOwner", oldApi.getBusinessOwner());
|
||||||
data.setAdditionalPropertiesMap(oldApi.getAdditionalProperties());
|
data.getBusinessInformation().put("businessOwnerEmail", oldApi.getBusinessOwnerEmail());
|
||||||
|
data.getBusinessInformation().put("technicalOwner", oldApi.getTechnicalOwner());
|
||||||
|
data.getBusinessInformation().put("technicalOwnerEmail", oldApi.getTechnicalOwnerEmail());
|
||||||
|
|
||||||
|
// ---------- additional properties ----------
|
||||||
|
data.setAdditionalProperties(mapAdditionalProperties(oldApi.getAdditionalProperties()));
|
||||||
|
data.setAdditionalPropertiesMap(mapAdditionalPropertiesMap(oldApi.getAdditionalProperties()));
|
||||||
|
|
||||||
// ---------- subscription ----------
|
// ---------- subscription ----------
|
||||||
data.setSubscriptionAvailability(oldApi.getSubscriptionAvailability().toUpperCase());
|
data.setSubscriptionAvailability(oldApi.getSubscriptionAvailability().toUpperCase());
|
||||||
@ -146,6 +151,36 @@ public class ApiDefinitionMapper32to45 {
|
|||||||
return newApi;
|
return newApi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static List<Object> mapAdditionalProperties(Map<String, Object> additionalProperties) {
|
||||||
|
if (additionalProperties != null && !additionalProperties.isEmpty()) {
|
||||||
|
List<Object> list = new ArrayList<>();
|
||||||
|
for (Map.Entry<String, Object> entry : additionalProperties.entrySet()) {
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
map.put("name", entry.getKey());
|
||||||
|
map.put("value", entry.getValue());
|
||||||
|
map.put("display", "false");
|
||||||
|
list.add(map);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Map<String, Object> mapAdditionalPropertiesMap(Map<String, Object> additionalProperties) {
|
||||||
|
if (additionalProperties != null && !additionalProperties.isEmpty()) {
|
||||||
|
Map<String, Object> res = new HashMap<>();
|
||||||
|
for (Map.Entry<String, Object> entry : additionalProperties.entrySet()) {
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
map.put("name", entry.getKey());
|
||||||
|
map.put("value", entry.getValue());
|
||||||
|
map.put("display", "false");
|
||||||
|
res.put(entry.getKey(), map);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private static ApiPolicies mapApiPolicies(ApiDefinition32 oldApi) {
|
private static ApiPolicies mapApiPolicies(ApiDefinition32 oldApi) {
|
||||||
ApiDefinition45.ApiPolicies apiPolicies = new ApiDefinition45.ApiPolicies();
|
ApiDefinition45.ApiPolicies apiPolicies = new ApiDefinition45.ApiPolicies();
|
||||||
// ---------- request policies ----------
|
// ---------- request policies ----------
|
||||||
@ -197,73 +232,73 @@ public class ApiDefinitionMapper32to45 {
|
|||||||
return cors;
|
return cors;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ApiDefinition45.EndpointConfig mapEndpointConfig(ApiDefinition32.EndpointConfig oldEndpoint) {
|
// private static ApiDefinition45.EndpointConfig mapEndpointConfig(ApiDefinition32.EndpointConfig oldEndpoint) {
|
||||||
if (oldEndpoint == null)
|
// if (oldEndpoint == null)
|
||||||
return null;
|
// return null;
|
||||||
|
//
|
||||||
ApiDefinition45.EndpointConfig newEndpoint = new ApiDefinition45.EndpointConfig();
|
// ApiDefinition45.EndpointConfig newEndpoint = new ApiDefinition45.EndpointConfig();
|
||||||
newEndpoint.setEndpoint_type(oldEndpoint.getEndpointType());
|
// newEndpoint.setEndpoint_type(oldEndpoint.getEndpointType());
|
||||||
|
//
|
||||||
if (oldEndpoint.getSandboxEndpoints() != null) {
|
// if (oldEndpoint.getSandboxEndpoints() != null) {
|
||||||
ApiDefinition45.EndpointGroup sandbox = new ApiDefinition45.EndpointGroup();
|
// ApiDefinition45.EndpointGroup sandbox = new ApiDefinition45.EndpointGroup();
|
||||||
sandbox.setUrl(oldEndpoint.getSandboxEndpoints().getUrl());
|
// sandbox.setUrl(oldEndpoint.getSandboxEndpoints().getUrl());
|
||||||
newEndpoint.setSandbox_endpoints(sandbox);
|
// newEndpoint.setSandbox_endpoints(sandbox);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (oldEndpoint.getProductionEndpoints() != null) {
|
// if (oldEndpoint.getProductionEndpoints() != null) {
|
||||||
ApiDefinition45.EndpointGroup production = new ApiDefinition45.EndpointGroup();
|
// ApiDefinition45.EndpointGroup production = new ApiDefinition45.EndpointGroup();
|
||||||
production.setUrl(oldEndpoint.getProductionEndpoints().getUrl());
|
// production.setUrl(oldEndpoint.getProductionEndpoints().getUrl());
|
||||||
newEndpoint.setProduction_endpoints(production);
|
// newEndpoint.setProduction_endpoints(production);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (oldEndpoint.getEndpointSecurity() != null) {
|
// if (oldEndpoint.getEndpointSecurity() != null) {
|
||||||
ApiDefinition45.EndpointSecurity security = new ApiDefinition45.EndpointSecurity();
|
// ApiDefinition45.EndpointSecurity security = new ApiDefinition45.EndpointSecurity();
|
||||||
security.setSandbox(mapSecurityEnv(oldEndpoint.getEndpointSecurity().getSandbox()));
|
// security.setSandbox(mapSecurityEnv(oldEndpoint.getEndpointSecurity().getSandbox()));
|
||||||
security.setProduction(mapSecurityEnv(oldEndpoint.getEndpointSecurity().getProduction()));
|
// security.setProduction(mapSecurityEnv(oldEndpoint.getEndpointSecurity().getProduction()));
|
||||||
newEndpoint.setEndpoint_security(security);
|
// newEndpoint.setEndpoint_security(security);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
return newEndpoint;
|
// return newEndpoint;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
private static ApiDefinition45.SecurityEnv mapSecurityEnv(ApiDefinition32.SecurityEnvironment oldSec) {
|
// private static ApiDefinition45.SecurityEnv mapSecurityEnv(ApiDefinition32.SecurityEnvironment oldSec) {
|
||||||
if (oldSec == null)
|
// if (oldSec == null)
|
||||||
return null;
|
// return null;
|
||||||
|
//
|
||||||
ApiDefinition45.SecurityEnv newSec = new ApiDefinition45.SecurityEnv();
|
// ApiDefinition45.SecurityEnv newSec = new ApiDefinition45.SecurityEnv();
|
||||||
newSec.setType(oldSec.getType());
|
// newSec.setType(oldSec.getType());
|
||||||
newSec.setTokenUrl(oldSec.getTokenUrl());
|
// newSec.setTokenUrl(oldSec.getTokenUrl());
|
||||||
newSec.setClientId(oldSec.getClientId());
|
// newSec.setClientId(oldSec.getClientId());
|
||||||
newSec.setClientSecret(
|
// newSec.setClientSecret(
|
||||||
CredentialsDecoder.decodeCredentials(oldSec.getClientSecret(), AbstractProcess.PRIVATE_KEY_APIM_32));
|
// CredentialsDecoder.decodeCredentials(oldSec.getClientSecret(), AbstractProcess.PRIVATE_KEY_APIM_32));
|
||||||
newSec.setUsername(oldSec.getUsername());
|
// newSec.setUsername(oldSec.getUsername());
|
||||||
newSec.setPassword(oldSec.getPassword());
|
// newSec.setPassword(oldSec.getPassword());
|
||||||
newSec.setGrantType(oldSec.getGrantType());
|
// newSec.setGrantType(oldSec.getGrantType());
|
||||||
newSec.setEnabled(oldSec.isEnabled());
|
// newSec.setEnabled(oldSec.isEnabled());
|
||||||
newSec.setConnectionTimeoutDuration(0);
|
// newSec.setConnectionTimeoutDuration(0);
|
||||||
newSec.setSocketTimeoutDuration(0);
|
// newSec.setSocketTimeoutDuration(0);
|
||||||
newSec.setConnectionRequestTimeoutDuration(0);
|
// newSec.setConnectionRequestTimeoutDuration(0);
|
||||||
newSec.setProxyConfigs(new ApiDefinition45.ProxyConfigs());
|
// newSec.setProxyConfigs(new ApiDefinition45.ProxyConfigs());
|
||||||
|
//
|
||||||
// ---------- parse customParameters JSON string ----------
|
// // ---------- parse customParameters JSON string ----------
|
||||||
if (oldSec.getCustomParameters() != null && !oldSec.getCustomParameters().isEmpty()) {
|
// if (oldSec.getCustomParameters() != null && !oldSec.getCustomParameters().isEmpty()) {
|
||||||
try {
|
// try {
|
||||||
Map<String, Object> map = AbstractProcess.mapperYaml.readValue(oldSec.getCustomParameters(),
|
// Map<String, Object> map = AbstractProcess.mapperYaml.readValue(oldSec.getCustomParameters(),
|
||||||
new TypeReference<>() {
|
// new TypeReference<>() {
|
||||||
});
|
// });
|
||||||
newSec.setCustomParameters(map);
|
// newSec.setCustomParameters(map);
|
||||||
} catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
newSec.setCustomParameters(Collections.emptyMap());
|
// newSec.setCustomParameters(Collections.emptyMap());
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
newSec.setCustomParameters(Collections.emptyMap());
|
// newSec.setCustomParameters(Collections.emptyMap());
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
// ---------- parse additionalProperties JSON string ----------
|
// // ---------- parse additionalProperties JSON string ----------
|
||||||
newSec.setAdditionalProperties(Collections.emptyMap());
|
// newSec.setAdditionalProperties(Collections.emptyMap());
|
||||||
|
//
|
||||||
return newSec;
|
// return newSec;
|
||||||
}
|
// }
|
||||||
|
|
||||||
public static List<Operation> mapOperations(String swaggerYamlString) throws Exception {
|
public static List<Operation> mapOperations(String swaggerYamlString) throws Exception {
|
||||||
JsonNode root = AbstractProcess.mapperYaml.readTree(swaggerYamlString);
|
JsonNode root = AbstractProcess.mapperYaml.readTree(swaggerYamlString);
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import com.fasterxml.jackson.core.JsonParser;
|
import com.fasterxml.jackson.core.JsonParser;
|
||||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||||
import com.fasterxml.jackson.databind.JsonDeserializer;
|
import com.fasterxml.jackson.databind.JsonDeserializer;
|
||||||
@ -18,12 +17,12 @@ import lombok.Data;
|
|||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class ApiDefinition32 {
|
public class ApiDefinition32 {
|
||||||
|
|
||||||
public static class EndpointConfigDeserializer extends JsonDeserializer<EndpointConfig> {
|
public static class EndpointConfigDeserializer extends JsonDeserializer<Map> {
|
||||||
@Override
|
@Override
|
||||||
public EndpointConfig deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
|
public Map deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
|
||||||
String json = p.getValueAsString();
|
String json = p.getValueAsString();
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
return mapper.readValue(json, EndpointConfig.class);
|
return mapper.readValue(json, Map.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,7 +55,7 @@ public class ApiDefinition32 {
|
|||||||
private String subscriptionAvailability;
|
private String subscriptionAvailability;
|
||||||
private CorsConfiguration corsConfiguration;
|
private CorsConfiguration corsConfiguration;
|
||||||
@JsonDeserialize(using = EndpointConfigDeserializer.class)
|
@JsonDeserialize(using = EndpointConfigDeserializer.class)
|
||||||
private EndpointConfig endpointConfig;
|
private Map endpointConfig;
|
||||||
private String responseCache;
|
private String responseCache;
|
||||||
private int cacheTimeout;
|
private int cacheTimeout;
|
||||||
private String implementation;
|
private String implementation;
|
||||||
@ -79,6 +78,10 @@ public class ApiDefinition32 {
|
|||||||
private String accessControl;
|
private String accessControl;
|
||||||
private double rating;
|
private double rating;
|
||||||
private boolean isLatest;
|
private boolean isLatest;
|
||||||
|
private String businessOwner;
|
||||||
|
private String businessOwnerEmail;
|
||||||
|
private String technicalOwner;
|
||||||
|
private String technicalOwnerEmail;
|
||||||
|
|
||||||
// -------------------- inner classes --------------------
|
// -------------------- inner classes --------------------
|
||||||
|
|
||||||
@ -115,51 +118,6 @@ public class ApiDefinition32 {
|
|||||||
private List<String> accessControlAllowMethods;
|
private List<String> accessControlAllowMethods;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------- typový objekt endpointConfig -----------
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
|
||||||
public static class EndpointConfig {
|
|
||||||
@JsonProperty("endpoint_type")
|
|
||||||
private String endpointType;
|
|
||||||
|
|
||||||
@JsonProperty("sandbox_endpoints")
|
|
||||||
private Endpoint sandboxEndpoints;
|
|
||||||
|
|
||||||
@JsonProperty("production_endpoints")
|
|
||||||
private Endpoint productionEndpoints;
|
|
||||||
|
|
||||||
@JsonProperty("endpoint_security")
|
|
||||||
private EndpointSecurity endpointSecurity;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
|
||||||
public static class Endpoint {
|
|
||||||
private String url;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
|
||||||
public static class EndpointSecurity {
|
|
||||||
private SecurityEnvironment sandbox;
|
|
||||||
private SecurityEnvironment production;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
|
||||||
public static class SecurityEnvironment {
|
|
||||||
private String tokenUrl;
|
|
||||||
private String clientId;
|
|
||||||
private String clientSecret;
|
|
||||||
private String password;
|
|
||||||
private String username;
|
|
||||||
private String type;
|
|
||||||
private String grantType;
|
|
||||||
private boolean enabled;
|
|
||||||
private String customParameters;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public static class ProxyConfigs {
|
public static class ProxyConfigs {
|
||||||
|
|||||||
@ -63,7 +63,7 @@ public class ApiDefinition45 {
|
|||||||
private String createdTime;
|
private String createdTime;
|
||||||
private String lastUpdatedTimestamp;
|
private String lastUpdatedTimestamp;
|
||||||
private String lastUpdatedTime;
|
private String lastUpdatedTime;
|
||||||
private EndpointConfig endpointConfig;
|
private Map endpointConfig;
|
||||||
private String endpointImplementationType;
|
private String endpointImplementationType;
|
||||||
private SubtypeConfiguration subtypeConfiguration;
|
private SubtypeConfiguration subtypeConfiguration;
|
||||||
private List<Object> scopes;
|
private List<Object> scopes;
|
||||||
@ -115,47 +115,6 @@ public class ApiDefinition45 {
|
|||||||
private String signatureHeader;
|
private String signatureHeader;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Data
|
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
|
||||||
public static class EndpointConfig {
|
|
||||||
private String endpoint_type;
|
|
||||||
private EndpointGroup sandbox_endpoints;
|
|
||||||
private EndpointGroup production_endpoints;
|
|
||||||
private EndpointSecurity endpoint_security;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
|
||||||
public static class EndpointGroup {
|
|
||||||
private String url;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
|
||||||
public static class EndpointSecurity {
|
|
||||||
private SecurityEnv sandbox;
|
|
||||||
private SecurityEnv production;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
|
||||||
public static class SecurityEnv {
|
|
||||||
private String tokenUrl;
|
|
||||||
private String clientId;
|
|
||||||
private int connectionTimeoutDuration;
|
|
||||||
private String type;
|
|
||||||
private int socketTimeoutDuration;
|
|
||||||
private boolean enabled;
|
|
||||||
private ProxyConfigs proxyConfigs;
|
|
||||||
private String password;
|
|
||||||
private String clientSecret;
|
|
||||||
private Map<String, Object> customParameters;
|
|
||||||
private Map<String, Object> additionalProperties;
|
|
||||||
private String grantType;
|
|
||||||
private int connectionRequestTimeoutDuration;
|
|
||||||
private String username;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public static class ProxyConfigs {
|
public static class ProxyConfigs {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user