diff --git a/ebl-issuance/src/main/resources/standards/eblissuance/messages/eblissuance-v30-request.json b/ebl-issuance/src/main/resources/standards/eblissuance/messages/eblissuance-v30-request.json index 11ccbec9..9d8df87e 100644 --- a/ebl-issuance/src/main/resources/standards/eblissuance/messages/eblissuance-v30-request.json +++ b/ebl-issuance/src/main/resources/standards/eblissuance/messages/eblissuance-v30-request.json @@ -40,7 +40,6 @@ "HSCodes": [ "640510" ], - "commoditySubreference": "Some Commodity Subreference 123", "cargoItems": [ { "equipmentReference": "NARU3472484", diff --git a/ebl/src/main/java/org/dcsa/conformance/standards/ebl/checks/EBLChecks.java b/ebl/src/main/java/org/dcsa/conformance/standards/ebl/checks/EBLChecks.java index a1f84108..fc2a95e8 100644 --- a/ebl/src/main/java/org/dcsa/conformance/standards/ebl/checks/EBLChecks.java +++ b/ebl/src/main/java/org/dcsa/conformance/standards/ebl/checks/EBLChecks.java @@ -384,17 +384,20 @@ private static Supplier cspValue(Supplier cspS }; } - private static void generateCSPRelatedChecks(List checks, Supplier cspSupplier) { + private static void generateCSPRelatedChecks(List checks, Supplier cspSupplier, boolean isTD) { checks.add(JsonAttribute.allIndividualMatchesMustBeValid( "[Scenario] Verify that the correct 'carrierBookingReference' is used", mav -> mav.path("consignmentItems").all().path("carrierBookingReference").submitPath(), JsonAttribute.matchedMustEqual(cspValue(cspSupplier, CarrierScenarioParameters::carrierBookingReference)) )); - checks.add(JsonAttribute.allIndividualMatchesMustBeValid( - "[Scenario] Verify that the correct 'commoditySubreference' is used", - mav -> mav.path("consignmentItems").all().path("commoditySubreference").submitPath(), - JsonAttribute.matchedMustEqual(cspValue(cspSupplier, CarrierScenarioParameters::commoditySubreference)) - )); + if (!isTD) { + checks.add( + JsonAttribute.allIndividualMatchesMustBeValid( + "[Scenario] Verify that the correct 'commoditySubreference' is used", + mav -> mav.path("consignmentItems").all().path("commoditySubreference").submitPath(), + JsonAttribute.matchedMustEqual( + cspValue(cspSupplier, CarrierScenarioParameters::commoditySubreference)))); + } checks.add(JsonAttribute.allIndividualMatchesMustBeValid( "[Scenario] Verify that the correct 'equipmentReference' is used", mav -> { @@ -433,7 +436,7 @@ private static void generateCSPRelatedChecks(List checks, Supp public static ActionCheck siRequestContentChecks(UUID matched, Supplier cspSupplier) { var checks = new ArrayList<>(STATIC_SI_CHECKS); - generateCSPRelatedChecks(checks, cspSupplier); + generateCSPRelatedChecks(checks, cspSupplier, false); return JsonAttribute.contentChecks( EblRole::isShipper, matched, @@ -461,7 +464,7 @@ public static ActionCheck siResponseContentChecks(UUID matched, Supplier