BKG 2.0: SD-3105: Include OOG object - #639
Conversation
PR Summary by QodoBKG v2.0.5: add Out-of-Gauge (OOG) details and quote reference
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
There was a problem hiding this comment.
Pull request overview
This PR updates the BKG 2.0 (v2.0.5) OpenAPI specification to support Out of Gauge (OOG) data in booking requests, including introducing an OOGDetails object and documenting center-of-gravity reference points as a pseudo-enum.
Changes:
- Adds
OOGQuoteReferenceto multiple booking-related schemas. - Adds
OOGDetailsto requested equipment structures. - Introduces new component schemas for OOG details (
OOGDetails,TotalCargoDimensions,OutOfGaugeExtensions,CenterOfGravity) and a genericMeasurement.
Comments suppressed due to low confidence (2)
bkg/v2/BKG_v2.0.5.yaml:3854
OOGQuoteReferenceis missing the no-leading/trailing-whitespace pattern used by the other *QuotationReference fields in this schema (e.g.,contractQuotationReference,extendedContractQuotationReference). Without it, values like " ABC " are considered valid.
OOGQuoteReference:
type: string
maxLength: 100
bkg/v2/BKG_v2.0.5.yaml:3377
OOGQuoteReferenceis missing the no-leading/trailing-whitespace pattern used by the other *QuotationReference fields in this schema (e.g.,contractQuotationReference,extendedContractQuotationReference). Without it, values like " ABC " are considered valid.
OOGQuoteReference:
type: string
maxLength: 100
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Code Review by Qodo
Context used 1.
|
|
/agentic |
|
/agentic_review |
|
Code review by qodo was updated up to the latest commit ed4c2e4 |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (4)
bkg/v2/BKG_v2.0.5.yaml:3375
- Property name
OOGQuoteReferenceuses UpperCamelCase, butUpdateBookingrequest fields here use lowerCamelCase (e.g.,serviceContractReference,extendedContractQuotationReference). Consider renaming to keep JSON property naming consistent.
OOGQuoteReference:
bkg/v2/BKG_v2.0.5.yaml:3852
- Property name
OOGQuoteReferenceis UpperCamelCase while surrounding properties are lowerCamelCase. Keeping property casing consistent helps avoid surprising API payload shapes and code generation differences.
OOGQuoteReference:
bkg/v2/BKG_v2.0.5.yaml:2964
- Property name
OOGQuoteReferenceuses UpperCamelCase, but this schema’s other request fields use lowerCamelCase (e.g.,serviceContractReference,extendedContractQuotationReference). This inconsistency will leak into generated client/server models and makes the JSON payload less predictable.
This issue also appears in the following locations of the same file:
- line 3375
- line 3852
OOGQuoteReference:
bkg/v2/BKG_v2.0.5.yaml:6850
OOGDetailsschema description says it “Indicates whether” the cargo exceeds dimensions, but the schema is an object containing detailed dimension/handling fields (not a boolean indicator). Updating the description would better match the actual payload shape.
description: |
Indicates whether the cargo exceeds one or more of the standard external dimensions of the equipment unit.
|
/agentic-review |
|
/agentic_review |
| outOfGaugeQuoteReference: | ||
| type: string | ||
| maxLength: 70 |
There was a problem hiding this comment.
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
|
Code review by qodo was updated up to the latest commit dd1c518 |
SD-3105: Include Out of Gauge object. Improved the referencePoint to include the entire list of possible values (as a PseudoEnum)