Repository navigation
docs(split-payments): validate the allowed_combinations profile example - #658
Conversation
|
A gentle note on this and its sibling docs and schema PRs (#659, #660, #661, #662, #669, #670, plus #625): all eight are rebased onto current main, conflict free, and validate_examples passes on each. They are independent of one another, so they can be reviewed in any order or batched, whatever is easiest. Happy to adjust any of them. |
|
Following up on this docs and schema batch (#658, #659, #660, #661, #662, #669, #670, #625): all eight are still green on current main, conflict free, and independent, so any subset can be merged in any order. If the batch size is the awkward part, I am glad to fold the docs-only ones into a single PR to cut the review overhead, whatever is easiest on your side. No urgency at all, just flagging they are ready whenever the queue allows. Thanks @damaz91. |
|
@jingyli you are a requested reviewer here, so flagging this quiet one. Small fix so the split payments profile example actually validates against the profile schema. Glad to adjust anything. |
|
@knightlin-shopify I am supportive of fixing this example - could you please review? |
82d20c2 to
bd08cce
Compare
|
Updated the spec URL in the example to the post-reorganization path, specification/payment/extensions/split-payments, matching what the other extension profiles carry on current main. The rest of the example is unchanged. |
7571d2a to
9f836a5
Compare
karangoel16
left a comment
There was a problem hiding this comment.
Verified against the profile schema: the capabilities map form, the required schema URL, and extends are all correct, and the annotation matches the existing precedent.
The only business-profile example for the split payments extension was
annotated `ucp:example skip`, so CI never checked it, and it did not match
the profile schema three ways: `capabilities` was an array where the schema
defines an object map keyed by reverse-domain name, the entry omitted the
required `schema` URL, and it pinned `version: 2026-01-23`, a release that
does not contain this extension.
Rewrite the example in the `ucp.capabilities` map form with `spec`, `schema`,
`extends`, and `{{ ucp_version }}`, mirroring the buyer-consent profile
example, and replace the skip with a validated
`schema=profile def=business_schema` annotation so CI covers it going forward.
Full corpus: 283 passed (was 282), 47 skipped (was 48).
The example wrote the pre reorganization flat path. Every extension profile on current main carries the full reorganized path, so the example now matches, specification/payment/extensions/split-payments.
9f836a5 to
1bcec24
Compare
|
@archrao @kmcduffie can either of you take a quick look here? Thanks |
Problem
The only business-profile example for the split payments extension is annotated
<!-- ucp:example skip -->, so CI never validates it, and it does not match the profile schema in three ways:capabilitiesis an array, butucp.jsondefines it as an object map keyed by reverse-domain name.schemaURL (capability.jsonbusiness_schemarequiresschema)."version": "2026-01-23", a release that does not contain this extension. Main has since changed that line to{{ ucp_version }}independently, so this branch no longer touches it and problem 3 is already resolved.Validating the fragment against the profile schema fails on the
capabilitiestype and then on the missingschemaproperty; it passes once rewritten as a map with aschemaURL.Fix
Rewrite the example in the
ucp.capabilitiesmap form withspec,schema,extends, and{{ ucp_version }}, mirroring the buyer-consent profile example, and replace theskipannotation with a validatedschema=profile def=business_schemaannotation so CI covers it going forward.extends: ["dev.ucp.shopping.checkout"]names the parent capability this business profile entry extends.common/payment_split_payments.jsonextends bothdev.ucp.shopping.checkoutanddev.ucp.lodging.booking, with one extended data schema per parent under$defs, and declares its singlebusiness_schemaunder$defs["dev.ucp.common.payment.split_payments"]. The example declares the checkout parent it uses.Verification
scripts/validate_examples.pyfull corpus goes from 398 to 399 passing (53 to 52 skipped): the example flips from skipped to validated.ucp-schema lint source/unaffected. Counts re-measured on 2026-10-08 after rebasing onto main.Two corrections to an earlier version of this body. It cited a
requireskey on checkout insplit_payments.json: that file iscommon/payment_split_payments.jsonsince #741,and it has no
requireskey at any depth, so both the name and the key were wrong.And on scope, worth being precise about what the annotation buys: the profile schema
validates the capability envelope, the version, spec and schema URLs,
extends, and thatconfigis an object. It does not reach insideconfig, soallowed_combinationscontent is still unvalidated by CI. I checked the example by hand against
types/business_split_payments_config.jsonand it is valid. Reaching it automaticallyneeds
def=to accept a nested path, which is a separate change.A third correction, to the Fix section above. It said this file declares a
business_schemaunder
$defsfor bothdev.ucp.shopping.checkoutanddev.ucp.lodging.booking. It doesnot. Those two
$defsentries are the extended data schemas, one per parent, and neithercontains a
business_schema. The onlybusiness_schemain the file sits under$defs["dev.ucp.common.payment.split_payments"]. The point the sentence was making stands,that the extension targets both parents so
extendshas to name the one in use, but thestructure is as now described.