Replies: 1 comment 1 reply
|
You have identified the real friction precisely: "a constraint can satisfy the specification's extension requirements while still failing validation against the reference schema". It is worth separating two things the schema is doing at once. Structural validation asks whether the constraint object is well formed and permitted to appear in Reading the four models you list along a coordination axis is clarifying. Only your first, in which the base mandate schema would admit externally typed constraint objects and dispatch on Underneath the schema question is a governance one: whether AP2 intends unknown typed constraints to interoperate at all, or only those it has blessed. If the aim is open extension, the base schema has to admit objects it was not written against. If the aim is a closed set that grows by adoption, then the registry or incorporation models fit and the current closed |
Uh oh!
There was an error while loading. Please reload this page.
I'm looking at the Mandate Constraints extension point in AP2 v0.2 and wanted to clarify the intended schema model for third-party constraints.
The specification says that new Mandate Constraints can be defined by specifying a unique
type, a schema including selective-disclosure behavior, and an evaluation algorithm.However, the current canonical
open_checkout_mandate.jsonschema appears to constrainconstraints[]with ananyOfcontaining the currently definedcheckout.allowed_merchantsandcheckout.line_itemstypes.For example, suppose an integration defines a constraint conceptually like:
{ "type": "com.example.checkout.some_constraint", "value": "..." }with its own schema and deterministic evaluation algorithm.
What is the intended way for that constraint to compose with
mandate.checkout.open.1while still validating against the canonical AP2 schemas?A few possible models occurred to me:
type;I don't want to assume a particular model if there is already an intended extension mechanism.
Clarifying this would also seem useful for implementers building independent constraint extensions, since otherwise a constraint can satisfy the specification's extension requirements while still failing validation against the reference schema.
Is there an existing convention or planned mechanism for this that I've missed?
All reactions