Skip to content

fix: nest PaymentHandler.display_order under properties (#279) - #284

Open
wakqasahmed wants to merge 1 commit into
agentic-commerce-protocol:mainfrom
wakqasahmed:fix/issue-279-payment-handler-display-order-indent
Open

wakqasahmed wants to merge 1 commit into
agentic-commerce-protocol:mainfrom
wakqasahmed:fix/issue-279-payment-handler-display-order-indent

Conversation

@wakqasahmed

Copy link
Copy Markdown

Fix PaymentHandler.display_order OpenAPI indentation

🔧 Type of Change

  • Bug fix (non-breaking)

📝 Description

In openapi.agentic_checkout.yaml (both 2026-04-17 and unreleased), PaymentHandler.display_order is indented as a sibling of properties:/required: rather than nested inside properties:. Since display_order isn't a recognized OpenAPI/JSON-Schema keyword at the schema-object level, it's silently ignored there — and because PaymentHandler sets additionalProperties: false, a handler object that actually sets display_order (exactly what the field's own description invites merchants to do) fails schema validation with "unexpected field display_order".

The JSON Schema mirror (schema.agentic_checkout.json) already nests display_order correctly under properties in both versions — only the hand-maintained OpenAPI YAML had the indentation bug, so this brings the two representations back in sync.

🎯 Motivation and Context

Fixes/Addresses: #279

🧪 Testing

  • Parsed both modified YAML files with a YAML loader and confirmed display_order now resolves under components.schemas.PaymentHandler.properties.
  • Ran pnpm install && pnpm run validate:all — full validation suite passes (field types, descriptions, examples-against-schema across all versions), including the existing display_order example entries in examples/2026-04-17/examples.agentic_checkout.json and examples/unreleased/examples.agentic_checkout.json, which now validate against the corrected schema.

✅ Checklist

  • My change follows the project's code style and conventions
  • I have added a changelog entry file to changelog/unreleased/fix-payment-handler-display-order-indentation.md
  • I have tested my changes locally
  • This change does NOT require a SEP (it's minor/non-breaking)

🔍 Scope Verification

  • This is a minor, straightforward change (confirm by checking this)

📚 Additional Notes

Two-line indentation fix, scoped only to the affected schema — no behavior/field changes beyond making display_order actually usable per its own documented intent.

…erce-protocol#279)

display_order was indented as a sibling of properties/required in
openapi.agentic_checkout.yaml, so additionalProperties: false silently
rejected the field its own description tells merchants to send. Nest it
under properties in the 2026-04-17 and unreleased specs to match the
already-correct JSON Schema mirror.
@CLAassistant

CLAassistant commented Jul 24, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@wakqasahmed

Copy link
Copy Markdown
Author

Hi @prasad-stripe @lhwa — noticed this PR doesn't have a reviewer assigned yet — it's been about 5 days, CI is green and it's mergeable. Would you (or whoever's best placed) be able to take a look when you get a chance, or point me to who should? Thanks!

@wakqasahmed

Copy link
Copy Markdown
Author

Hi @prasad-stripe @lhwa — checking back in — no reviewer yet, about 13 days quiet. Happy to make any changes needed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants