You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java
+40
Original file line number
Diff line number
Diff line change
@@ -15388,6 +15388,46 @@ public Environment updateEnvironment(Environment environment) throws APIManageme
15388
15388
return environment;
15389
15389
}
15390
15390
15391
+
/**
15392
+
* Add API - AWS API mapping
15393
+
*
15394
+
* @param apiId API ID
15395
+
* @param aWSApiId AWS API ID
15396
+
* @param environmentId Gateway environment ID
15397
+
* @throws APIManagementException if failed to add the mapping
15398
+
*/
15399
+
public void addApiAWSApiMapping(String apiId, String aWSApiId, String environmentId)
Copy file name to clipboardexpand all lines: components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/constants/SQLConstants.java
Copy file name to clipboardexpand all lines: components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/deployer/ExternalGatewayDeployer.java
+1-1
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ public interface ExternalGatewayDeployer {
35
35
* @param environment Environment to be deployed
36
36
* @throws DeployerException if error occurs when deploying APIs to in the external gateway
Copy file name to clipboardexpand all lines: components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/notifier/ExternalGatewayNotifier.java
+10-5
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ public class ExternalGatewayNotifier extends DeployAPIInGatewayNotifier {
Copy file name to clipboardexpand all lines: components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/APIUtil.java
+205-16
Original file line number
Diff line number
Diff line change
@@ -355,6 +355,112 @@ public final class APIUtil {
355
355
private static final String contextRegex = "^[a-zA-Z0-9_${}/.;()-]+$";
356
356
private static String hashingAlgorithm = SHA_256;
357
357
358
+
private static final String SYNAPSE_GATEWAY_FEATURES = "{\n" +
359
+
" \"runtime\": [\n" +
360
+
" \"cors\",\n" +
361
+
" \"schemaValidation\",\n" +
362
+
" \"queryAnalysis\",\n" +
363
+
" \"responseCaching\",\n" +
364
+
" \"transportsHTTP\",\n" +
365
+
" \"transportsHTTPS\",\n" +
366
+
" \"transportsMutualSSL\",\n" +
367
+
" \"oauth2\",\n" +
368
+
" \"apikey\",\n" +
369
+
" \"basicAuth\",\n" +
370
+
" \"audienceValidation\",\n" +
371
+
" \"backendThroughput\",\n" +
372
+
" \"keyManagerConfig\"\n" +
373
+
" ],\n" +
374
+
" \"resources\": [\n" +
375
+
" \"apiLevelRateLimiting\",\n" +
376
+
" \"operationLevelRateLimiting\",\n" +
377
+
" \"operationSecurity\"\n" +
378
+
" ],\n" +
379
+
" \"localScopes\": [\n" +
380
+
" \"operationScopes\"\n" +
381
+
" ],\n" +
382
+
" \"monetization\": [\n" +
383
+
" \"monetization\"\n" +
384
+
" ],\n" +
385
+
" \"subscriptions\": [\n" +
386
+
" \"subscriptions\"\n" +
387
+
" ],\n" +
388
+
" \"endpoints\": [\n" +
389
+
" \"http\",\n" +
390
+
" \"service\",\n" +
391
+
" \"address\",\n" +
392
+
" \"default\",\n" +
393
+
" \"INLINE\",\n" +
394
+
" \"dynamic\",\n" +
395
+
" \"awslambda\",\n" +
396
+
" \"sequence_backend\",\n" +
397
+
" \"advancedConfigurations\",\n" +
398
+
" \"loadBalanceAndFailoverConfigurations\",\n" +
399
+
" \"endpointSecurity\"\n" +
400
+
" ]\n" +
401
+
" }";
402
+
private static final String APK_GATEWAY_FEATURES = "{\n" +
403
+
" \"runtime\": [\n" +
404
+
" \"cors\",\n" +
405
+
" \"transportsHTTP\",\n" +
406
+
" \"transportsHTTPS\",\n" +
407
+
" \"transportsMutualSSL\",\n" +
408
+
" \"oauth2\",\n" +
409
+
" \"apikey\",\n" +
410
+
" \"basicAuth\",\n" +
411
+
" \"audienceValidation\"\n" +
412
+
" ],\n" +
413
+
" \"resources\": [\n" +
414
+
" \"apiLevelRateLimiting\",\n" +
415
+
" \"operationLevelRateLimiting\"\n" +
416
+
" ],\n" +
417
+
" \"localScopes\": [\n" +
418
+
" \"operationScopes\"\n" +
419
+
" ],\n" +
420
+
" \"monetization\": [\n" +
421
+
" \"monetization\"\n" +
422
+
" ],\n" +
423
+
" \"subscriptions\": [\n" +
424
+
" \"subscriptions\"\n" +
425
+
" ],\n" +
426
+
" \"endpoints\": [\n" +
427
+
" \"http\"\n" +
428
+
" ]\n" +
429
+
" }";
430
+
private static final String API_DATA = "{\n" +
431
+
" \"rest\": [\n" +
432
+
" \"wso2/synapse\",\n" +
433
+
" \"wso2/apk\",\n" +
434
+
" \"AWS\"\n" +
435
+
" ],\n" +
436
+
" \"soap\": [\n" +
437
+
" \"wso2/synapse\",\n" +
438
+
" \"wso2/apk\"\n" +
439
+
" ],\n" +
440
+
" \"graphql\": [\n" +
441
+
" \"wso2/synapse\",\n" +
442
+
" \"wso2/apk\"\n" +
443
+
" ],\n" +
444
+
" \"ws\": [\n" +
445
+
" \"wso2/synapse\",\n" +
446
+
" \"wso2/apk\",\n" +
447
+
" \"AWS\"\n" +
448
+
" ],\n" +
449
+
" \"wh\": [\n" +
450
+
" \"wso2/synapse\",\n" +
451
+
" \"wso2/apk\"\n" +
452
+
" ],\n" +
453
+
" \"sse\": [\n" +
454
+
" \"wso2/synapse\",\n" +
455
+
" \"wso2/apk\"\n" +
456
+
" ],\n" +
457
+
" \"ai\": [\n" +
458
+
" \"wso2/synapse\",\n" +
459
+
" \"wso2/apk\",\n" +
460
+
" \"AWS\"\n" +
461
+
" ]\n" +
462
+
" }";
463
+
358
464
private APIUtil() {
359
465
360
466
}
@@ -389,6 +495,7 @@ private APIUtil() {
389
495
private static double retryProgressionFactor;
390
496
private static String gatewayTypes;
391
497
private static int maxRetryCount;
498
+
private static Gson gatewayFeatureCatalog;
392
499
393
500
//constants for getting masked token
394
501
private static final int MAX_LEN = 36;
@@ -3334,11 +3441,84 @@ public static List<String> getGatewayTypes () {
3334
3441
// Get the gateway types from the deployment.toml
3335
3442
List<String> gatewayTypesList = new ArrayList<>();
3336
3443
if (gatewayTypes != null && !gatewayTypes.isEmpty()) {
0 commit comments