Skip to content

Commit

Permalink
add swagger - part1
Browse files Browse the repository at this point in the history
add swagger - part1 clean
  • Loading branch information
paweljakubas committed Nov 30, 2021
1 parent 92ec075 commit 2e4f3ee
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions specifications/api/swagger.yaml
Expand Up @@ -1174,7 +1174,7 @@ x-rewardAccountPath: &rewardAccountPath

x-certificate: &certificate
description: |
A delegation certificate
A delegation certificate belonging to wallet
Only for 'join_pool' the 'pool' property is required.
type: object
Expand All @@ -1190,6 +1190,24 @@ x-certificate: &certificate
reward_account_path:
<<: *rewardAccountPath

x-certificateNotOurs: &certificateNotOurs
description: |
A delegation certificate not belonging to wallet
Only for 'join_pool' the 'pool' property is required.
type: object
required:
- certificate_type
- reward_account
properties:
certificate_type:
type: string
enum: ["join_pool", "quit_pool", "register_reward_account"]
pool:
<<: *stakePoolId
reward_account:
<<: *anyAddress

x-transactionRedemptionRequest: &transactionRedemptionRequest
<<: *walletMnemonicSentence
description: |
Expand Down Expand Up @@ -2269,7 +2287,6 @@ components:
retirement: *stakePoolRetirement
flags: *stakePoolFlags


ApiFee: &ApiFee
type: object
required:
Expand Down Expand Up @@ -2419,6 +2436,16 @@ components:
minItems: 0
items: *assetMintedBurned

ApiCertificate: &ApiCertificate
description: |
Any certificate that could occur in an arbitrary transaction:
might be related to delegation, pool activities, genesis or MIR.
oneOf:
- <<: *certificate
title: delegation certificate belonging to the wallet
- <<: *certificateNotOurs
title: delegation certificate not belonging to the wallet

ApiDecodedTransaction: &ApiDecodedTransaction
type: object
required:
Expand All @@ -2429,6 +2456,7 @@ components:
- withdrawals
- assets_minted
- assets_burned
- certificates
properties:
id: *transactionId
fee: *amount
Expand All @@ -2438,6 +2466,9 @@ components:
withdrawals: *ApiWithdrawalsGeneral
assets_minted: *ApiMintedAssets
assets_burned: *ApiBurnedAssets
certificates:
type: array
items: *ApiCertificate
metadata: *transactionMetadata
script_validity: *txScriptValidity

Expand Down

0 comments on commit 2e4f3ee

Please sign in to comment.