From 69f5472f223549e7a01eecca2eef38a6b84c2fe9 Mon Sep 17 00:00:00 2001 From: Ragot Geoffrey Date: Thu, 5 Dec 2024 14:41:07 +0100 Subject: [PATCH] chore: update dependencies (#592) (#599) --- docs/api/README.md | 4 --- openapi.yaml | 32 ----------------- openapi/v2.yaml | 32 ----------------- test/e2e/api_accounts_list_test.go | 55 ------------------------------ 4 files changed, 123 deletions(-) diff --git a/docs/api/README.md b/docs/api/README.md index a4ad477c0..0ac42e9d2 100644 --- a/docs/api/README.md +++ b/docs/api/README.md @@ -642,7 +642,6 @@ Accept: application/json |---|---|---|---|---| |ledger|path|string|true|Name of the ledger.| |pit|query|string(date-time)|false|none| -|query|query|string|false|Query string to filter accounts. The query string must be a valid JSON object.| |body|body|object|false|none| > Example responses @@ -708,7 +707,6 @@ List accounts from a ledger, sorted by address in descending order. |cursor|query|string|false|Parameter used in pagination requests. Maximum page size is set to 15.| |expand|query|string|false|none| |pit|query|string(date-time)|false|none| -|query|query|string|false|Query string to filter accounts. The query string must be a valid JSON object.| |body|body|object|false|none| #### Detailed descriptions @@ -1056,7 +1054,6 @@ Accept: application/json |---|---|---|---|---| |ledger|path|string|true|Name of the ledger.| |pit|query|string(date-time)|false|none| -|query|query|string|false|Query string to filter transactions. The query string must be a valid JSON object.| |body|body|object|false|none| > Example responses @@ -1118,7 +1115,6 @@ List transactions from a ledger, sorted by id in descending order. |Name|In|Type|Required|Description| |---|---|---|---|---| |ledger|path|string|true|Name of the ledger.| -|query|query|string|false|Query string to filter transactions. The query string must be a valid JSON object.| |pageSize|query|integer(int64)|false|The maximum number of results to return per page.| |cursor|query|string|false|Parameter used in pagination requests. Maximum page size is set to 15.| |expand|query|string|false|none| diff --git a/openapi.yaml b/openapi.yaml index a441ab8e7..28808975b 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1507,14 +1507,6 @@ paths: schema: type: string format: date-time - - name: query - in: query - description: Query string to filter accounts. The query string must be a valid JSON object. - schema: - type: string - example: - $match: - address: users:001 requestBody: content: application/json: @@ -1586,14 +1578,6 @@ paths: schema: type: string format: date-time - - name: query - in: query - description: Query string to filter accounts. The query string must be a valid JSON object. - schema: - type: string - example: - $match: - address: users:001 requestBody: content: application/json: @@ -1823,14 +1807,6 @@ paths: schema: type: string format: date-time - - name: query - in: query - description: Query string to filter transactions. The query string must be a valid JSON object. - schema: - type: string - example: - $match: - account: users:001 requestBody: content: application/json: @@ -1870,14 +1846,6 @@ paths: schema: type: string example: ledger001 - - name: query - in: query - description: Query string to filter transactions. The query string must be a valid JSON object. - schema: - type: string - example: - $match: - account: users:001 - name: pageSize in: query description: | diff --git a/openapi/v2.yaml b/openapi/v2.yaml index c78ffe775..378675367 100644 --- a/openapi/v2.yaml +++ b/openapi/v2.yaml @@ -345,14 +345,6 @@ paths: schema: type: string format: date-time - - name: query - in: query - description: Query string to filter accounts. The query string must be a valid JSON object. - schema: - type: string - example: - "$match": - "address": "users:001" requestBody: content: application/json: @@ -428,14 +420,6 @@ paths: schema: type: string format: date-time - - name: query - in: query - description: Query string to filter accounts. The query string must be a valid JSON object. - schema: - type: string - example: - "$match": - "address": "users:001" requestBody: content: application/json: @@ -676,14 +660,6 @@ paths: schema: type: string format: date-time - - name: query - in: query - description: Query string to filter transactions. The query string must be a valid JSON object. - schema: - type: string - example: - "$match": - "account": "users:001" requestBody: content: application/json: @@ -723,14 +699,6 @@ paths: schema: type: string example: ledger001 - - name: query - in: query - description: Query string to filter transactions. The query string must be a valid JSON object. - schema: - type: string - example: - "$match": - "account": "users:001" - name: pageSize in: query description: | diff --git a/test/e2e/api_accounts_list_test.go b/test/e2e/api_accounts_list_test.go index 7f11cc0ec..f5ebd2610 100644 --- a/test/e2e/api_accounts_list_test.go +++ b/test/e2e/api_accounts_list_test.go @@ -3,7 +3,6 @@ package test_suite import ( - "encoding/json" "fmt" "github.com/formancehq/go-libs/v2/logging" . "github.com/formancehq/go-libs/v2/testing/api" @@ -210,60 +209,6 @@ var _ = Context("Ledger accounts list API tests", func() { Metadata: metadata1, })) }) - It("should be listed on api using address filters on query param", func() { - - filtersAsJSON, err := json.Marshal(map[string]interface{}{ - "$match": map[string]any{ - "address": "foo:", - }, - }) - Expect(err).To(Succeed()) - - response, err := ListAccounts( - ctx, - testServer.GetValue(), - operations.V2ListAccountsRequest{ - Ledger: "default", - Query: pointer.For(string(filtersAsJSON)), - }, - ) - Expect(err).ToNot(HaveOccurred()) - - accountsCursorResponse := response.Data - Expect(accountsCursorResponse).To(HaveLen(2)) - Expect(accountsCursorResponse[0]).To(Equal(components.V2Account{ - Address: "foo:bar", - Metadata: metadata2, - })) - Expect(accountsCursorResponse[1]).To(Equal(components.V2Account{ - Address: "foo:foo", - Metadata: metadata1, - })) - - filtersAsJSON, err = json.Marshal(map[string]interface{}{ - "$match": map[string]any{ - "address": ":foo", - }, - }) - Expect(err).To(Succeed()) - - response, err = ListAccounts( - ctx, - testServer.GetValue(), - operations.V2ListAccountsRequest{ - Ledger: "default", - Query: pointer.For(string(filtersAsJSON)), - }, - ) - Expect(err).ToNot(HaveOccurred()) - - accountsCursorResponse = response.Data - Expect(accountsCursorResponse).To(HaveLen(1)) - Expect(accountsCursorResponse[0]).To(Equal(components.V2Account{ - Address: "foo:foo", - Metadata: metadata1, - })) - }) It("should be listed on api using metadata filters", func() { response, err := ListAccounts( ctx,