-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
spec: move non-shared schemas into respective specs (#243)
* feat: publish docs when pushing to integration branch * spec: move non-shared schemas into respective specs * fix: polymorphism issues * fix: limits are object * fix(spec): remove unused schemas --------- Co-authored-by: Max Kurapov <[email protected]>
- Loading branch information
1 parent
4808504
commit 7c89410
Showing
2 changed files
with
166 additions
and
176 deletions.
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
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 |
---|---|---|
|
@@ -11,101 +11,6 @@ info: | |
email: [email protected] | ||
components: | ||
schemas: | ||
access: | ||
type: array | ||
description: A description of the rights associated with this access token. | ||
items: | ||
$ref: '#/components/schemas/access-item' | ||
uniqueItems: true | ||
maxItems: 3 | ||
access-item: | ||
discriminator: | ||
propertyName: type | ||
oneOf: | ||
- $ref: '#/components/schemas/access-incoming' | ||
- $ref: '#/components/schemas/access-outgoing' | ||
- $ref: '#/components/schemas/access-quote' | ||
description: The access associated with the access token is described using objects that each contain multiple dimensions of access. | ||
unevaluatedProperties: false | ||
access-incoming: | ||
title: access-incoming | ||
type: object | ||
properties: | ||
type: | ||
type: string | ||
const: 'incoming-payment' | ||
description: The type of resource request as a string. This field defines which other fields are allowed in the request object. | ||
actions: | ||
type: array | ||
description: The types of actions the client instance will take at the RS as an array of strings. | ||
items: | ||
type: string | ||
enum: | ||
- create | ||
- complete | ||
- read | ||
- read-all | ||
- list | ||
- list-all | ||
uniqueItems: true | ||
identifier: | ||
type: string | ||
format: uri | ||
description: A string identifier indicating a specific resource at the RS. | ||
required: | ||
- type | ||
- actions | ||
access-outgoing: | ||
title: access-outgoing | ||
type: object | ||
properties: | ||
type: | ||
type: string | ||
const: 'outgoing-payment' | ||
description: The type of resource request as a string. This field defines which other fields are allowed in the request object. | ||
actions: | ||
type: array | ||
description: The types of actions the client instance will take at the RS as an array of strings. | ||
items: | ||
type: string | ||
enum: | ||
- create | ||
- read | ||
- read-all | ||
- list | ||
- list-all | ||
uniqueItems: true | ||
identifier: | ||
type: string | ||
format: uri | ||
description: A string identifier indicating a specific resource at the RS. | ||
limits: | ||
$ref: '#/components/schemas/limits-outgoing' | ||
required: | ||
- type | ||
- actions | ||
- identifier | ||
access-quote: | ||
title: access-quote | ||
type: object | ||
properties: | ||
type: | ||
type: string | ||
const: 'quote' | ||
description: The type of resource request as a string. This field defines which other fields are allowed in the request object. | ||
actions: | ||
type: array | ||
description: The types of actions the client instance will take at the RS as an array of strings. | ||
items: | ||
type: string | ||
enum: | ||
- create | ||
- read | ||
- read-all | ||
uniqueItems: true | ||
required: | ||
- type | ||
- actions | ||
amount: | ||
title: amount | ||
type: object | ||
|
@@ -133,43 +38,6 @@ components: | |
minimum: 0 | ||
maximum: 255 | ||
description: The scale of amounts denoted in the corresponding asset code. | ||
interval: | ||
title: Interval | ||
type: string | ||
description: '[ISO8601 repeating interval](https://en.wikipedia.org/wiki/ISO_8601#Repeating_intervals)' | ||
examples: | ||
- 'R11/2022-08-24T14:15:22Z/P1M' | ||
- 'R/2017-03-01T13:00:00Z/2018-05-11T15:30:00Z' | ||
- 'R-1/P1Y2M10DT2H30M/2022-05-11T15:30:00Z' | ||
limits-outgoing: | ||
title: limits-outgoing | ||
description: Open Payments specific property that defines the limits under which outgoing payments can be created. | ||
type: [object, "null"] | ||
properties: | ||
receiver: | ||
$ref: '#/components/schemas/receiver' | ||
sendAmount: | ||
$ref: '#/components/schemas/amount' | ||
receiveAmount: | ||
$ref: '#/components/schemas/amount' | ||
interval: | ||
$ref: '#/components/schemas/interval' | ||
anyOf: | ||
- not: | ||
required: | ||
- interval | ||
- required: | ||
- sendAmount | ||
- required: | ||
- receiveAmount | ||
list-actions: | ||
enum: | ||
- list | ||
- list-all | ||
read-actions: | ||
enum: | ||
- read | ||
- read-all | ||
receiver: | ||
title: Receiver | ||
type: string | ||
|