From fa960c613fcf98c220ed3196825348440e6dace4 Mon Sep 17 00:00:00 2001 From: Gui Iribarren Date: Fri, 9 Aug 2024 12:25:50 +0200 Subject: [PATCH] api: all endpoints */count are now marked as deprecated on swagger docs --- api/accounts.go | 6 ++++++ api/chain.go | 4 ++++ api/elections.go | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/api/accounts.go b/api/accounts.go index 5e82e6741..b75b08643 100644 --- a/api/accounts.go +++ b/api/accounts.go @@ -326,6 +326,8 @@ func (a *API) accountSetHandler(msg *apirest.APIdata, ctx *httprouter.HTTPContex // // @Summary Total number of accounts // @Description Returns the count of total number of existing accounts +// @Deprecated +// @Description (deprecated, in favor of /accounts which reports totalItems) // @Tags Accounts // @Accept json // @Produce json @@ -414,6 +416,8 @@ func (a *API) accountElectionsListByStatusAndPageHandler(_ *apirest.APIdata, ctx // // @Summary Count organization elections // @Description Returns the number of elections for an organization +// @Deprecated +// @Description (deprecated, in favor of /elections?organizationId=xxx which reports totalItems) // @Tags Accounts // @Accept json // @Produce json @@ -504,6 +508,8 @@ func (a *API) tokenFeesHandler(_ *apirest.APIdata, ctx *httprouter.HTTPContext) // // @Summary Total number of sent and received transactions // @Description Returns the count of total number of sent and received transactions for an account. A transaction is a token transfer from one account to another existing account +// @Deprecated +// @Description (deprecated, in favor of /chain/transfers?accountId=xxx which reports totalItems) // @Tags Accounts // @Accept json // @Produce json diff --git a/api/chain.go b/api/chain.go index cc6cb630a..e2fbdc17a 100644 --- a/api/chain.go +++ b/api/chain.go @@ -364,6 +364,8 @@ func (a *API) sendOrganizationList(ctx *httprouter.HTTPContext, params *Organiza // // @Summary Count organizations // @Description Return the number of organizations +// @Deprecated +// @Description (deprecated, in favor of /chain/organizations which reports totalItems) // @Tags Chain // @Accept json // @Produce json @@ -928,6 +930,8 @@ func (a *API) chainBlockByHashHandler(_ *apirest.APIdata, ctx *httprouter.HTTPCo // // @Summary Transactions count // @Description Returns the number of transactions +// @Deprecated +// @Description (deprecated, in favor of /chain/transactions which reports totalItems) // @Tags Chain // @Accept json // @Produce json diff --git a/api/elections.go b/api/elections.go index 136421cdc..59da95f68 100644 --- a/api/elections.go +++ b/api/elections.go @@ -148,7 +148,7 @@ func (a *API) enableElectionHandlers() error { // @Accept json // @Produce json // @Param page path number true "Page" -// @Param body body ElectionParams true "Filtered by partial organizationId, partial electionId, election status and with results available or not" +// @Param body body ElectionParams true "Filtered by exact organizationId, partial electionId, election status, results available or not, etc" // @Success 200 {object} ElectionsList // @Router /elections/filter/page/{page} [post] func (a *API) electionListByFilterAndPageHandler(msg *apirest.APIdata, ctx *httprouter.HTTPContext) error {