Skip to content

Commit

Permalink
feat: use nullable limits and openapi-compliant uniqueness for access…
Browse files Browse the repository at this point in the history
… schema (#208)
  • Loading branch information
njlie authored Nov 3, 2022
1 parent 1e3e118 commit 62c4b4a
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions openapi/schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,8 @@ components:
description: A description of the rights associated with this access token.
items:
$ref: '#/components/schemas/access-item'
allOf:
- contains:
properties:
type:
const: incoming-payment
minContains: 0
maxContains: 1
- contains:
properties:
type:
const: outgoing-payment
minContains: 0
maxContains: 1
- contains:
properties:
type:
const: quote
minContains: 0
maxContains: 1
uniqueItems: true
maxItems: 3
access-item:
discriminator:
propertyName: type
Expand Down Expand Up @@ -258,7 +241,7 @@ components:
limits-outgoing:
title: limits-outgoing
description: Open Payments specific property that defines the limits under which outgoing payments can be created.
type: object
type: [object, "null"]
properties:
receiver:
$ref: '#/components/schemas/receiver'
Expand Down

0 comments on commit 62c4b4a

Please sign in to comment.