-
Notifications
You must be signed in to change notification settings - Fork 34
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
224/mk/post quote update #230
Conversation
This reverts commit 0309165.
openapi/resource-server.yaml
Outdated
receiver: | ||
$ref: ./schemas.yaml#/components/schemas/receiver | ||
receiveAmount: | ||
description: All amounts are maxima, i.e. multiple payments can be created under a grant as long as the total amounts of these payments do not exceed the maximum amount per interval as specified in the grant. |
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 description doesn't seem applicable to quotes
description: All amounts are maxima, i.e. multiple payments can be created under a grant as long as the total amounts of these payments do not exceed the maximum amount per interval as specified in the grant. |
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.
Should we also change the description of schemas.yaml -> components -> schemas -> amount
?
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, maybe we relocate that description to
open-payments/openapi/schemas.yaml
Lines 158 to 161 in 54f4bdc
sendAmount: | |
$ref: '#/components/schemas/amount' | |
receiveAmount: | |
$ref: '#/components/schemas/amount' |
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.
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.
Thanks for creating the issue!
openapi/resource-server.yaml
Outdated
receiver: | ||
$ref: ./schemas.yaml#/components/schemas/receiver | ||
sendAmount: | ||
description: All amounts are maxima, i.e. multiple payments can be created under a grant as long as the total amounts of these payments do not exceed the maximum amount per interval as specified in the grant. |
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.
description: All amounts are maxima, i.e. multiple payments can be created under a grant as long as the total amounts of these payments do not exceed the maximum amount per interval as specified in the grant. |
openapi/resource-server.yaml
Outdated
receiver: | ||
$ref: ./schemas.yaml#/components/schemas/receiver | ||
receiveAmount: | ||
description: The maximum amount that should be paid into the receiving payment pointer. |
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.
description: The maximum amount that should be paid into the receiving payment pointer. | |
description: The fixed amount that would be paid into the receiving payment pointer. |
with maybe some caveat about assuming a successful subsequent outgoing payment.
openapi/resource-server.yaml
Outdated
receiver: | ||
$ref: ./schemas.yaml#/components/schemas/receiver | ||
sendAmount: | ||
description: The maximum amount that should be sent from the sending payment pointer. |
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.
description: The maximum amount that should be sent from the sending payment pointer. | |
description: The fixed amount that would be sent from the sending payment pointer. |
Changes proposed in this pull request
During quote creation, we should either expect
a) just the
receiver
b)
receiver
&receiveAmount
c)
receiver
&sendAmount
I wanted to enforce this at the API level, as currently,
receiver
is a required property, butreceiveAmount
andsendAmount
are just optional properties.After some fiddling around, I found the best way to enforce this was providing 3 possible
oneOf
schemas for the quote creation request body.https://open-payments-integration.readme.io/reference/create-quote
Context
Fixes #224