Skip to content

Move remaining payment request APIs to OpenAPI spec - #1383

Open
tom-blake wants to merge 3 commits into
masterfrom
move-payment-request-apis-to-openapi
Open

tom-blake wants to merge 3 commits into
masterfrom
move-payment-request-apis-to-openapi

Conversation

@tom-blake

Copy link
Copy Markdown
Contributor

Continues the migration started with createPaymentRequest so all non-legacy payment request endpoints render from a single source of truth.

  • Adds 15 endpoint specs plus a payment-activity model, reusing existing request, response and error content verbatim.
  • Registers new paths in openapi/index.yaml and switches payment-requests.mdoc to openApiEndpoint tags.
  • Extends OpenApiResolver and OpenApiEndpoint minimally to render query parameters and populate curl URLs from parameter examples.
  • Ignores legacy APIs (already removed) and leaves old _endpoints JS files in place to keep the diff small.

Verified with eslint, vitest (69 passed), ref resolution check, and mdoc operationId coverage.

Continue the migration started with createPaymentRequest so all
non-legacy payment request endpoints render from a single source of
truth, keeping request, response and error docs consistent.
Spectral oas3-valid-media-example requires amount as string and
conditionId as integer to match the payment-activity schema.
The mdoc page was a thin shell of openApiEndpoint tags around content
that now lives in the spec. Generating the page, navigation and search
entries from the spec removes the duplication so endpoint, model and
error docs have a single source of truth.
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.

1 participant