Skip to content

Commit

Permalink
chore: update dependencies (#592) (#599)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag authored Dec 5, 2024
1 parent 0c39058 commit 69f5472
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 123 deletions.
4 changes: 0 additions & 4 deletions docs/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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|
Expand Down
32 changes: 0 additions & 32 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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: |
Expand Down
32 changes: 0 additions & 32 deletions openapi/v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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: |
Expand Down
55 changes: 0 additions & 55 deletions test/e2e/api_accounts_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 69f5472

Please sign in to comment.