Skip to content

Sd 2925 update tnt implementation#514

Open
pedrocarvalhodcsa wants to merge 11 commits into
devfrom
SD-2925_update-tnt-schema
Open

Sd 2925 update tnt implementation#514
pedrocarvalhodcsa wants to merge 11 commits into
devfrom
SD-2925_update-tnt-schema

Conversation

@pedrocarvalhodcsa
Copy link
Copy Markdown
Collaborator

No description provided.

@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Update TNT 3.0.0 schema with eventClassifier validation and expanded enums

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Add eventClassifier field validation to TNT schema
• Update TNT schema with expanded enum values and improved documentation
• Refactor event type checks using Map-based supplier pattern
• Enhance reefer and IoT details with additional measurement and status fields
Diagram
flowchart LR
  A["TNT Schema Updates"] --> B["EventClassifier Validation"]
  A --> C["Enum Value Expansion"]
  A --> D["Field Additions"]
  B --> E["New Checks Added"]
  C --> F["Renamed Properties"]
  C --> G["Updated Descriptions"]
  D --> H["Reefer Details"]
  D --> I["IoT Details"]
  D --> J["Event Routing"]
Loading

Grey Divider

File Changes

1. core/src/main/java/org/dcsa/conformance/core/check/JsonAttribute.java ✨ Enhancement +4/-3

Improve error messages for enum validation

core/src/main/java/org/dcsa/conformance/core/check/JsonAttribute.java


2. tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntChecks.java ✨ Enhancement +79/-24

Add eventClassifier validation and refactor event checks

tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntChecks.java


3. tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntDataSets.java ✨ Enhancement +2/-0

Define valid event classifier values

tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntDataSets.java


View more (9)
4. tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntEventAttributes.java ✨ Enhancement +1/-0

Add EVENT_CLASSIFIER constant

tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntEventAttributes.java


5. tnt/src/main/resources/standards/tnt/messages/tnt-300-request-equipment.json ⚙️ Configuration changes +2/-1

Add eventClassifier field to equipment event

tnt/src/main/resources/standards/tnt/messages/tnt-300-request-equipment.json


6. tnt/src/main/resources/standards/tnt/messages/tnt-300-request-iot.json ⚙️ Configuration changes +1/-0

Add eventClassifier field to IoT event

tnt/src/main/resources/standards/tnt/messages/tnt-300-request-iot.json


7. tnt/src/main/resources/standards/tnt/messages/tnt-300-request-reefer.json ⚙️ Configuration changes +1/-0

Add eventClassifier field to reefer event

tnt/src/main/resources/standards/tnt/messages/tnt-300-request-reefer.json


8. tnt/src/main/resources/standards/tnt/messages/tnt-300-request-shipment.json ⚙️ Configuration changes +1/-0

Add eventClassifier field to shipment event

tnt/src/main/resources/standards/tnt/messages/tnt-300-request-shipment.json


9. tnt/src/main/resources/standards/tnt/messages/tnt-300-request-transport.json ⚙️ Configuration changes +1/-0

Add eventClassifier field to transport event

tnt/src/main/resources/standards/tnt/messages/tnt-300-request-transport.json


10. tnt/src/main/resources/standards/tnt/messages/tnt-300-response-nextpage.json ⚙️ Configuration changes +5/-0

Add eventClassifier to all response events

tnt/src/main/resources/standards/tnt/messages/tnt-300-response-nextpage.json


11. tnt/src/main/resources/standards/tnt/messages/tnt-300-response.json ⚙️ Configuration changes +5/-0

Add eventClassifier to all response events

tnt/src/main/resources/standards/tnt/messages/tnt-300-response.json


12. tnt/src/main/resources/standards/tnt/schemas/TNT_v3.0.0.yaml ✨ Enhancement +386/-234

Expand schema enums and add new fields

tnt/src/main/resources/standards/tnt/schemas/TNT_v3.0.0.yaml


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review Bot commented Apr 30, 2026

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Schema/checks name mismatch ✓ Resolved 🐞 Bug ≡ Correctness
Description
The updated TNT v3.0.0 schema uses renamed fields (e.g., EventClassification.eventType,
DocumentReference.type, EventRouting.originatingParties) while the v300 checks and built-in mock
producer/templates still rely on legacy names like eventTypeCode/typeCode/originatingParty. This
makes the conformance tool inconsistent: schema-aligned implementations can pass schema validation
but fail the content checks, and the mock producer may emit payloads that don’t match the published
schema field names.
Code

tnt/src/main/resources/standards/tnt/schemas/TNT_v3.0.0.yaml[R530-551]

    EventClassification:
      type: "object"
      properties:
-        eventTypeCode:
+        eventType:
          type: "string"
          description: |-
-            Code used to denote the type of an event
+            The type of a Track and Trace event
            - `SHIPMENT` - Shipment event
            - `TRANSPORT` - Transport event
            - `EQUIPMENT` - Equipment event
            - `IOT` - IoT event
            - `REEFER` - Reefer event
          example: "EQUIPMENT"
-        eventClassifierCode:
+        eventClassifier:
          maxLength: 10
          type: "string"
          description: |-
-            Classifier denoting whether an event is planned, estimated or actual
-            - `PLN` - Planned
-            - `EST` - Estimated
-            - `ACT` - Actual
-          example: "EST"
-        shipmentEventTypeCode:
+            Classifier denoting whether a timestamp or event is planned, estimated or actual
+            - `ACTUAL` - Actual
+            - `ESTIMATED` - Estimated
+            - `PLANNED` - Planned
+          example: "ESTIMATED"
Evidence
The OpenAPI schema now defines EventClassification with eventType/eventClassifier and EventRouting
with originatingParties/destinationParties, but the conformance checks and mock payload templates
still use eventTypeCode and originatingParty and typeCode; TntChecks explicitly validates
eventTypeCode, and TntProducer filters responses by eventTypeCode based on those legacy templates.

tnt/src/main/resources/standards/tnt/schemas/TNT_v3.0.0.yaml[530-663]
tnt/src/main/resources/standards/tnt/schemas/TNT_v3.0.0.yaml[351-390]
tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntChecks.java[155-164]
tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntEventAttributes.java[6-20]
tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/party/TntProducer.java[122-173]
tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/party/TntConstants.java[6-18]
tnt/src/main/resources/standards/tnt/messages/tnt-300-response.json[2-25]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
TNT v3.0.0 schema field names have been renamed (e.g., `eventClassification.eventType`, `documentReference.type`, `eventRouting.originatingParties`), but v300 conformance checks and mock producer/templates still use legacy fields (e.g., `eventTypeCode`, `typeCode`, `originatingParty`). This creates inconsistent conformance behavior where schema-aligned payloads can fail content validation and the mock producer can emit payloads that don’t match the schema naming.

### Issue Context
- The schema is used by `JsonSchemaValidator` for v300 (GetEventsResponse/PostEventsRequest/PostEventsResponse).
- The sandbox/mock producer (`TntProducer`) uses the JSON templates under `tnt/.../messages/` and filters by `eventTypeCode`.
- The content checks in `TntChecks` still validate `eventTypeCode` and `*EventTypeCode` paths.

### Fix Focus Areas
- tnt/src/main/resources/standards/tnt/schemas/TNT_v3.0.0.yaml[530-663]
- tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntChecks.java[155-227]
- tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntEventAttributes.java[6-38]
- tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/party/TntProducer.java[122-173]
- tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/party/TntConstants.java[6-18]
- tnt/src/main/resources/standards/tnt/messages/tnt-300-response.json[2-35]

### Notes on expected change
Choose one coherent strategy and apply it consistently:
1) **Migrate to new schema names**: update templates, constants, checks, and filtering logic to use `eventType`, `shipmentEventType`, `transportEventType`, `equipmentEventType`, etc.; and `documentReference.type`; and `eventRouting.originatingParties`.

or

2) **Backwards-compatible transition**: accept both old and new names in checks (e.g., validate `eventType` OR `eventTypeCode`) and update mock templates to include both during a deprecation window (with clear precedence).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Event type map NPE 🐞 Bug ☼ Reliability
Description
TntChecks.getJsonContentChecks calls EVENT_TYPE_CHECKS.get(eventType).get() without guarding against
a missing map entry, which will throw a NullPointerException if a new/unsupported TntEventType is
introduced or passed in. The prior if-chain would not crash in that scenario.
Code

tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntChecks.java[R96-101]

    if (eventType != null) {
      checks.add(atLeastOneEventHasEventTypeCodeCheck(eventType));
-    }
-    if (eventType == null || eventType == TntEventType.SHIPMENT) {
-      checks.addAll(shipmentEventChecks());
-    }
-    if (eventType == null || eventType == TntEventType.TRANSPORT) {
-      checks.addAll(transportEventChecks());
-    }
-    if (eventType == null || eventType == TntEventType.EQUIPMENT) {
-      checks.addAll(equipmentEventChecks());
-    }
-    if (eventType == null || eventType == TntEventType.IOT) {
-      checks.addAll(iotEventChecks());
-    }
-    if (eventType == null || eventType == TntEventType.REEFER) {
-      checks.addAll(reeferEventChecks());
+      checks.addAll(EVENT_TYPE_CHECKS.get(eventType).get());
+    } else {
+      EVENT_TYPE_CHECKS.values().forEach(supplier -> checks.addAll(supplier.get()));
    }
Evidence
EVENT_TYPE_CHECKS is a fixed Map.of and getJsonContentChecks dereferences the Supplier returned from
get(eventType) without checking for null.

tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntChecks.java[64-101]
tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/action/TntEventType.java[3-20]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`TntChecks.getJsonContentChecks` does `EVENT_TYPE_CHECKS.get(eventType).get()` which can NPE if `eventType` is non-null but missing from the map (e.g., future enum extension).

### Issue Context
The previous implementation used explicit `if` blocks per enum value and would not NPE for an unsupported/unknown event type; it would simply skip adding event-specific checks.

### Fix Focus Areas
- tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntChecks.java[64-101]

### Suggested fix
- Use an `EnumMap<TntEventType, Supplier<List<JsonContentCheck>>>` and either:
 - `getOrDefault(eventType, List::of)`; or
 - `Objects.requireNonNull(EVENT_TYPE_CHECKS.get(eventType), "Unsupported event type: " + eventType)` and throw a clear exception.
- Add a unit test (if available in this repo) that fails fast when a new enum value is added without updating the map.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the TNT v3.0.0 Track & Trace artifacts (OpenAPI schema, example messages, and conformance checks) to reflect newer event-classification semantics and additional domain fields.

Changes:

  • Refactors the OpenAPI description text and extends multiple schemas (e.g., reefer/IoT-related additions, new objects).
  • Adds eventClassifier validation in the TNT v3.0.0 conformance checks.
  • Updates TNT 3.0.0 request/response JSON fixtures to include eventClassifier.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
tnt/src/main/resources/standards/tnt/schemas/TNT_v3.0.0.yaml Updates/extends the TNT 3.0.0 OpenAPI schema and documentation content.
tnt/src/main/resources/standards/tnt/messages/tnt-300-response.json Updates example response payload to include eventClassifier.
tnt/src/main/resources/standards/tnt/messages/tnt-300-response-nextpage.json Updates paginated example response payload to include eventClassifier.
tnt/src/main/resources/standards/tnt/messages/tnt-300-request-transport.json Updates transport request example to include eventClassifier.
tnt/src/main/resources/standards/tnt/messages/tnt-300-request-shipment.json Updates shipment request example to include eventClassifier.
tnt/src/main/resources/standards/tnt/messages/tnt-300-request-reefer.json Updates reefer request example to include eventClassifier.
tnt/src/main/resources/standards/tnt/messages/tnt-300-request-iot.json Updates IoT request example to include eventClassifier.
tnt/src/main/resources/standards/tnt/messages/tnt-300-request-equipment.json Updates equipment request example to include eventClassifier.
tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntEventAttributes.java Adds the EVENT_CLASSIFIER attribute constant.
tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntDataSets.java Adds a valid set for event classifier values.
tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntChecks.java Adds checks for eventClassification presence and eventClassifier validity; refactors event-type check selection.
core/src/main/java/org/dcsa/conformance/core/check/JsonAttribute.java Improves matchedMustBeOneOf error messaging and makes allowed-values output deterministic.
Comments suppressed due to low confidence (2)

tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntDataSets.java:16

  • With the OpenAPI schema update, EventClassification now documents values like shipmentEventType: APPROVED, transportEventType: ARRIVED, etc. However the validation data sets still contain the legacy short codes (APPR, ARRI, DEPA, ...). This will make the conformance checks reject payloads that follow the updated schema. Please update the VALID_* sets to the new values (or allow both old+new during a migration).
  static final Set<String> VALID_EVENT_CLASSIFIERS = Set.of("ACTUAL", "ESTIMATED", "PLANNED");

  static final Set<String> VALID_SHIPMENT_EVENT_TYPE_CODES =
      Set.of(
          "AMCF", "AMCN", "AMDC", "AMPR", "AMRE", "APPR", "CACF", "CADC", "CANC", "CARE", "CMPL",
          "CONF", "DECL", "DRFT", "HOLD", "ISSU", "PENA", "PENM", "PENU", "PSAM", "PSDL", "RECE",
          "REJE", "RELS", "REQS", "SUAM", "SUBM", "SUDL");

tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntEventAttributes.java:18

  • TNT_v3.0.0.yaml now defines eventClassification.eventType (not eventTypeCode) and several other renamed fields (e.g., DocumentReference.type). However TntEventAttributes still hard-codes legacy names like eventTypeCode and typeCode, so the checks will validate the wrong JSON paths. Please align these attribute constants (and dependent checks/fixtures) with the updated schema, or explicitly support both old+new names during a transition.
  static final String EVENT_CLASSIFICATION = "eventClassification";
  static final String EVENT_TYPE_CODE = "eventTypeCode";
  static final String EVENT_CLASSIFIER = "eventClassifier";
  static final String SHIPMENT_EVENT_TYPE_CODE = "shipmentEventTypeCode";
  static final String SHIPMENT_DETAILS = "shipmentDetails";
  static final String DOCUMENT_REFERENCE = "documentReference";
  static final String TYPE_CODE = "typeCode";
  static final String REFERENCE = "reference";

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntChecks.java Outdated
Comment thread tnt/src/main/resources/standards/tnt/messages/tnt-300-response.json Outdated
Comment thread tnt/src/main/resources/standards/tnt/messages/tnt-300-response-nextpage.json Outdated
Comment thread tnt/src/main/resources/standards/tnt/messages/tnt-300-request-transport.json Outdated
Comment thread tnt/src/main/resources/standards/tnt/messages/tnt-300-request-shipment.json Outdated
Comment thread tnt/src/main/resources/standards/tnt/messages/tnt-300-request-reefer.json Outdated
Comment thread tnt/src/main/resources/standards/tnt/schemas/TNT_v3.0.0.yaml
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the TNT v3.0.0 (Track & Trace) conformance assets to align with the SD-2925 TNT implementation updates, including renamed attributes/enums in the schema, updated example payloads, and updated validator logic/error messaging.

Changes:

  • Updated TNT v3.0.0 OpenAPI schema definitions and event filtering/pagination documentation.
  • Updated v3.0.0 example request/response JSON payloads to reflect renamed attributes/enums (e.g., eventType, eventClassifier, originatingParties).
  • Updated v3.0.0 Java conformance checks/datasets/constants to validate the new field names and allowed values; improved “oneOf” validation error messaging.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tnt/src/main/resources/standards/tnt/schemas/TNT_v3.0.0.yaml Schema updates: new/renamed fields and enums; expanded reefer/IoT structures; updated markdown sections.
tnt/src/main/resources/standards/tnt/messages/tnt-300-response.json Updated v300 response example to new attribute names/enums.
tnt/src/main/resources/standards/tnt/messages/tnt-300-response-nextpage.json Partial update (currently inconsistent with new v300 schema/validators).
tnt/src/main/resources/standards/tnt/messages/tnt-300-request-transport.json Updated v300 transport request example to new attribute names/enums.
tnt/src/main/resources/standards/tnt/messages/tnt-300-request-shipment.json Updated v300 shipment request example to new attribute names/enums.
tnt/src/main/resources/standards/tnt/messages/tnt-300-request-reefer.json Updated v300 reefer request example to new attribute names/enums.
tnt/src/main/resources/standards/tnt/messages/tnt-300-request-iot.json Updated v300 IoT request example to new attribute names/enums.
tnt/src/main/resources/standards/tnt/messages/tnt-300-request-equipment.json Updated v300 equipment request example to new attribute names/enums.
tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/party/TntConstants.java Updated constant for event type attribute (now points at eventType).
tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntEventAttributes.java Renamed JSON attribute constants to match the updated v300 schema.
tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntDataSets.java Updated allowed value sets to match new v300 enums.
tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntChecks.java Updated validation logic for renamed fields; added validation for event classification + classifier.
core/src/main/java/org/dcsa/conformance/core/check/JsonAttribute.java Improved matchedMustBeOneOf messages with sorted allowed values.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/party/TntConstants.java Outdated
Comment thread tnt/src/main/resources/standards/tnt/messages/tnt-300-response-nextpage.json Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the TNT v3.0.0 conformance artifacts (schema, example payloads, and validation logic) to align with the newer TNT 3.0.0 field names/enumerations and additional reefer/IoT semantics.

Changes:

  • Updates the OpenAPI schema with revised field names/enums (e.g., eventType, eventClassifier, expanded event subtypes) and new reefer/IoT-related schemas/attributes.
  • Updates v300 Java conformance checks/datasets to validate the renamed/expanded event classification fields and classifiers.
  • Migrates the v300 example request/response JSON payloads toward the new schema structure (event routing, classification, document reference types, facility types, etc.).

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tnt/src/main/resources/standards/tnt/schemas/TNT_v3.0.0.yaml Updates TNT v3 schema structure, enums, and adds new reefer/IoT-related schemas/attributes.
tnt/src/main/resources/standards/tnt/messages/tnt-300-response.json Updates v300 response example to new routing/classification/document reference naming.
tnt/src/main/resources/standards/tnt/messages/tnt-300-response-nextpage.json Updates v300 “next page” response example to new routing/classification/document reference naming.
tnt/src/main/resources/standards/tnt/messages/tnt-300-request-transport.json Updates v300 transport request example to new routing/classification/document reference naming.
tnt/src/main/resources/standards/tnt/messages/tnt-300-request-shipment.json Updates v300 shipment request example to new routing/classification/document reference naming.
tnt/src/main/resources/standards/tnt/messages/tnt-300-request-reefer.json Updates v300 reefer request example to new routing/classification naming.
tnt/src/main/resources/standards/tnt/messages/tnt-300-request-iot.json Updates v300 IoT request example to new routing/classification naming and iot details structure.
tnt/src/main/resources/standards/tnt/messages/tnt-300-request-equipment.json Updates v300 equipment request example to new routing/classification naming.
tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/party/TntProducer.java Aligns event type filtering logic with the renamed eventType attribute.
tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/party/TntConstants.java Removes the obsolete EVENT_TYPE_CODE constant and retains EVENT_TYPE.
tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntEventAttributes.java Renames JSON attribute constants to match schema (e.g., eventType, eventClassifier, etc.).
tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntDataSets.java Updates allowed value sets to match the expanded enums in v3.0.0.
tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntChecks.java Updates v300 conformance checks to use new attribute names and validate event classifier values.
core/src/main/java/org/dcsa/conformance/core/check/JsonAttribute.java Improves matchedMustBeOneOf error messages and uses sorted allowed values for deterministic output.
Comments suppressed due to low confidence (4)

tnt/src/main/resources/standards/tnt/messages/tnt-300-response.json:130

  • This example still uses legacy equipmentDetails attribute names (emptyIndicatorCode, movementType). The v3.0.0 schema was updated to emptyIndicator and transportPhase, so this payload will no longer match the schema (and may fail schema-based validation).
        "equipmentReference": "APZU4812090",
        "ISOEquipmentCode": "45G1",
        "emptyIndicatorCode": "EMPTY",
        "movementType": "IMPORT"
      }

tnt/src/main/resources/standards/tnt/messages/tnt-300-request-equipment.json:39

  • This example still uses legacy equipmentDetails attribute names (emptyIndicatorCode, movementType). The v3.0.0 schema was updated to emptyIndicator and transportPhase, so this request example should be migrated to the new attribute names to remain schema-compliant.
      "equipmentDetails": {
        "equipmentReference": "APZU4812090",
        "ISOEquipmentCode": "22GP",
        "emptyIndicatorCode": "LADEN",
        "movementType": "EXPORT"
      }

tnt/src/main/resources/standards/tnt/messages/tnt-300-response-nextpage.json:118

  • This response example still uses legacy equipmentDetails attribute names (emptyIndicatorCode, movementType). The v3.0.0 schema was updated to emptyIndicator and transportPhase, so this payload will not validate against the updated schema.
      "equipmentDetails": {
        "equipmentReference": "APZU4812090",
        "ISOEquipmentCode": "22GP",
        "emptyIndicatorCode": "LADEN",
        "movementType": "TRANSSHIPMENT"
      }

tnt/src/main/resources/standards/tnt/schemas/TNT_v3.0.0.yaml:463

  • The Event.eventID description still references eventRouting.originatingParty.* as part of the composite key, but EventRouting was updated to use originatingParties (array). Please update the description to reference the new field name/path so the schema documentation matches the actual schema.
            Routing of an event from the originating party (or parties), optionally via one or more forwarding parties, to the destination party (or parties).
          allOf:
            - $ref: "#/components/schemas/EventRouting"
        eventID:
          maxLength: 500

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/party/TntProducer.java Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (3)

tnt/src/main/resources/standards/tnt/messages/tnt-300-response.json:130

  • In equipmentDetails, the payload still uses the old attribute names emptyIndicatorCode and movementType, but the updated v3.0.0 schema defines these as emptyIndicator and transportPhase. As-is, this example no longer validates against TNT_v3.0.0.yaml and will fail schema-based conformance checks; please rename the fields (and keep the same values).
        "equipmentReference": "APZU4812090",
        "ISOEquipmentCode": "45G1",
        "emptyIndicatorCode": "EMPTY",
        "movementType": "IMPORT"
      }

tnt/src/main/resources/standards/tnt/messages/tnt-300-response-nextpage.json:116

  • This example still uses equipmentDetails.emptyIndicatorCode and equipmentDetails.movementType, but the v3.0.0 schema expects emptyIndicator and transportPhase. Please update these attribute names so the next-page example conforms to the updated schema and can be used for pagination validation.
      "equipmentDetails": {
        "equipmentReference": "APZU4812090",
        "ISOEquipmentCode": "22GP",
        "emptyIndicatorCode": "LADEN",
        "movementType": "TRANSSHIPMENT"

tnt/src/main/resources/standards/tnt/messages/tnt-300-request-equipment.json:38

  • equipmentDetails uses legacy fields emptyIndicatorCode and movementType, but the updated v3.0.0 schema defines emptyIndicator and transportPhase. Update this request example accordingly; otherwise the POST payload example will not validate against TNT_v3.0.0.yaml.
      "equipmentDetails": {
        "equipmentReference": "APZU4812090",
        "ISOEquipmentCode": "22GP",
        "emptyIndicatorCode": "LADEN",
        "movementType": "EXPORT"

Comment thread tnt/src/main/java/org/dcsa/conformance/standards/tnt/v300/checks/TntChecks.java Outdated
Comment thread tnt/src/main/resources/standards/tnt/schemas/TNT_v3.0.0.yaml
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (3)

tnt/src/main/resources/standards/tnt/messages/tnt-300-response.json:130

  • This equipment event example still uses the legacy attribute names emptyIndicatorCode and movementType, but the v3.0.0 schema in this PR renames them to emptyIndicator and transportPhase. Updating this template to the new attribute names will keep the sample payload aligned with the published schema and avoid implementers copying outdated fields.
      "equipmentDetails": {
        "equipmentReference": "APZU4812090",
        "ISOEquipmentCode": "45G1",
        "emptyIndicatorCode": "EMPTY",
        "movementType": "IMPORT"
      }

tnt/src/main/resources/standards/tnt/messages/tnt-300-response-nextpage.json:117

  • This equipment event example still uses the legacy attribute names emptyIndicatorCode and movementType, but the v3.0.0 schema in this PR renames them to emptyIndicator and transportPhase. Updating this template to the new attribute names will keep the sample payload aligned with the published schema and avoid implementers copying outdated fields.
      "equipmentDetails": {
        "equipmentReference": "APZU4812090",
        "ISOEquipmentCode": "22GP",
        "emptyIndicatorCode": "LADEN",
        "movementType": "TRANSSHIPMENT"
      }

tnt/src/main/resources/standards/tnt/messages/tnt-300-request-equipment.json:39

  • This equipment event request template still uses the legacy attribute names emptyIndicatorCode and movementType, but the v3.0.0 schema in this PR renames them to emptyIndicator and transportPhase. Updating this template keeps the emitted conformance payload aligned with the schema.
      "equipmentDetails": {
        "equipmentReference": "APZU4812090",
        "ISOEquipmentCode": "22GP",
        "emptyIndicatorCode": "LADEN",
        "movementType": "EXPORT"
      }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants