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

224/mk/post quote update #230

Merged
merged 18 commits into from
Dec 9, 2022
Merged
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 31 additions & 11 deletions openapi/resource-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Contributor

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

Suggested change
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.

Copy link
Contributor Author

@mkurapov mkurapov Dec 9, 2022

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?

Copy link
Contributor

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

sendAmount:
$ref: '#/components/schemas/amount'
receiveAmount:
$ref: '#/components/schemas/amount'

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

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!

$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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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
- sendAmount
additionalProperties: false

description: |-
A subset of the quotes schema is accepted as input to create a new quote.

Expand Down