Skip to content

Commit

Permalink
Merge branch 'mk/219/methods' into integration
Browse files Browse the repository at this point in the history
  • Loading branch information
mkurapov committed Sep 17, 2023
2 parents 69398bc + f6fe572 commit 7f00e7b
Showing 1 changed file with 24 additions and 128 deletions.
152 changes: 24 additions & 128 deletions openapi/resource-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,42 +103,6 @@ paths:
operationId: get-payment-pointer-keys
description: Retrieve the public keys of the Payment Pointer.
security: []
'/connections/{id}':
servers:
- url: 'https://openpayments.guide'
get:
summary: Get ILP STREAM credentials for a connection
tags:
- stream-connection
responses:
'200':
description: Connection Found
content:
application/json:
schema:
$ref: '#/components/schemas/ilp-stream-connection'
examples:
Get connection:
value:
id: 'https://openpayments.guide/connections/016da9d5-c9a4-4c80-a354-86b915a04ff8'
ilpAddress: g.ilp.iwuyge987y.98y0f34tsrt8y
sharedSecret: 1c7eaXa4rd2fFOBl1iydvCT1tV5TbM3RW1WLCafu_JA
assetCode: USD
assetScale: 2
'404':
description: Connection Not Found
operationId: get-ilp-stream-connection
description: |-
*NB* Use server url specific to this path.
Fetch new connection credentials for an ILP STREAM connection.
A connection is an ephemeral resource that is created to accommodate new incoming payments.
A new set of credential will be generated each time this API is called.
security: []
parameters:
- $ref: '#/components/parameters/id'
/incoming-payments:
post:
summary: Create an Incoming Payment
Expand All @@ -151,7 +115,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/incoming-payment-with-connection'
$ref: '#/components/schemas/incoming-payment-with-methods'
examples:
New Incoming Payment for $25:
value:
Expand All @@ -169,11 +133,11 @@ paths:
expiresAt: '2022-02-03T23:20:50.52Z'
metadata:
externalRef: INV2022-02-0137
ilpStreamConnection:
id: 'https://openpayments.guide/connections/ff394f02-7b7b-45e2-b645-51d04e7c345c'
ilpAddress: g.ilp.iwuyge987y.98y08y
sharedSecret: 1c7eaXa4rd2fFOBl1iydvCT1tV5TbM3RW1WLCafu_JA
assetCode: USD
methods:
ilp:
id: 'https://openpayments.guide/connections/ff394f02-7b7b-45e2-b645-51d04e7c345c'
ilpAddress: g.ilp.iwuyge987y.98y08y
sharedSecret: 1c7eaXa4rd2fFOBl1iydvCT1tV5TbM3RW1WLCafu_JA
assetScale: 2
createdAt: '2022-03-12T23:20:50.52Z'
updatedAt: '2022-04-01T10:24:36.11Z'
Expand Down Expand Up @@ -244,7 +208,7 @@ paths:
result:
type: array
items:
$ref: '#/components/schemas/incoming-payment-with-connection-url'
$ref: '#/components/schemas/incoming-payment'
examples:
forward pagination:
value:
Expand All @@ -264,7 +228,6 @@ paths:
value: '250'
assetCode: USD
assetScale: 2
ilpStreamConnection: 'https://openpayments.guide/connections/376df9d5-c9a4-4c80-a354-86b915a04ff8'
expiresAt: '2022-04-12T23:20:50.52Z'
createdAt: '2022-03-12T23:20:50.52Z'
updatedAt: '2022-04-01T10:24:36.11Z'
Expand All @@ -278,7 +241,6 @@ paths:
value: '100'
assetCode: USD
assetScale: 2
ilpStreamConnection: 'https://openpayments.guide/connections/1f6df9d5-c9a4-4c80-a354-86b915a04ff8'
expiresAt: '2022-04-12T23:20:50.52Z'
createdAt: '2022-03-12T23:20:50.52Z'
updatedAt: '2022-04-01T10:24:36.11Z'
Expand All @@ -300,7 +262,6 @@ paths:
assetCode: USD
assetScale: 2
completed: true
ilpStreamConnection: 'https://openpayments.guide/connections/1f6df9d5-c9a4-4c80-a354-86b915a04ff8'
expiresAt: '2022-04-12T23:20:50.52Z'
createdAt: '2022-03-12T23:20:50.52Z'
updatedAt: '2022-04-01T10:24:36.11Z'
Expand All @@ -317,7 +278,6 @@ paths:
assetCode: USD
assetScale: 2
completed: true
ilpStreamConnection: 'https://openpayments.guide/connections/376df9d5-c9a4-4c80-a354-86b915a04ff8'
expiresAt: '2022-04-12T23:20:50.52Z'
createdAt: '2022-03-12T23:20:50.52Z'
updatedAt: '2022-04-01T10:24:36.11Z'
Expand Down Expand Up @@ -650,7 +610,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/incoming-payment-with-connection'
$ref: '#/components/schemas/incoming-payment-with-methods'
examples:
Incoming Payment for $25 with $12.34 received so far:
value:
Expand All @@ -671,12 +631,11 @@ paths:
metadata:
description: Thanks for the flowers!
externalRef: INV-12876
ilpStreamConnection:
id: 'https://openpayments.guide/connections/4a1b0150-db73-49e8-8713-628baa4a17ff'
ilpAddress: g.ilp.iwuyge987y.98y08y
sharedSecret: 1c7eaXa4rd2fFOBl1iydvCT1tV5TbM3RW1WLCafu_JA
assetCode: USD
assetScale: 2
methods:
ilp:
id: 'https://openpayments.guide/connections/4a1b0150-db73-49e8-8713-628baa4a17ff'
ilpAddress: g.ilp.iwuyge987y.98y08y
sharedSecret: 1c7eaXa4rd2fFOBl1iydvCT1tV5TbM3RW1WLCafu_JA
'401':
$ref: '#/components/responses/401'
'403':
Expand Down Expand Up @@ -886,42 +845,6 @@ components:
kty: OKP
crv: Ed25519
x: 11qYAYKxCrfVS_7TyWQHOg7hcvPapiMlrwIaaPcHURo
ilp-stream-connection:
title: ILP Stream Connection
type: object
description: An **ILP STREAM Connection** is an endpoint that returns unique STREAM connection credentials to establish a STREAM connection to the underlying account.
additionalProperties: false
examples:
- id: 'https://openpayments.guide/connections/016da9d5-c9a4-4c80-a354-86b915a04ff8'
ilpApddress: g.ilp.iwuyge987y.98y08y
sharedSecret: 1c7eaXa4rd2fFOBl1iydvCT1tV5TbM3RW1WLCafu_JA
properties:
id:
type: string
format: uri
description: The URL identifying the endpoint.
readOnly: true
ilpAddress:
type: string
maxLength: 1023
pattern: '^(g|private|example|peer|self|test[1-3]?|local)([.][a-zA-Z0-9_~-]+)+$'
description: The ILP address to use when establishing a STREAM connection.
readOnly: true
sharedSecret:
type: string
pattern: '^[a-zA-Z0-9-_]+$'
description: The base64 url-encoded shared secret to use when establishing a STREAM connection.
readOnly: true
assetCode:
$ref: ./schemas.yaml#/components/schemas/assetCode
assetScale:
$ref: ./schemas.yaml#/components/schemas/assetScale
required:
- id
- ilpAddress
- sharedSecret
- assetCode
- assetScale
incoming-payment:
title: Incoming Payment
description: 'An **incoming payment** resource represents a payment that will be, is currently being, or has been received by the account.'
Expand Down Expand Up @@ -1000,9 +923,9 @@ components:
- receivedAmount
- createdAt
- updatedAt
incoming-payment-with-connection:
title: Incoming Payment with Connection
description: An **incoming payment** resource with the Interledger STREAM Connection to use to pay into the payment pointer under this incoming payment.
incoming-payment-with-methods:
title: Incoming Payment with Methods
description: An **incoming payment** resource with the support methods to use to pay into the payment pointer under this incoming payment.
type: object
examples:
- id: 'https://openpayments.guide/alice/incoming-payments/016da9d5-c9a4-4c80-a354-86b915a04ff8'
Expand All @@ -1022,45 +945,18 @@ components:
metadata:
description: 'Hi Mo, this is for the cappuccino I bought for you the other day.'
externalRef: Coffee w/ Mo on 10 March 22
ilpStreamConnection:
id: 'https://openpayments.guide/connections/032da9d5-c9a4-4c80-a354-86b915a04ff8'
ilpApddress: g.ilp.iwuyge987y.98y08y
sharedSecret: 1c7eaXa4rd2fFOBl1iydvCT1tV5TbM3RW1WLCafu_JA
allOf:
- $ref: '#/components/schemas/incoming-payment'
- type: object
properties:
ilpStreamConnection:
$ref: '#/components/schemas/ilp-stream-connection'
unevaluatedProperties: false
incoming-payment-with-connection-url:
title: Incoming Payment with Connection
description: An **incoming payment** resource with the url for the Interledger STREAM Connection resource to use to pay into the payment pointer under this incoming payment.
type: object
examples:
- id: 'https://openpayments.guide/alice/incoming-payments/456da9d5-c9a4-4c80-a354-86b915a04ff8'
paymentPointer: 'https://openpayments.guide/alice/'
incomingAmount:
value: '2500'
assetCode: USD
assetScale: 2
receivedAmount:
value: '0'
assetCode: USD
assetScale: 2
expiresAt: '2022-04-12T23:20:50.52Z'
createdAt: '2022-03-12T23:20:50.52Z'
updatedAt: '2022-03-12T23:20:50.52Z'
ilpStreamConnection: 'https://openpayments.guide/connections/782da9d5-c9a4-4c80-a354-86b915a04ff8'
methods:
ilp:
id: 'https://openpayments.guide/connections/032da9d5-c9a4-4c80-a354-86b915a04ff8'
ilpAddress: g.ilp.iwuyge987y.98y08y
sharedSecret: 1c7eaXa4rd2fFOBl1iydvCT1tV5TbM3RW1WLCafu_JA
allOf:
- $ref: '#/components/schemas/incoming-payment'
- type: object
properties:
ilpStreamConnection:
type: string
format: uri
description: Endpoint that returns unique STREAM connection credentials to establish a STREAM connection to the underlying account.
readOnly: true
methods:
type: object
minProperties: 1
unevaluatedProperties: false
outgoing-payment:
title: Outgoing Payment
Expand Down

0 comments on commit 7f00e7b

Please sign in to comment.