Skip to content

Commit

Permalink
fix(openapi): update sdk client
Browse files Browse the repository at this point in the history
  • Loading branch information
reslene authored and gfyrag committed Nov 25, 2024
1 parent 7ebf1d9 commit 5584051
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 35 deletions.
1 change: 0 additions & 1 deletion pkg/client/.speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ management:
features:
go:
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.4
core: 3.5.2
defaultEnabledRetries: 0.2.0
deprecations: 2.81.1
Expand Down
2 changes: 1 addition & 1 deletion pkg/client/.speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: true
go:
version: 0.4.33
version: 0.5.0
additionalDependencies: {}
allowUnknownFieldsInWeakUnions: false
clientServerStatusCodesAsErrors: true
Expand Down
2 changes: 1 addition & 1 deletion pkg/client/docs/models/components/migrationinfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

| Field | Type | Required | Description | Example |
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| `Version` | **int64* | :heavy_minus_sign: | N/A | 11 |
| `Version` | **string* | :heavy_minus_sign: | N/A | 11 |
| `Name` | **string* | :heavy_minus_sign: | N/A | migrations:001 |
| `Date` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | N/A | |
| `State` | [*components.State](../../models/components/state.md) | :heavy_minus_sign: | N/A | |
4 changes: 2 additions & 2 deletions pkg/client/formance.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ func New(opts ...SDKOption) *Formance {
sdkConfiguration: sdkConfiguration{
Language: "go",
OpenAPIDocVersion: "v1",
SDKVersion: "0.4.33",
SDKVersion: "0.5.0",
GenVersion: "2.384.1",
UserAgent: "speakeasy-sdk/go 0.4.33 2.384.1 v1 github.com/formancehq/ledger/pkg/client",
UserAgent: "speakeasy-sdk/go 0.5.0 2.384.1 v1 github.com/formancehq/ledger/pkg/client",
Hooks: hooks.New(),
},
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/client/models/components/migrationinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (e *State) UnmarshalJSON(data []byte) error {
}

type MigrationInfo struct {
Version *int64 `json:"version,omitempty"`
Version *string `json:"version,omitempty"`
Name *string `json:"name,omitempty"`
Date *time.Time `json:"date,omitempty"`
State *State `json:"state,omitempty"`
Expand All @@ -53,7 +53,7 @@ func (m *MigrationInfo) UnmarshalJSON(data []byte) error {
return nil
}

func (o *MigrationInfo) GetVersion() *int64 {
func (o *MigrationInfo) GetVersion() *string {
if o == nil {
return nil
}
Expand Down
14 changes: 1 addition & 13 deletions pkg/client/models/operations/getbalances.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
package operations

import (
"github.com/formancehq/ledger/pkg/client/internal/utils"
"github.com/formancehq/ledger/pkg/client/models/components"
)

Expand All @@ -14,7 +13,7 @@ type GetBalancesRequest struct {
Address *string `queryParam:"style=form,explode=true,name=address"`
// The maximum number of results to return per page.
//
PageSize *int64 `default:"15" queryParam:"style=form,explode=true,name=pageSize"`
PageSize *int64 `queryParam:"style=form,explode=true,name=pageSize"`
// Pagination cursor, will return accounts after given address, in descending order.
After *string `queryParam:"style=form,explode=true,name=after"`
// Parameter used in pagination requests. Maximum page size is set to 1000.
Expand All @@ -25,17 +24,6 @@ type GetBalancesRequest struct {
Cursor *string `queryParam:"style=form,explode=true,name=cursor"`
}

func (g GetBalancesRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(g, "", false)
}

func (g *GetBalancesRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil {
return err
}
return nil
}

func (o *GetBalancesRequest) GetLedger() string {
if o == nil {
return ""
Expand Down
14 changes: 1 addition & 13 deletions pkg/client/models/operations/listaccounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
package operations

import (
"github.com/formancehq/ledger/pkg/client/internal/utils"
"github.com/formancehq/ledger/pkg/client/models/components"
"github.com/formancehq/ledger/pkg/client/models/sdkerrors"
)
Expand All @@ -13,7 +12,7 @@ type ListAccountsRequest struct {
Ledger string `pathParam:"style=simple,explode=false,name=ledger"`
// The maximum number of results to return per page.
//
PageSize *int64 `default:"15" queryParam:"style=form,explode=true,name=pageSize"`
PageSize *int64 `queryParam:"style=form,explode=true,name=pageSize"`
// Pagination cursor, will return accounts after given address, in descending order.
After *string `queryParam:"style=form,explode=true,name=after"`
// Filter accounts by address pattern (regular expression placed between ^ and $).
Expand All @@ -39,17 +38,6 @@ type ListAccountsRequest struct {
PaginationToken *string `queryParam:"style=form,explode=true,name=pagination_token"`
}

func (l ListAccountsRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(l, "", false)
}

func (l *ListAccountsRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &l, "", false, false); err != nil {
return err
}
return nil
}

func (o *ListAccountsRequest) GetLedger() string {
if o == nil {
return ""
Expand Down
2 changes: 1 addition & 1 deletion pkg/client/models/operations/listlogs.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type ListLogsRequest struct {
Ledger string `pathParam:"style=simple,explode=false,name=ledger"`
// The maximum number of results to return per page.
//
PageSize *int64 `default:"15" queryParam:"style=form,explode=true,name=pageSize"`
PageSize *int64 `queryParam:"style=form,explode=true,name=pageSize"`
// Pagination cursor, will return the logs after a given ID. (in descending order).
After *string `queryParam:"style=form,explode=true,name=after"`
// Filter transactions that occurred after this timestamp.
Expand Down
2 changes: 1 addition & 1 deletion pkg/client/models/operations/listtransactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type ListTransactionsRequest struct {
Ledger string `pathParam:"style=simple,explode=false,name=ledger"`
// The maximum number of results to return per page.
//
PageSize *int64 `default:"15" queryParam:"style=form,explode=true,name=pageSize"`
PageSize *int64 `queryParam:"style=form,explode=true,name=pageSize"`
// Pagination cursor, will return transactions after given txid (in descending order).
After *string `queryParam:"style=form,explode=true,name=after"`
// Find transactions by reference field.
Expand Down

0 comments on commit 5584051

Please sign in to comment.