-
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
Merged
Merged
Changes from 16 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
29e14ad
test: attempt to make POST quote amounts oneOf
mkurapov 8576164
feat: another oneOf attempt
mkurapov b1a5ea6
feat: proper format
mkurapov bf0c725
remove properties from oneOf
mkurapov 65d3c30
attempting nested property
mkurapov c900f35
convert oneOf to array
mkurapov 11b3690
move oneOf outside of properties
mkurapov 35ea6d7
remove extraneous property
mkurapov f1f960f
move receiver into oneOf
mkurapov 5f3b19e
oneOf schema instead
mkurapov 37aa427
named schema
mkurapov bb47ef0
no labelled schema
mkurapov eb401e6
Single receiver possibility
mkurapov 0309165
simplify by using oneOf required
mkurapov 8f704ed
Revert "simplify by using oneOf required"
mkurapov 5515c24
Update descriptions
mkurapov 8b74a0c
update send and receiveAmount descriptions for quote creation
mkurapov a1f363d
more description updates
mkurapov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -576,17 +576,37 @@ paths: | |||
assetCode: USD | ||||
assetScale: 2 | ||||
schema: | ||||
type: object | ||||
additionalProperties: false | ||||
properties: | ||||
receiver: | ||||
$ref: ./schemas.yaml#/components/schemas/receiver | ||||
receiveAmount: | ||||
$ref: ./schemas.yaml#/components/schemas/amount | ||||
sendAmount: | ||||
$ref: ./schemas.yaml#/components/schemas/amount | ||||
required: | ||||
- receiver | ||||
oneOf: | ||||
- description: Create quote for an `receiver` that is an Incoming Payment with an `incomingAmount` | ||||
properties: | ||||
receiver: | ||||
$ref: ./schemas.yaml#/components/schemas/receiver | ||||
required: | ||||
- receiver | ||||
additionalProperties: false | ||||
- description: Create a quote with a fixed receive amount | ||||
properties: | ||||
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. | ||||
$ref: ./schemas.yaml#/components/schemas/amount | ||||
required: | ||||
- receiver | ||||
- receiveAmount | ||||
additionalProperties: false | ||||
- description: Create a quote with a fixed send amount | ||||
properties: | ||||
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 commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
$ref: ./schemas.yaml#/components/schemas/amount | ||||
required: | ||||
- receiver | ||||
- sendAmount | ||||
additionalProperties: false | ||||
|
||||
description: |- | ||||
A subset of the quotes schema is accepted as input to create a new quote. | ||||
|
||||
|
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.
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
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
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!