Found auditing plugin validate_input against schema required for every
product group (#322).
The gap
Textile v1.3.0 requires productIdentifier. TextilePlugin::validate_input
(the textile branch) checks fibreComposition, countryOfOrigin,
careInstructions and chemicalComplianceStandard. It never checks the
identifier.
Textile is the one plugin #322 did not fix by substitution, because it is the
one plugin that never called require_gtin in the first place. It was clean
through the identifier migration by accident, not by design — and that same
accident means it is now the only plugin not validating the identifier.
Note on the dual-product-group plugin
This crate serves both textile and unsold-goods, dispatched on the
in-payload productGroup discriminant. Only the textile branch should gain
this check. unsold-goods correctly has no productIdentifier — an Art. 24–25
discard disclosure covers a financial year across many products and identifies
no single one, which is why ProductGroupData::product_identifier() answers
None for it and why a registration built from one is refused.
Adding the check to the shared path would refuse every unsold-goods report.
Fix
In the else (textile) branch only:
.require_product_identifier("productIdentifier")
plus a test that an unsold-goods payload is still accepted without one — that is
the assertion that keeps the two branches honest.
Found auditing plugin
validate_inputagainst schemarequiredfor everyproduct group (#322).
The gap
Textile v1.3.0 requires
productIdentifier.TextilePlugin::validate_input(the textile branch) checks
fibreComposition,countryOfOrigin,careInstructionsandchemicalComplianceStandard. It never checks theidentifier.
Textile is the one plugin #322 did not fix by substitution, because it is the
one plugin that never called
require_gtinin the first place. It was cleanthrough the identifier migration by accident, not by design — and that same
accident means it is now the only plugin not validating the identifier.
Note on the dual-product-group plugin
This crate serves both
textileandunsold-goods, dispatched on thein-payload
productGroupdiscriminant. Only the textile branch should gainthis check.
unsold-goodscorrectly has noproductIdentifier— an Art. 24–25discard disclosure covers a financial year across many products and identifies
no single one, which is why
ProductGroupData::product_identifier()answersNonefor it and why a registration built from one is refused.Adding the check to the shared path would refuse every unsold-goods report.
Fix
In the
else(textile) branch only:plus a test that an unsold-goods payload is still accepted without one — that is
the assertion that keeps the two branches honest.