Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
docs(backend): add webhooks openapi spec #1210
docs(backend): add webhooks openapi spec #1210
Changes from 2 commits
10f0550
aca512d
6d1091c
8f2b1e4
f4dabb6
4a58b7a
32f53da
bc4f24f
c634051
0c4eff7
48525ad
1662a22
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we necessarily need
withdrawal
? it's not being used in the MAP webhooks handler, and looking at the webhook publishers, the only information that isn't already on thedata
is theassetId
: something that we could just include in thedata
object as well IMOThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's only used by the outgoing payment event.
@wilsonianb can you explain its use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
withdrawal
isn't included in the request, justid
,type
, anddata
rafiki/packages/backend/src/webhook/service.ts
Lines 87 to 105 in 80071d3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was looking at this: https://github.com/interledger/rafiki/blob/main/packages/backend/src/webhook/model.ts#L8
Is it just
id
,type
, anddata
for all of them?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I think the webhook service code I linked 👆 is the only place we're sending webhook requests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about here? I think we have two different
sendWebhookEvent
s (which we should clean up)rafiki/packages/backend/src/open_payments/payment/outgoing/lifecycle.ts
Lines 148 to 190 in b9bce58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one ^ just adds it to the DB to prepare for sending. It looks the
event.withdrawal
doesn't gets added to the webhookPOST
request (the one that @wilsonianb commented), since body just hasid
type
data
.Maybe we can even just remote
withdrawal
from the code completely on a follow-up PR?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rafiki/packages/backend/src/open_payments/payment/outgoing/model.ts
Line 213 in 7ca1647
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!