Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stoplight/styleguide.json

Large diffs are not rendered by default.

250 changes: 250 additions & 0 deletions bkg/v2/BKG_v2.0.5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2961,6 +2961,12 @@ components:

**Note:** If both `contractQuotationReference` and `extendedContractQuotationReference` are provided then `extendedContractQuotationReference` takes precedence and `contractQuotationReference` must be ignored.
example: HHL1401
outOfGaugeQuoteReference:
type: string
maxLength: 70
Comment on lines +2964 to +2966

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

1. Oog quote unvalidated 🐞 Bug ≡ Correctness

outOfGaugeQuoteReference was added without the repo’s typical non-blank/trimmed-string pattern,
so the schema permits empty/whitespace-only values and leading/trailing whitespace unlike other
reference fields. This can lead to inconsistent payload validation and lower data quality across
clients/servers relying on the OpenAPI contract.
Agent Prompt
## Issue description
`outOfGaugeQuoteReference` is defined as a plain `string` with `maxLength`, but it does not include the standard non-blank/trimmed-string constraint used by similar reference fields in this spec (e.g., `contractQuotationReference`, `extendedContractQuotationReference`). As a result, the OpenAPI contract allows `""`, whitespace-only strings, and strings with leading/trailing whitespace.

## Issue Context
This field is added in three separate schemas/locations. All three definitions should be kept consistent with existing reference-field validation rules.

## Fix Focus Areas
- bkg/v2/BKG_v2.0.5.yaml[2964-2969]
- bkg/v2/BKG_v2.0.5.yaml[3375-3380]
- bkg/v2/BKG_v2.0.5.yaml[3852-3857]

## Suggested fix
For each `outOfGaugeQuoteReference` occurrence, add the same pattern used by other reference fields, e.g.:

```yaml
outOfGaugeQuoteReference:
  type: string
  pattern: ^\S(?:.*\S)?$
  maxLength: 70
  description: |
    ...
```

(Optionally also align other metadata like `example` positioning, but the key fix is the `pattern`.)

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

description: |
Reference number of the OOG feasibility assessment or commercial quote previously issued by the carrier for this shipment.
example: OOG-QUOTE-2026-000123
vessel:
$ref: '#/components/schemas/Vessel'
carrierServiceName:
Expand Down Expand Up @@ -3366,6 +3372,12 @@ components:

**Note:** If both `contractQuotationReference` and `extendedContractQuotationReference` are provided then `extendedContractQuotationReference` takes precedence and `contractQuotationReference` must be ignored.
example: HHL1401
outOfGaugeQuoteReference:
type: string
maxLength: 70
description: |
Reference number of the OOG feasibility assessment or commercial quote previously issued by the carrier for this shipment.
example: OOG-QUOTE-2026-000123
vessel:
$ref: '#/components/schemas/Vessel'
carrierServiceName:
Expand Down Expand Up @@ -3837,6 +3849,12 @@ components:

**Note:** If both `contractQuotationReference` and `extendedContractQuotationReference` are provided then `extendedContractQuotationReference` takes precedence and `contractQuotationReference` must be ignored.
example: HHL1401
outOfGaugeQuoteReference:
type: string
maxLength: 70
description: |
Reference number of the OOG feasibility assessment or commercial quote previously issued by the carrier for this shipment.
example: OOG-QUOTE-2026-000123
vessel:
$ref: '#/components/schemas/Vessel'
carrierServiceName:
Expand Down Expand Up @@ -5383,6 +5401,8 @@ components:
A list of `Commodities`
items:
$ref: '#/components/schemas/Commodity'
outOfGaugeDetails:
$ref: '#/components/schemas/OutOfGaugeDetails'
required:
- ISOEquipmentCode
- units
Expand Down Expand Up @@ -5477,6 +5497,8 @@ components:
A list of `Commodities`
items:
$ref: '#/components/schemas/CommodityShipper'
outOfGaugeDetails:
$ref: '#/components/schemas/OutOfGaugeDetails'
required:
- ISOEquipmentCode
- units
Expand Down Expand Up @@ -5547,6 +5569,7 @@ components:
$ref: '#/components/schemas/ContainerPositioningLocation'
required:
- location

ContainerPositioningLocation:
type: object
title: Container Positioning Location
Expand Down Expand Up @@ -5771,6 +5794,7 @@ components:
$ref: '#/components/schemas/CustomsReference'
required:
- commodityType

Commodity:
type: object
title: Commodity
Expand Down Expand Up @@ -6815,6 +6839,232 @@ components:
example: '2024-09-04T09:41:00Z'
depotReleaseLocation:
$ref: '#/components/schemas/EmptyContainerDepotReleaseLocation'

######################
# Out of Gauge Details
######################
OutOfGaugeDetails:
type: object
title: Out of Gauge Details
description: |
Details related to Out of Gauge cargo for the requested equipment.
properties:
totalCargoDimensions:
$ref: '#/components/schemas/TotalCargoDimensions'
outOfGaugeExtensions:
$ref: '#/components/schemas/OutOfGaugeExtensions'
centerOfGravity:
$ref: '#/components/schemas/CenterOfGravity'
lashingRequirements:
type: string
maxLength: 5000
description: |
Lashing or securing requirements applicable to the OOG cargo.
example: Cargo to be secured with chain lashings according to approved lashing plan.
handlingInstructions:
type: string
maxLength: 5000
description: |
Handling instructions applicable to the OOG cargo.
example: Handle with care. Do not stack. Protect exposed components during terminal handling.
liftingInstructions:
type: string
maxLength: 5000
description: |
Instructions describing how to safely lift the equipment unit. Covers crane type, minimum capacity, lifting configuration, and any operational constraints.
example: Lift using certified lifting points only. Spreader beam required.
liftingPoints:
type: string
maxLength: 5000
description: |
Description of available lifting points on the cargo.
example: Four certified lifting points located on top frame, marked in the lifting plan.
isOnDeckOnly:
type: boolean
description: |
Indicates whether the cargo must only be stowed on deck.
example: false

########################
# Total Cargo Dimensions
########################
TotalCargoDimensions:
type: object
title: Total Cargo Dimensions
description: |
Overall outer dimensions of the cargo as placed on the equipment unit, representing the full dimensional envelope, including any projections or overhangs.
properties:
length:
type: object
title: Length
description: |
Overall length of the dimensional envelope, measured parallel to the longitudinal axis of the equipment unit.
allOf:
- $ref: '#/components/schemas/Measurement'
width:
type: object
title: Width
description: |
Overall width of the dimensional envelope, measured perpendicular to the longitudinal axis of the equipment unit.
allOf:
- $ref: '#/components/schemas/Measurement'
height:
type: object
title: Height
description: |
Overall height of the dimensional envelope, measured from the base of the equipment unit to the highest point of the cargo.
allOf:
- $ref: '#/components/schemas/Measurement'

#########################
# Out of Gauge Extensions
#########################
OutOfGaugeExtensions:
type: object
title: Out of Gauge Extensions
description: |
Directional measurements describing how far the cargo extends beyond the standard equipment envelope. Each value represents only the excess portion, not the total dimension.
properties:
overLengthFront:
type: object
title: Over Length Front
description: |
Distance by which the cargo protrudes beyond the front end (door end) of the equipment unit, measured from the outer face of the equipment's end wall or bolster.
allOf:
- $ref: '#/components/schemas/Measurement'
overLengthRear:
type: object
title: Over Length Rear
description: |
Distance by which the cargo protrudes beyond the rear end (non-door end) of the equipment unit, measured from the outer face of the equipment's end wall or bolster.
allOf:
- $ref: '#/components/schemas/Measurement'
overWidthLeft:
type: object
title: Over Width Left
description: |
Distance by which the cargo protrudes beyond the left side of the equipment unit when facing the front (door end), measured from the outer face of the equipment's side wall or rail.
allOf:
- $ref: '#/components/schemas/Measurement'
overWidthRight:
type: object
title: Over Width Right
description: |
Distance by which the cargo protrudes beyond the right side of the equipment unit when facing the front (door end), measured from the outer face of the equipment's side wall or rail.
allOf:
- $ref: '#/components/schemas/Measurement'
overHeight:
type: object
title: Over Height
description: |
Distance by which the cargo exceeds the standard external height of the equipment unit, measured from the top of the equipment's side rails or top rails to the highest point of the cargo.
allOf:
- $ref: '#/components/schemas/Measurement'

###################
# Center of Gravity
###################
CenterOfGravity:
type: object
title: Center of Gravity
description: |
Position of the combined center of gravity of all cargo placed on the equipment unit, expressed as offsets from a defined reference point.
properties:
referencePoint:
type: string
maxLength: 30
description: |
Reference point from which the center of gravity offsets are measured. Possible values:
- `BOTTOM_FRONT_LEFT` (Bottom Front Left)
- `BOTTOM_FRONT_CENTER` (Bottom Front Center)
- `BOTTOM_FRONT_RIGHT` (Bottom Front Right)
- `BOTTOM_CENTER_LEFT` (Bottom Center Left)
- `BOTTOM_CENTER_CENTER` (Bottom Center Center)
- `BOTTOM_CENTER_RIGHT` (Bottom Center Right)
- `BOTTOM_REAR_LEFT` (Bottom Rear Left)
- `BOTTOM_REAR_CENTER` (Bottom Rear Center)
- `BOTTOM_REAR_RIGHT` (Bottom Rear Right)

- `MIDDLE_FRONT_LEFT` (Middle Front Left)
- `MIDDLE_FRONT_CENTER` (Middle Front Center)
- `MIDDLE_FRONT_RIGHT` (Middle Front Right)
- `MIDDLE_CENTER_LEFT` (Middle Center Left)
- `MIDDLE_CENTER_CENTER` (Middle Center Center)
- `MIDDLE_CENTER_RIGHT` (Middle Center Right)
- `MIDDLE_REAR_LEFT` (Middle Rear Left)
- `MIDDLE_REAR_CENTER` (Middle Rear Center)
- `MIDDLE_REAR_RIGHT` (Middle Rear Right)

- `TOP_FRONT_LEFT` (Top Front Left)
- `TOP_FRONT_CENTER` (Top Front Center)
- `TOP_FRONT_RIGHT` (Top Front Right)
- `TOP_CENTER_LEFT` (Top Center Left)
- `TOP_CENTER_CENTER` (Top Center Center)
- `TOP_CENTER_RIGHT` (Top Center Right)
- `TOP_REAR_LEFT` (Top Rear Left)
- `TOP_REAR_CENTER` (Top Rear Center)
- `TOP_REAR_RIGHT` (Top Rear Right)
example: BOTTOM_FRONT_LEFT
longitudinalOffset:
Comment thread
qodo-code-review[bot] marked this conversation as resolved.
type: object
title: Longitudinal Offset
description: |
Longitudinal offset of the center of gravity from the defined reference point.
allOf:
- $ref: '#/components/schemas/Measurement'
transverseOffset:
type: object
title: Transverse Offset
description: |
Transverse offset of the center of gravity from the defined reference point.
allOf:
- $ref: '#/components/schemas/Measurement'
verticalOffset:
type: object
title: Vertical Offset
description: |
Vertical offset of the center of gravity from the defined reference point.
allOf:
- $ref: '#/components/schemas/Measurement'

#############
# Measurement
#############
Measurement:
type: object
title: Measurement
description: |
A measurement containing value and unit along with an optional classification of the value.
properties:
value:
type: number
format: float
description: |
Measurement value expressed in the unit indicated in the unit field.
example: 12500.0
unit:
type: string
maxLength: 3
description: |
Unit in which the measurement value is expressed. Possible values:
- `MTR` (metre)
- `CMT` (centimetre)
- `FOT` (foot)
- `INH` (inch)
example: MTR
classifier:
type: string
maxLength: 3
Comment thread
HenrikHL marked this conversation as resolved.
description: |
Classifier denoting whether a measurement is estimated or confirmed. Possible values:

- `EST` (Estimated)
- `CON` (Confirmed)
example: CON
required:
- value
- unit

###########
# Transport
###########
Expand Down
Loading