UPG003 - Unmapped country code¶
Description¶
The v0.6 → v0.7 compat shim wrapped a scalar country code (e.g.
"XX") into the v0.7 Country shape, but the code is not in the
bundled ISO-3166-1 alpha-2 list. The structural rewrite still
happens ({countryCode: "XX"}), but the resulting payload will
fail v0.7 model validation downstream.
Category¶
Compat shim (Phase 4 of docs/plans/UNTP_0.7.0_MIGRATION.md).
Severity¶
warning
Common causes¶
- The source data uses a typo'd country code (e.g.
"GE"for Germany when the correct alpha-2 is"DE"). - The source data uses an alpha-3 code (
"DEU") where v0.7 requires alpha-2. - The source uses a non-ISO regional code (e.g. an internal
manufacturing-region code) that should never have been written
into
originCountryin the first place.
How to fix¶
-
Fix the source data — the field expects ISO-3166-1 alpha-2. Examples:
"DE"for Germany,"AU"for Australia,"ZM"for Zambia. -
If the source uses alpha-3, convert to alpha-2 in your producer pipeline before invoking the shim.
-
If the value is genuinely a non-country region, move it to a different field —
Material.originCountryandProduct.countryOfProductionare both ISO-pinned in v0.7.
The shim still produces the upgraded structure, so callers can
choose to pass --accept-warnings to dppvalidator migrate if
they intend to fix the country code in a follow-up step. The
upgraded payload will not validate against the v0.7 schema until
the country code is corrected.
See also¶
- Migration guide: 0.6 → 0.7 — Country / Material / Classification shape changes.
VOC001— the runtime validator's equivalent invalid-country error (fires after the shim, when the upgraded payload is validated).- Error Overview