You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
• Clarify OOGDetails schema description to better reflect equipment-unit association.
• Add minimum: 0 constraints to measurement value fields across BKG/EBL/PINT specs.
• Align validation rules between EBL core, issuance, and PINT artifacts.
Diagram
graph TD
C["API consumers/validators"] --> S1["BKG v2.0.5 spec"] --> O["OOGDetails schema"] --> V["Measurement value (min 0)"]
C --> S2["EBL v3.0.4 spec"] --> O --> V
C --> S3["EBL ISS v3.0.4 spec"] --> O --> V
C --> S4["EBL PINT v3.0.0 spec"] --> O --> V
Loading
High-Level Assessment
The following are alternative approaches to this PR:
1. Factor shared schemas into a single source of truth
➕ Avoids repeating OOGDetails/measurement constraints across multiple artifacts
➕ Reduces drift risk between EBL core/issuance/PINT variants
➕ Makes future schema tightening (e.g., min/max, units) easier to apply consistently
➖ Requires a build/publish step (bundling) or cross-file $ref strategy
➖ May complicate consumer tooling if external refs are not supported uniformly
2. Introduce a dedicated NonNegativeMeasurement schema and $ref it
➕ Keeps the change localized and explicit
➕ Improves readability and reuse within each spec
➖ Still duplicates across multiple spec files unless combined with shared-source approach
Recommendation: Current approach is appropriate for a targeted alignment: it is minimal, backwards-compatible for valid payloads, and improves validation immediately. If future PRs continue to touch the same schemas across BKG/EBL/ISS/PINT, consider consolidating shared components (or a reusable NonNegativeMeasurement schema) to reduce cross-artifact drift.
EBL_v3.0.4.yamlClarify OOGDetails description and add value minimum+2/-1
Clarify OOGDetails description and add value minimum
• Updates the Out of Gauge Details description to explicitly associate OOG cargo with the equipment unit. Adds 'minimum: 0' to the measurement 'value' field to enforce non-negative values.
EBL_ISS_v3.0.4.yamlAlign issuance OOGDetails description and value minimum+2/-1
Align issuance OOGDetails description and value minimum
• Matches the OOGDetails description wording with the updated EBL spec. Adds 'minimum: 0' to the measurement 'value' field for consistent validation in issuance artifacts.
EBL_PINT_v3.0.0.yamlAlign PINT OOGDetails description and enforce value minimum+2/-1
Align PINT OOGDetails description and enforce value minimum
• Updates the OOGDetails description to reflect equipment-unit association. Adds 'minimum: 0' to the measurement 'value' field (ordering differs slightly but semantics match).
The PR adds minimum: 0 to the shared Measurement.value schema, but Measurement is also used
for center-of-gravity longitudinal/transverse/vertical offsets; this makes negative offsets invalid
and will break schema validation for payloads that express offsets relative to mid/top reference
points. This impacts multiple specs (BKG v2, EBL v3, EBL issuance, PINT) because they all reuse the
same Measurement schema for offsets.
value:
type: number
format: float
+ minimum: 0
description: |
Evidence
Measurement is referenced by center-of-gravity offset fields, while the reference point enum
includes middle/top positions—cases where signed offsets are necessary. Adding minimum: 0 to
Measurement.value therefore constrains these offsets across all the modified specs.
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
### Issue description
`minimum: 0` was added to `#/components/schemas/Measurement/properties/value`, but `Measurement` is reused for center-of-gravity offsets. Offsets can legitimately be negative when measured from mid/top reference points, so the shared constraint is too strict.
### Issue Context
In these specs, `CenterOfGravity` includes a `referencePoint`/`location` enumeration that includes *middle* and *top* reference points (e.g., `TOP_CENTER_CENTER`, `MIDDLE_CENTER_CENTER`). Offsets relative to such reference points need to support signed values.
### Fix Focus Areas
- ebl/v3/EBL_v3.0.4.yaml[9641-9678]
- bkg/v2/BKG_v2.0.5.yaml[6967-7045]
- ebl/v3/issuance/EBL_ISS_v3.0.4.yaml[2726-2742]
- pint/v3/EBL_PINT_v3.0.0.yaml[3362-3400]
### Suggested approach
1. Remove `minimum: 0` from the shared `Measurement.value` schema.
2. Introduce a new schema (e.g., `NonNegativeMeasurement`) that `allOf`-references `Measurement` and constrains `value` with `minimum: 0`.
3. Update only the fields that are inherently non-negative (dimensions, overhang distances, etc.) to use `NonNegativeMeasurement`, while keeping offsets on the signed `Measurement`.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
HenrikHL
changed the title
BKG 2.0, EBL 3.0: Improve OOGDetails description and set min value
BKG 2.0, EBL 3.0: Improve OOGDetails description
Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.