From 285892d712c15c7466151cd884055576c340617c Mon Sep 17 00:00:00 2001 From: jellymlg Date: Tue, 19 Sep 2023 08:22:24 +0200 Subject: [PATCH] Fixed IndexedErgoBox API schema --- src/main/resources/api/openapi.yaml | 90 ++++++++++++----------------- 1 file changed, 36 insertions(+), 54 deletions(-) diff --git a/src/main/resources/api/openapi.yaml b/src/main/resources/api/openapi.yaml index 563abdb14e..0a05fdbea0 100644 --- a/src/main/resources/api/openapi.yaml +++ b/src/main/resources/api/openapi.yaml @@ -243,60 +243,42 @@ components: description: Name of the token, if any IndexedErgoBox: - type: object - description: Box indexed with extra information - required: - - box - - confirmationsNum - - address - - creationTransaction - - spendingTransaction - - spendingHeight - - inclusionHeight - - spent - - globalIndex - properties: - box: - $ref: '#/components/schemas/ErgoTransactionOutput' - confirmationsNum: - description: Number of confirmations, if the box is included into the blockchain - type: integer - format: int32 - minimum: 0 - example: 147 - nullable: true - address: - $ref: '#/components/schemas/ErgoAddress' - creationTransaction: - description: Transaction which created the box - $ref: '#/components/schemas/ModifierId' - spendingTransaction: - description: Transaction which created the box - nullable: true - $ref: '#/components/schemas/ModifierId' - spendingHeight: - description: The height the box was spent at - type: integer - format: int32 - minimum: 0 - example: 147 - nullable: true - inclusionHeight: - description: The height the transaction containing the box was included in a block at - type: integer - format: int32 - minimum: 0 - example: 147 - spent: - description: A flag signalling whether the box was spent - type: boolean - example: false - globalIndex: - description: Global index of the output in the blockchain - type: integer - format: int64 - minimum: 0 - example: 83927 + allOf: + - $ref: '#/components/schemas/ErgoTransactionOutput' + - type: object + description: Box indexed with extra information + required: + - address + - spentTransactionId + - spendingHeight + - inclusionHeight + - globalIndex + properties: + address: + $ref: '#/components/schemas/ErgoAddress' + spentTransactionId: + description: Transaction which spent the box + nullable: true + $ref: '#/components/schemas/ModifierId' + spendingHeight: + description: The height the box was spent at + type: integer + format: int32 + minimum: 0 + example: 147 + nullable: true + inclusionHeight: + description: The height the transaction containing the box was included in a block at + type: integer + format: int32 + minimum: 0 + example: 147 + globalIndex: + description: Global index of the output in the blockchain + type: integer + format: int64 + minimum: 0 + example: 83927 IndexedToken: type: object