From 181575da112fe6556e48a5b7e0ad4a2154e95da0 Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Mon, 6 Feb 2023 10:48:21 +1100 Subject: [PATCH] Remove array from attestation rewards response (#297) --- apis/beacon/rewards/attestations.yaml | 2 -- types/rewards.yaml | 22 +++++++++++----------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/apis/beacon/rewards/attestations.yaml b/apis/beacon/rewards/attestations.yaml index 8bfdd1b7..5644c8d7 100644 --- a/apis/beacon/rewards/attestations.yaml +++ b/apis/beacon/rewards/attestations.yaml @@ -38,9 +38,7 @@ post: finalized: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Finalized" data: - type: array $ref: "../../../beacon-node-oapi.yaml#/components/schemas/AttestationsRewards" - "400": description: "Invalid get attestations rewards request" content: diff --git a/types/rewards.yaml b/types/rewards.yaml index c091d75a..c07ee90c 100644 --- a/types/rewards.yaml +++ b/types/rewards.yaml @@ -18,18 +18,18 @@ SyncCommitteeRewards: - description: "sync committee reward in gwei for the validator" AttestationsRewards: + type: object description: "Rewards info for attestations" - type: array - items: - properties: - ideal_rewards: - type: array - items: - $ref: ./rewards.yaml#/IdealAttestationRewards - total_rewards: - type: array - items: - $ref: ./rewards.yaml#/AttestationRewards + required: ["ideal_rewards", "total_rewards"] + properties: + ideal_rewards: + type: array + items: + $ref: ./rewards.yaml#/IdealAttestationRewards + total_rewards: + type: array + items: + $ref: ./rewards.yaml#/AttestationRewards AttestationRewards: type: object