diff --git a/kraken-app/kraken-app-hub/src/test/resources/mock/api-targets-mappers/api-target-mapper.order.eline.add.yaml b/kraken-app/kraken-app-hub/src/test/resources/mock/api-targets-mappers/api-target-mapper.order.eline.add.yaml index 5c5b945b..37871ac8 100644 --- a/kraken-app/kraken-app-hub/src/test/resources/mock/api-targets-mappers/api-target-mapper.order.eline.add.yaml +++ b/kraken-app/kraken-app-hub/src/test/resources/mock/api-targets-mappers/api-target-mapper.order.eline.add.yaml @@ -59,7 +59,11 @@ spec: title: "MEFEndOfTermAction" source: "@{{productOrderItem[0].requestedItemTerm.endOfTermAction}}" sourceLocation: BODY - sourceType: discreteStr + sourceType: enum + sourceValues: + - roll + - autoDisconnect + - autoRenew target: "roll" targetLocation: BODY requiredMapping: true @@ -75,7 +79,16 @@ spec: title: " quote item Term roll unit" source: "@{{productOrderItem[0].requestedItemTerm.rollInterval.units}}" sourceLocation: BODY - sourceType: discreteStr + sourceType: enum + sourceValues: + - calendarYears + - calendarMonths + - calendarDays + - calendarHours + - calendarMinutes + - businessDays + - businessHours + - businessMinutes target: "" targetLocation: BODY requiredMapping: false @@ -151,7 +164,7 @@ spec: targetLocation: BODY requiredMapping: true - name: mapper.order.eline.add.product.productConfiguration.type - title: "connection type" + title: "customized product type" source: "@{{productOrderItem[0].product.productConfiguration.type}}" sourceLocation: BODY sourceType: discreteStr @@ -159,7 +172,7 @@ spec: targetLocation: BODY requiredMapping: false - name: mapper.order.eline.add.product.productConfiguration.destUNIMetroId - title: "connection destUNIMetroId" + title: "The metro id of the destination UNI" source: "@{{productOrderItem[0].product.productConfiguration.destUNIMetroId}}" sourceLocation: BODY sourceType: discreteStr @@ -167,7 +180,7 @@ spec: targetLocation: BODY requiredMapping: false - name: mapper.order.eline.add.product.productConfiguration.buyerCompanyId - title: "connection buyerCompanyId" + title: "The Id of buyer Company" source: "@{{productOrderItem[0].product.productConfiguration.buyerCompanyId}}" sourceLocation: BODY sourceType: discreteStr diff --git a/kraken-java-sdk/kraken-java-sdk-gateway/src/test/java/com/consoleconnect/kraken/operator/gateway/runner/MappingMatrixCheckerActionRunnerTest.java b/kraken-java-sdk/kraken-java-sdk-gateway/src/test/java/com/consoleconnect/kraken/operator/gateway/runner/MappingMatrixCheckerActionRunnerTest.java index 7cf0960a..dae1f80f 100644 --- a/kraken-java-sdk/kraken-java-sdk-gateway/src/test/java/com/consoleconnect/kraken/operator/gateway/runner/MappingMatrixCheckerActionRunnerTest.java +++ b/kraken-java-sdk/kraken-java-sdk-gateway/src/test/java/com/consoleconnect/kraken/operator/gateway/runner/MappingMatrixCheckerActionRunnerTest.java @@ -216,6 +216,10 @@ public static List> buildIllegalPathCheckList() { new PathCheck( "expect6", "user", ExpectTypeEnum.EXPECTED_NOT_BLANK, null, "error", 422, null); + PathCheck pathCheck7 = + new PathCheck( + "expect7", "user", ExpectTypeEnum.EXPECTED_TRUE, "${param.id}", "error", 400, "String"); + Pair pair1 = Pair.of(pathCheck1, "user1"); Pair pair2 = Pair.of(pathCheck2, "user1"); Pair pair3A = Pair.of(pathCheck3, null); @@ -223,8 +227,9 @@ public static List> buildIllegalPathCheckList() { Pair pair4 = Pair.of(pathCheck4, "123"); Pair pair5 = Pair.of(pathCheck5, "123"); Pair pair6 = Pair.of(pathCheck6, ""); + Pair pair7 = Pair.of(pathCheck7, Map.of("id", 123)); - return List.of(pair1, pair2, pair3A, pair3B, pair4, pair5, pair6); + return List.of(pair1, pair2, pair3A, pair3B, pair4, pair5, pair6, pair7); } @ParameterizedTest diff --git a/kraken-java-sdk/kraken-java-sdk-mef/src/main/resources/mef-sonata/api-targets-mappers/api-target-mapper.order.eline.add.yaml b/kraken-java-sdk/kraken-java-sdk-mef/src/main/resources/mef-sonata/api-targets-mappers/api-target-mapper.order.eline.add.yaml index 9a1122a4..9d916078 100644 --- a/kraken-java-sdk/kraken-java-sdk-mef/src/main/resources/mef-sonata/api-targets-mappers/api-target-mapper.order.eline.add.yaml +++ b/kraken-java-sdk/kraken-java-sdk-mef/src/main/resources/mef-sonata/api-targets-mappers/api-target-mapper.order.eline.add.yaml @@ -59,7 +59,11 @@ spec: title: "MEFEndOfTermAction" source: "@{{productOrderItem[0].requestedItemTerm.endOfTermAction}}" sourceLocation: BODY - sourceType: discreteStr + sourceType: enum + sourceValues: + - roll + - autoDisconnect + - autoRenew target: "" targetLocation: BODY requiredMapping: true @@ -75,7 +79,16 @@ spec: title: " quote item Term roll unit" source: "@{{productOrderItem[0].requestedItemTerm.rollInterval.units}}" sourceLocation: BODY - sourceType: discreteStr + sourceType: enum + sourceValues: + - calendarYears + - calendarMonths + - calendarDays + - calendarHours + - calendarMinutes + - businessDays + - businessHours + - businessMinutes target: "" targetLocation: BODY requiredMapping: false @@ -97,8 +110,6 @@ spec: sourceLocation: BODY sourceType: discreteInt sourceValues: - - 1000 - - 10000 target: "" targetLocation: BODY requiredMapping: true @@ -126,6 +137,30 @@ spec: target: "" targetLocation: BODY requiredMapping: false + - name: mapper.order.eline.add.product.productConfiguration.buyerCompanyId + title: "The Id of buyer Company" + source: "@{{productOrderItem[0].product.productConfiguration.buyerCompanyId}}" + sourceLocation: BODY + sourceType: discreteStr + target: "" + targetLocation: BODY + requiredMapping: false + - name: mapper.order.eline.add.product.productConfiguration.destUNIMetroId + title: "The metro id of the destination UNI" + source: "@{{productOrderItem[0].product.productConfiguration.destUNIMetroId}}" + sourceLocation: BODY + sourceType: discreteStr + target: "" + targetLocation: BODY + requiredMapping: false + - name: mapper.order.eline.add.product.productConfiguration.type + title: "customized product type" + source: "@{{productOrderItem[0].product.productConfiguration.type}}" + sourceLocation: BODY + sourceType: discreteStr + target: "" + targetLocation: BODY + requiredMapping: false - name: mapper.order.eline.add.srcUNI title: "source UNI or ENNI id" source: "@{{productOrderItem[0].product.productRelationship[0].id}}" diff --git a/kraken-java-sdk/kraken-java-sdk-mef/src/main/resources/mef-sonata/api-targets-mappers/api-target-mapper.order.uni.add.yaml b/kraken-java-sdk/kraken-java-sdk-mef/src/main/resources/mef-sonata/api-targets-mappers/api-target-mapper.order.uni.add.yaml index 82c997c2..0d6ce525 100644 --- a/kraken-java-sdk/kraken-java-sdk-mef/src/main/resources/mef-sonata/api-targets-mappers/api-target-mapper.order.uni.add.yaml +++ b/kraken-java-sdk/kraken-java-sdk-mef/src/main/resources/mef-sonata/api-targets-mappers/api-target-mapper.order.uni.add.yaml @@ -76,7 +76,16 @@ spec: title: " quote item Term roll unit" source: "@{{productOrderItem[0].requestedItemTerm.rollInterval.units}}" sourceLocation: BODY - sourceType: discreteStr + sourceType: enum + sourceValues: + - calendarYears + - calendarMonths + - calendarDays + - calendarHours + - calendarMinutes + - businessDays + - businessHours + - businessMinutes target: "" targetLocation: BODY requiredMapping: false @@ -90,6 +99,15 @@ spec: target: '' targetLocation: BODY requiredMapping: false + - name: mapper.order.uni.add.place.name + title: the keyName of the place where the products' installation must be done. + description: '' + source: '@{{productOrderItem[0].product.place[0].keyName}}' + sourceLocation: BODY + sourceType: discreteStr + target: '' + targetLocation: BODY + requiredMapping: false - name: mapper.order.uni.add.bandwidthUnit title: "The unit of bandwidth" source: "@{{productOrderItem[0].product.productConfiguration.bandwidthUnit}}" @@ -107,8 +125,6 @@ spec: sourceLocation: BODY sourceType: discreteInt sourceValues: - - 1000 - - 10000 target: "" targetLocation: BODY requiredMapping: true