Applied surcharge fields are no longer validated when being applied to a cart. Any object with any fields is allowed. Responsibility is passed to the surcharges plugin to validate before returning them.
This makes it easier for plugins to override the AppliedSurcharge schema, since it is stored by both carts and orders.
Type: feature
Changes
Companion to https://github.com/reactioncommerce/api-plugin-surcharges/pull/3
Applied surcharge fields are no longer validated when being applied to a cart. Any object with any fields is allowed. Responsibility is passed to the
surcharges
plugin to validate before returning them.This makes it easier for plugins to override the AppliedSurcharge schema, since it is stored by both carts and orders.
Breaking changes
None
Testing
Probably easiest to merge after code review and test together with https://github.com/reactioncommerce/api-plugin-surcharges/pull/3