Skip to content

Commit

Permalink
Merge branch 'mk/219/methods' into integration
Browse files Browse the repository at this point in the history
# Conflicts:
#	openapi/resource-server.yaml
  • Loading branch information
mkurapov committed Sep 22, 2023
2 parents 55f42fe + b76c1dc commit 149025e
Showing 1 changed file with 71 additions and 2 deletions.
73 changes: 71 additions & 2 deletions openapi/resource-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/incoming-payment'
$ref: '#/components/schemas/incoming-payment-with-methods'
examples:
New Incoming Payment for $25:
value:

Check failure on line 113 in openapi/resource-server.yaml

View workflow job for this annotation

GitHub Actions / validate

oas3-valid-media-example Property "methods" is not expected to be here
Expand All @@ -125,6 +125,10 @@ paths:
expiresAt: '2022-02-03T23:20:50.52Z'
metadata:
externalRef: INV2022-02-0137
methods:
- type: 'ilp'
ilpAddress: 'g.ilp.iwuyge987y.98y08y'
sharedSecret: '1c7eaXa4rd2fFOBl1iydvCT1tV5TbM3RW1WLCafu_JA'
createdAt: '2022-03-12T23:20:50.52Z'
updatedAt: '2022-04-01T10:24:36.11Z'
'401':
Expand Down Expand Up @@ -597,7 +601,7 @@ paths:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/incoming-payment'
- $ref: '#/components/schemas/incoming-payment-with-methods'
- $ref: '#/components/schemas/public-incoming-payment'
examples:
Incoming Payment for $25 with $12.34 received so far:
Expand All @@ -619,6 +623,10 @@ paths:
metadata:
description: Thanks for the flowers!
externalRef: INV-12876
methods:
- type: 'ilp'
ilpAddress: g.ilp.iwuyge987y.98y08y
sharedSecret: 1c7eaXa4rd2fFOBl1iydvCT1tV5TbM3RW1WLCafu_JA
'401':
$ref: '#/components/responses/401'
'403':
Expand Down Expand Up @@ -907,6 +915,40 @@ components:
- receivedAmount
- createdAt
- updatedAt
incoming-payment-with-methods:
title: Incoming Payment with Payment Methods
description: An **incoming payment** resource with the list of methods to use to pay into the wallet address under this incoming payment.
type: object
examples:
- id: 'https://openpayments.guide/alice/incoming-payments/016da9d5-c9a4-4c80-a354-86b915a04ff8'
walletAddress: 'https://openpayments.guide/alice/'
incomingAmount:
value: '250'
assetCode: USD
assetScale: 2
receivedAmount:
value: '250'
assetCode: USD
assetScale: 2
completed: true
expiresAt: '2022-04-12T23:20:50.52Z'
createdAt: '2022-03-12T23:20:50.52Z'
updatedAt: '2022-04-01T10:24:36.11Z'
metadata:
description: 'Hi Mo, this is for the cappuccino I bought for you the other day.'
externalRef: Coffee w/ Mo on 10 March 22
methods:
- type: 'ilp'
ilpAddress: g.ilp.iwuyge987y.98y08y
sharedSecret: 1c7eaXa4rd2fFOBl1iydvCT1tV5TbM3RW1WLCafu_JA
allOf:
- $ref: '#/components/schemas/incoming-payment'
- type: object
properties:
methods:
$ref: '#/components/schemas/payment-methods'
description: The payment methods this incoming payment supports payment into.
unevaluatedProperties: false
public-incoming-payment:
title: Public Incoming Payment
description: An **incoming payment** resource with public details.
Expand Down Expand Up @@ -1159,6 +1201,33 @@ components:
kty: OKP
crv: Ed25519
x: oy0L_vTygNE4IogRyn_F5GmHXdqYVjIXkWs2jky7zsI
payment-methods:
type: array
items:
anyOf:
- $ref: '#/components/schemas/ilp-payment-method'
ilp-payment-method:
type: object
properties:
type:
enum:
- 'ilp'
type: string
description: The ILP payment method type
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
additionalProperties: false

securitySchemes:
GNAP:
name: Authorization
Expand Down

0 comments on commit 149025e

Please sign in to comment.