Skip to content

BKG 2.0: EBL 3.0: SD-3100, SD-3101: Add support for identification of plastic pellets - #643

Merged
HenrikHL merged 1 commit into
masterfrom
SD-3100_SD-3101_Plastic-pellets
Aug 6, 2026
Merged

BKG 2.0: EBL 3.0: SD-3100, SD-3101: Add support for identification of plastic pellets#643
HenrikHL merged 1 commit into
masterfrom
SD-3100_SD-3101_Plastic-pellets

Conversation

@HenrikHL

@HenrikHL HenrikHL commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

SD-3100: Add support for identification of plastic pellets shipments in Booking request
SD-3101: API: Add support for identification of plastic pellets shipments in Shipping Instructions

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Add equipmentAttributeCodes to BKG 2.0 and EBL 3.0 specs for plastic pellets

✨ Enhancement 📝 Documentation 🕐 10-20 Minutes

Grey Divider

AI Description

• Add equipmentAttributeCodes arrays to booking equipment requests.
• Add equipmentAttributeCodes arrays to EBL cargo items (incl. issuance and PINT).
• Reference SMDG ATTRIBUTES code list to identify plastic pellet-related attributes.
Diagram

graph TD
  Client[API Consumers] --> BKG["bkg/v2/BKG_v2.0.5.yaml"] --> SMDG{{"SMDG ATTRIBUTES\nCode List"}}
  Client --> EBL["ebl/v3/EBL_v3.0.4.yaml"] --> SMDG
  Client --> EBLISS["ebl/v3/issuance/EBL_ISS_v3.0.4.yaml"] --> SMDG
  Client --> PINT["pint/v3/EBL_PINT_v3.0.0.yaml"] --> SMDG
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Extract reusable schema component (e.g., EquipmentAttributeCodes) and $ref it
  • ➕ Avoids repeating identical array definitions across specs/objects
  • ➕ Improves consistency and makes future updates safer
  • ➖ Requires small refactor of existing schema structure
  • ➖ May be harder to read without jumping to component definitions
2. Add dedicated boolean/enum for plastic pellets instead of generic attributes
  • ➕ Very explicit intent for the plastic pellets use-case
  • ➕ Potentially simpler validation rules
  • ➖ Less extensible for future attribute-based requirements
  • ➖ Risks proliferating special-purpose fields over time

Recommendation: The generic equipmentAttributeCodes approach is the better long-term contract shape (it supports plastic pellets and other attributes). Consider extracting the repeated definition into a shared schema component and referencing it to reduce duplication and drift between BKG/EBL/ISS/PINT variants.

Files changed (4) +54 / -0

Enhancement (4) +54 / -0
BKG_v2.0.5.yamlAdd equipmentAttributeCodes to requested equipment schemas +18/-0

Add equipmentAttributeCodes to requested equipment schemas

• Introduces an equipmentAttributeCodes array on requested equipment structures. Codes reference the SMDG ATTRIBUTES code list (e.g., PLX) to carry attribute identification for shipments such as plastic pellets.

bkg/v2/BKG_v2.0.5.yaml

EBL_v3.0.4.yamlAdd equipmentAttributeCodes to eBL cargo item schemas +18/-0

Add equipmentAttributeCodes to eBL cargo item schemas

• Adds an equipmentAttributeCodes array to cargo item-related schemas, allowing cargo/equipment attributes to be communicated in Shipping Instructions. Values are defined by the SMDG ATTRIBUTES code list.

ebl/v3/EBL_v3.0.4.yaml

EBL_ISS_v3.0.4.yamlAdd equipmentAttributeCodes to eBL issuance cargo item schema +9/-0

Add equipmentAttributeCodes to eBL issuance cargo item schema

• Extends the issuance OpenAPI contract with equipmentAttributeCodes on cargo item structures. Aligns issuance payloads with the main EBL contract for attribute identification.

ebl/v3/issuance/EBL_ISS_v3.0.4.yaml

EBL_PINT_v3.0.0.yamlAdd equipmentAttributeCodes to PINT eBL cargo item schema +9/-0

Add equipmentAttributeCodes to PINT eBL cargo item schema

• Adds equipmentAttributeCodes to the PINT variant of the EBL schema for cargo items. Keeps partner-facing contract consistent with the main EBL attribute support.

pint/v3/EBL_PINT_v3.0.0.yaml

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Action required

1. Missing pellets phrase in commodityType 📎 Requirement gap ≡ Correctness
Description
The BKG schema does not include the exact plastic-pellets declaration text on
Commodity.commodityType, so shippers are not guided to provide the required phrase per the ticket
requirement.
Code

bkg/v2/BKG_v2.0.5.yaml[R5335-5338]

+        equipmentAttributeCodes:
+          type: array
+          description: |
+            A list of `Equipment Attribute Codes` that apply to the requested equipment.
Evidence
PR Compliance ID 2 requires the exact declaration phrase to be included on the BKG API commodity
type. In BKG_v2.0.5.yaml, Commodity.commodityType contains only a generic description and the
example Mobile phones, with no declaration phrase present.

BKG API includes the plastic-pellets declaration text on commodity type (as specified in ticket)
bkg/v2/BKG_v2.0.5.yaml[5831-5837]
bkg/v2/BKG_v2.0.5.yaml[5335-5343]

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

## Issue description
PR Compliance ID 2 requires the BKG API commodity type to include the exact declaration text: `CONTAINS PLASTIC PELLETS (PLX) AS PER IMO MEPC.1/CIRC.909`. The current `Commodity.commodityType` schema description/example does not include this declaration.

## Issue Context
This PR adds `equipmentAttributeCodes`, but the compliance item explicitly requires the human-readable declaration text to be present on the commodity type (as specified in the SD-3100 ticket).

## Fix Focus Areas
- bkg/v2/BKG_v2.0.5.yaml[5831-5837]

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


Grey Divider

Context used

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

Comment thread bkg/v2/BKG_v2.0.5.yaml
Comment on lines +5335 to +5338
equipmentAttributeCodes:
type: array
description: |
A list of `Equipment Attribute Codes` that apply to the requested equipment.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Missing pellets phrase in commoditytype 📎 Requirement gap ≡ Correctness

The BKG schema does not include the exact plastic-pellets declaration text on
Commodity.commodityType, so shippers are not guided to provide the required phrase per the ticket
requirement.
Agent Prompt
## Issue description
PR Compliance ID 2 requires the BKG API commodity type to include the exact declaration text: `CONTAINS PLASTIC PELLETS (PLX) AS PER IMO MEPC.1/CIRC.909`. The current `Commodity.commodityType` schema description/example does not include this declaration.

## Issue Context
This PR adds `equipmentAttributeCodes`, but the compliance item explicitly requires the human-readable declaration text to be present on the commodity type (as specified in the SD-3100 ticket).

## Fix Focus Areas
- bkg/v2/BKG_v2.0.5.yaml[5831-5837]

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new equipmentAttributeCodes array field to Booking (BKG 2.0) and eBL-related schemas (EBL 3.0 / EBL issuance / PINT) to support identifying shipments (e.g., plastic pellets) via SMDG Equipment Attribute Codes.

Changes:

  • Add equipmentAttributeCodes to Booking RequestedEquipment and RequestedEquipmentShipper.
  • Add equipmentAttributeCodes to EBL CargoItem and CargoItemShipper.
  • Add equipmentAttributeCodes to PINT CargoItem and EBL Issuance CargoItem.

Reviewed changes

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

File Description
pint/v3/EBL_PINT_v3.0.0.yaml Adds equipmentAttributeCodes to PINT CargoItem to carry SMDG attribute codes.
ebl/v3/issuance/EBL_ISS_v3.0.4.yaml Adds equipmentAttributeCodes to issuance CargoItem to propagate SMDG attribute codes.
ebl/v3/EBL_v3.0.4.yaml Adds equipmentAttributeCodes to CargoItem and CargoItemShipper for Shipping Instructions payloads.
bkg/v2/BKG_v2.0.5.yaml Adds equipmentAttributeCodes to requested equipment schemas to flag attribute-coded shipments at booking time.
Suppressed comments (3)

ebl/v3/EBL_v3.0.4.yaml:8174

  • The equipmentAttributeCodes item schema is currently an unconstrained string, which allows empty/whitespace-only values even though this is a code-list field. Consider adding the standard non-blank string pattern used throughout the spec to improve validation.
          items:
            type: string
            description: |
              The code used to identify a property or status applicable to the cargo item. The codeList used is the [SMDG ATTRIBUTES Code List](https://smdg.org/documents/smdg-code-lists/smdg-handling-stowins-attributes-code-lists/).
            example: PLX

ebl/v3/EBL_v3.0.4.yaml:8241

  • The equipmentAttributeCodes item schema is currently an unconstrained string, which allows empty/whitespace-only values even though this is a code-list field. Consider adding the standard non-blank string pattern used throughout the spec to improve validation.
          items:
            type: string
            description: |
              The code used to identify a property or status applicable to the cargo item. The codeList used is the [SMDG ATTRIBUTES Code List](https://smdg.org/documents/smdg-code-lists/smdg-handling-stowins-attributes-code-lists/).
            example: PLX

bkg/v2/BKG_v2.0.5.yaml:5448

  • The equipmentAttributeCodes item schema is currently an unconstrained string, which allows empty/whitespace-only values even though this is a code-list field. Consider adding the standard non-blank string pattern used throughout the spec to improve validation.
          items:
            type: string
            description: |
              The code used to identify a property or status applicable to the requested equipment. The codeList used is the [SMDG ATTRIBUTES Code List](https://smdg.org/documents/smdg-code-lists/smdg-handling-stowins-attributes-code-lists/).
            example: PLX

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

Comment on lines +2266 to +2270
items:
type: string
description: |
The code used to identify a property or status applicable to the cargo item. The codeList used is the [SMDG ATTRIBUTES Code List](https://smdg.org/documents/smdg-code-lists/smdg-handling-stowins-attributes-code-lists/).
example: PLX
Comment on lines +1607 to +1611
items:
type: string
description: |
The code used to identify a property or status applicable to the cargo item. The codeList used is the [SMDG ATTRIBUTES Code List](https://smdg.org/documents/smdg-code-lists/smdg-handling-stowins-attributes-code-lists/).
example: PLX
Comment thread bkg/v2/BKG_v2.0.5.yaml
Comment on lines +5339 to +5343
items:
type: string
description: |
The code used to identify a property or status applicable to the requested equipment. The codeList used is the [SMDG ATTRIBUTES Code List](https://smdg.org/documents/smdg-code-lists/smdg-handling-stowins-attributes-code-lists/).
example: PLX
Comment thread ebl/v3/EBL_v3.0.4.yaml
Comment on lines +8166 to +8170
equipmentAttributeCodes:
type: array
description: |
A list of `Equipment Attribute Codes` that apply to the cargo item.
items:
@HenrikHL
HenrikHL merged commit 025f914 into master Aug 6, 2026
2 checks passed
@HenrikHL
HenrikHL deleted the SD-3100_SD-3101_Plastic-pellets branch August 6, 2026 13:53
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