From b0a8b2d719ac859dd8b9240e4971c7817f1e325c Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Thu, 26 Mar 2026 17:50:33 +0100 Subject: [PATCH] fix: missing pagination params in proposals/*/withdrawals --- CHANGELOG.md | 6 ++++ .../{gov_action_id}/withdrawals.yaml | 28 +++++++++++++++++++ .../{tx_hash}/{cert_index}/withdrawals.yaml | 28 +++++++++++++++++++ 3 files changed, 62 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c62b9b06..e754ca06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,12 @@ Unreleased changes are in the `master` branch. ## [Unreleased] +### Fixed + +- Pagination parameters (`count`, `page`, `order`) for governance proposal withdrawals endpoints + - `/governance/proposals/:tx_hash/:cert_index/withdrawals` + - `/governance/proposals/:gov_action_id/withdrawals` + ## [0.1.86] - 2026-03-02 ### Added diff --git a/src/paths/api/governance/proposals/{gov_action_id}/withdrawals.yaml b/src/paths/api/governance/proposals/{gov_action_id}/withdrawals.yaml index 2648de60..4a714ebd 100644 --- a/src/paths/api/governance/proposals/{gov_action_id}/withdrawals.yaml +++ b/src/paths/api/governance/proposals/{gov_action_id}/withdrawals.yaml @@ -11,6 +11,34 @@ get: type: string description: Governance Action Identifier (CIP-0129) example: "gov_action1zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zygsq6dmejn" + - in: query + name: count + required: false + schema: + type: integer + minimum: 1 + maximum: 100 + default: 100 + description: The number of results displayed on one page. + - in: query + name: page + required: false + schema: + type: integer + minimum: 1 + maximum: 21474836 + default: 1 + description: The page number for listing the results. + - in: query + name: order + required: false + schema: + type: string + enum: [asc, desc] + default: asc + description: | + The ordering of items from the point of view of the blockchain, + not the page listing itself. By default, we return oldest first, newest last. responses: "200": description: Return the proposal withdrawals content diff --git a/src/paths/api/governance/proposals/{tx_hash}/{cert_index}/withdrawals.yaml b/src/paths/api/governance/proposals/{tx_hash}/{cert_index}/withdrawals.yaml index a94b1ba2..b54e2a9c 100644 --- a/src/paths/api/governance/proposals/{tx_hash}/{cert_index}/withdrawals.yaml +++ b/src/paths/api/governance/proposals/{tx_hash}/{cert_index}/withdrawals.yaml @@ -18,6 +18,34 @@ get: type: integer description: Index of the certificate within the proposal transaction. example: 1 + - in: query + name: count + required: false + schema: + type: integer + minimum: 1 + maximum: 100 + default: 100 + description: The number of results displayed on one page. + - in: query + name: page + required: false + schema: + type: integer + minimum: 1 + maximum: 21474836 + default: 1 + description: The page number for listing the results. + - in: query + name: order + required: false + schema: + type: string + enum: [asc, desc] + default: asc + description: | + The ordering of items from the point of view of the blockchain, + not the page listing itself. By default, we return oldest first, newest last. responses: "200": description: Return the proposal withdrawals content