Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(open-payments): export OpenAPI specs #440

Merged
merged 4 commits into from
Mar 14, 2024
Merged

Conversation

mkurapov
Copy link
Contributor

@mkurapov mkurapov commented Mar 14, 2024

Changes proposed in this pull request

  • Export getAuthServerOpenAPI getResourceServerOpenAPI getWalletAddressServerOpenAPI functions from the open-payments package
  • Move openapi/*yaml files into openapi/specs/

Context

Since we bundle the yaml files with the open-payments package, we should let users of the package (importantly for us, Rafiki) to fetch the OpenAPI objects for the Open Payments specs

Fixes #439

Copy link

changeset-bot bot commented Mar 14, 2024

🦋 Changeset detected

Latest commit: 083719f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@interledger/open-payments Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

netlify bot commented Mar 14, 2024

Deploy Preview for openpayments-preview canceled.

Name Link
🔨 Latest commit 083719f
🔍 Latest deploy log https://app.netlify.com/sites/openpayments-preview/deploys/65f2ebfe94e942000886c7e1

@mkurapov mkurapov marked this pull request as ready for review March 14, 2024 12:22
Copy link
Contributor

@BlairCurrey BlairCurrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Will be nice to have an easier way to get the right spec version in rafiki.

I spent some time thinking about the path assertions in packages/open-payments/src/openapi/index.test.ts. I was just thinking they were more a concern of createOpenAPI (if anything - kinda just an implementation detail of the spec) but I suppose it makes sense as a sanity check and isn't hard to update when things change (and they dont change often).

@mkurapov
Copy link
Contributor Author

@BlairCurrey good point, I was thinking along the same lines, but like you said, this is sanity checking createOpenAPI specifically in relation to the OP specs

@mkurapov
Copy link
Contributor Author

@BlairCurrey also, what was cool is that I just pnpm-linked the package with the changes and ran it through your integration test as a sanity in Rafiki 👍

@mkurapov mkurapov merged commit 1797345 into main Mar 14, 2024
10 checks passed
@mkurapov mkurapov deleted the 439/mk/export-openapi-specs branch March 14, 2024 19:28
@mkurapov mkurapov changed the title 439/mk/export openapi specs feat(open-payments): export OpenAPI spces Mar 15, 2024
@mkurapov mkurapov changed the title feat(open-payments): export OpenAPI spces feat(open-payments): export OpenAPI specs Mar 15, 2024
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.

Export functions that allow fetching the Open Payments OpenAPI objects in the Open Payments client
2 participants