Skip to content

Commit

Permalink
chore: update shared schema spec for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
mkurapov committed Oct 21, 2022
1 parent f365dbe commit eb75f71
Show file tree
Hide file tree
Showing 5 changed files with 294 additions and 280 deletions.
2 changes: 1 addition & 1 deletion openapi/AS/IdP/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ paths:
type: object
properties:
access:
$ref: ../../shared/schemas.yaml#/access
$ref: ../../shared/schemas.yaml#/components/schemas/access
'404':
description: Not Found
operationId: get-grant
Expand Down
8 changes: 4 additions & 4 deletions openapi/AS/RS/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ paths:
grant:
type: string
access:
$ref: ../../shared/schemas.yaml#/access
$ref: ../../shared/schemas.yaml#/components/schemas/access
key:
$ref: ../../shared/schemas.yaml#/key
$ref: ../../shared/schemas.yaml#/components/schemas/key
client_id:
type: string
description: Opaque client identifier.
Expand Down Expand Up @@ -86,11 +86,11 @@ paths:
description: The proofing method used by the client instance to bind the token to the RS request.
resource_server:
oneOf:
- $ref: ../../shared/schemas.yaml#/key
- $ref: ../../shared/schemas.yaml#/components/schemas/key
- type: string
description: 'The identification used to authenticate the resource server making this call, either by value or by reference.'
access:
$ref: ../../shared/schemas.yaml#/access
$ref: ../../shared/schemas.yaml#/components/schemas/access
required:
- access_token
- resource_server
Expand Down
6 changes: 3 additions & 3 deletions openapi/AS/client/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ paths:
- access
properties:
access:
$ref: ../../shared/schemas.yaml#/access
$ref: ../../shared/schemas.yaml#/components/schemas/access
client:
$ref: '#/components/schemas/client'
interact:
Expand Down Expand Up @@ -337,7 +337,7 @@ components:
description: An identifier string that the AS can use to identify the client software comprising this client instance.
key:
oneOf:
- $ref: ../../shared/schemas.yaml#/key
- $ref: ../../shared/schemas.yaml#/components/schemas/key
- type: string
description: The public key of the client instance to be used in this request or a reference to a key.
interact-request:
Expand Down Expand Up @@ -427,7 +427,7 @@ components:
type: integer
description: The number of seconds in which the access will expire. The client instance MUST NOT use the access token past this time. An RS MUST NOT accept an access token past this time.
access:
$ref: ../../shared/schemas.yaml#/access
$ref: ../../shared/schemas.yaml#/components/schemas/access
required:
- value
- manage
Expand Down
35 changes: 18 additions & 17 deletions openapi/RS/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ paths:
properties:
incomingAmount:
description: The maximum amount that should be paid into the payment pointer under this incoming payment.
$ref: ../shared/schemas.yaml#/amount
$ref: ../shared/schemas.yaml#/components/schemas/amount
expiresAt:
type: string
description: The date and time when payments into the incoming payment must no longer be accepted.
Expand Down Expand Up @@ -588,11 +588,12 @@ paths:
additionalProperties: false
properties:
receiver:
$ref: ../shared/schemas.yaml#/receiver
in: path
$ref: ../shared/schemas.yaml#/components/schemas/receiver
receiveAmount:
$ref: ../shared/schemas.yaml#/amount
$ref: ../shared/schemas.yaml#/components/schemas/amount
sendAmount:
$ref: ../shared/schemas.yaml#/amount
$ref: ../shared/schemas.yaml#/components/schemas/amount
required:
- receiver
description: |-
Expand Down Expand Up @@ -816,9 +817,9 @@ components:
description: A public name for the account. This should be set by the account holder with their provider to provide a hint to counterparties as to the identity of the account holder.
readOnly: true
assetCode:
$ref: ../shared/schemas.yaml#/assetCode
$ref: ../shared/schemas.yaml#/components/schemas/assetCode
assetScale:
$ref: ../shared/schemas.yaml#/assetScale
$ref: ../shared/schemas.yaml#/components/schemas/assetScale
authServer:
type: string
format: uri
Expand Down Expand Up @@ -876,9 +877,9 @@ components:
description: The base64 url-encoded shared secret to use when establishing a STREAM connection.
readOnly: true
assetCode:
$ref: ../shared/schemas.yaml#/assetCode
$ref: ../shared/schemas.yaml#/components/schemas/assetCode
assetScale:
$ref: ../shared/schemas.yaml#/assetScale
$ref: ../shared/schemas.yaml#/components/schemas/assetScale
required:
- id
- ilpAddress
Expand Down Expand Up @@ -936,10 +937,10 @@ components:
default: false
incomingAmount:
description: The maximum amount that should be paid into the payment pointer under this incoming payment.
$ref: ../shared/schemas.yaml#/amount
$ref: ../shared/schemas.yaml#/components/schemas/amount
receivedAmount:
description: The total amount that has been paid into the payment pointer under this incoming payment.
$ref: ../shared/schemas.yaml#/amount
$ref: ../shared/schemas.yaml#/components/schemas/amount
expiresAt:
type: string
description: The date and time when payments under this incoming payment will no longer be accepted.
Expand Down Expand Up @@ -1089,16 +1090,16 @@ components:
default: false
receiver:
description: The URL of the incoming payment or ILP STREAM Connection that is being paid.
$ref: ../shared/schemas.yaml#/receiver
$ref: ../shared/schemas.yaml#/components/schemas/receiver
receiveAmount:
description: The total amount that should be received by the receiver when this outgoing payment has been paid.
$ref: ../shared/schemas.yaml#/amount
$ref: ../shared/schemas.yaml#/components/schemas/amount
sendAmount:
description: The total amount that should be sent when this outgoing payment has been paid.
$ref: ../shared/schemas.yaml#/amount
$ref: ../shared/schemas.yaml#/components/schemas/amount
sentAmount:
description: The total amount that has been sent under this outgoing payment.
$ref: ../shared/schemas.yaml#/amount
$ref: ../shared/schemas.yaml#/components/schemas/amount
description:
type: string
description: Human readable description of the outgoing payment that will be visible to the account holder and shared with the receiver.
Expand Down Expand Up @@ -1167,11 +1168,11 @@ components:
description: The URL of the payment pointer from which this quote's payment would be sent.
readOnly: true
receiver:
$ref: ../shared/schemas.yaml#/receiver
$ref: ../shared/schemas.yaml#/components/schemas/receiver
receiveAmount:
$ref: ../shared/schemas.yaml#/amount
$ref: ../shared/schemas.yaml#/components/schemas/amount
sendAmount:
$ref: ../shared/schemas.yaml#/amount
$ref: ../shared/schemas.yaml#/components/schemas/amount
expiresAt:
type: string
description: The date and time when the calculated `sendAmount` is no longer valid.
Expand Down
Loading

0 comments on commit eb75f71

Please sign in to comment.