-
Notifications
You must be signed in to change notification settings - Fork 123
feat: upgrade skeapeasy and use streaming file system for logs imports #766
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe pull request makes extensive updates across documentation, client SDK code, and tests. API documentation now marks the request body as mandatory for multiple endpoints and introduces a new schema for import logs. The SDK examples and documentation have been updated to use environment variables for security credentials and include context management. Client internals are enhanced with improvements to concurrency (switching from maps to Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant CredentialsHook
participant TokenServer
Client->>CredentialsHook: BeforeRequest (with HookContext)
CredentialsHook-->>CredentialsHook: Check session (using sync.Map & singleflight)
alt Session valid
CredentialsHook-->>Client: Return cached token
else Session expired/missing
CredentialsHook->>TokenServer: Request new token
TokenServer-->>CredentialsHook: Return token
CredentialsHook-->>Client: Return new token
end
sequenceDiagram
participant Client
participant RetryLogic
participant HTTPServer
Client->>RetryLogic: Call operation()
RetryLogic->>HTTPServer: Send HTTP request
HTTPServer-->>RetryLogic: Return error/response
alt Error is temporary
RetryLogic->>RetryLogic: Calculate backoff with jitter
RetryLogic->>HTTPServer: Retry HTTP request
else Error is permanent
RetryLogic-->>Client: Return permanent error
end
HTTPServer-->>RetryLogic: Return successful response
RetryLogic-->>Client: Return response
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #766 +/- ##
==========================================
+ Coverage 81.83% 81.88% +0.05%
==========================================
Files 136 136
Lines 7294 7294
==========================================
+ Hits 5969 5973 +4
+ Misses 1018 1016 -2
+ Partials 307 305 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🔭 Outside diff range comments (1)
pkg/client/docs/sdks/v2/README.md (1)
1507-1545
: 🛠️ Refactor suggestionFile Resource Management in ImportLogs Example
In the ImportLogs example, a file is opened viaos.Open("example.file")
but is not subsequently closed. To prevent resource leaks, consider adding a statement such as:- v2ImportLogsRequest, fileErr := os.Open("example.file") + v2ImportLogsRequest, fileErr := os.Open("example.file") + if fileErr != nil { + panic(fileErr) + } + defer v2ImportLogsRequest.Close()This will ensure that the file handle is properly released after use.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
1510-1510: Hard tabs
Column: 1(MD010, no-hard-tabs)
1511-1511: Hard tabs
Column: 1(MD010, no-hard-tabs)
1512-1512: Hard tabs
Column: 1(MD010, no-hard-tabs)
1513-1513: Hard tabs
Column: 1(MD010, no-hard-tabs)
1514-1514: Hard tabs
Column: 1(MD010, no-hard-tabs)
1515-1515: Hard tabs
Column: 1(MD010, no-hard-tabs)
🧹 Nitpick comments (24)
pkg/client/retry/config.go (1)
96-126
: Minor documentation typo.
“expenonential” should be spelled “exponential” in the comment on line 90.-// their default policy whether expenonential, constant backoff or something +// their default policy whether exponential, constant backoff or somethingpkg/client/internal/utils/requestbody.go (3)
78-78
: Consider reducing duplication.
This is essentially the same as line 75. You could refactor lines 75 and 78 into one call if they share the same conditions, for maintainability.- return serializeContentType(requestFieldName, tag.MediaType, val, string(requestField.Tag)) - } - return serializeContentType(requestFieldName, tag.MediaType, val, string(requestField.Tag)) + return serializeContentType(requestFieldName, tag.MediaType, val, string(requestField.Tag))
130-131
: Byte-slice type check is acceptable, but can be simplified.
Checkingreflect.TypeOf(val.Interface()) == reflect.TypeOf([]byte(nil))
works, but you could consider verifyingval.Kind() == reflect.Slice && val.Type().Elem().Kind() == reflect.Uint8
for a marginally clearer approach.- case reflect.TypeOf(val.Interface()) == reflect.TypeOf([]byte(nil)): + case val.Kind() == reflect.Slice && val.Type().Elem().Kind() == reflect.Uint8:
231-236
: Custom content handling.
You properly account for[]byte
andio.Reader
types. Consider handling unexpected types in anelse
case to raise an error (rather than silently ignoring them).} else if reflect.TypeOf(val.Interface()).Implements(reflect.TypeOf((*io.Reader)(nil)).Elem()) { reader = val.Interface().(io.Reader) } else { + return fmt.Errorf("unsupported content type in multipart form data content field") }
docs/api/README.md (1)
4439-4458
: New schema for V2ImportLogsRequest.
This block defines the schema for an import-logs request featuring afile
field. The structure looks correct for handling binary imports. Also, note that the lint tool flagged a duplicate heading near line 4453. To address it, rename or remove any repeated heading text to comply with MD024 guidelines.- ### Properties + ### V2ImportLogsRequest Properties🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
4453-4453: Multiple headings with the same content
null(MD024, no-duplicate-heading)
pkg/client/docs/models/components/v2errorresponse.md (1)
1-10
: Well-structured documentation for V2ErrorResponse model.The documentation clearly outlines the structure of the V2ErrorResponse model with its required and optional fields. It provides examples for each field which helps API consumers understand expected values.
However, I notice that the description for all fields is "N/A". Consider adding meaningful descriptions to better explain the purpose of each field, especially for Details which is optional.
pkg/client/models/operations/v2createbulk.go (1)
49-52
: Improved defensive programming by returning empty slice instead of nilThis change enhances the robustness of the code by returning an empty slice rather than nil when the receiver is nil. This prevents potential nil pointer dereference errors in calling code that might iterate over the returned slice without checking for nil first.
For consistency, consider applying this pattern to other similar getter methods that might still return nil for non-primitive types.
pkg/client/docs/models/components/errorresponse.md (1)
10-10
: The URL on line 10 should be properly formatted as a Markdown link.The
Details
field example contains a bare URL, which should be formatted as a proper Markdown link for better readability and to comply with Markdown linting rules.-| `Details` | **string* | :heavy_minus_sign: | N/A | https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9 | +| `Details` | **string* | :heavy_minus_sign: | N/A | [Debug link](https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9) |🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
10-10: Bare URL used
null(MD034, no-bare-urls)
pkg/client/docs/sdks/ledger/README.md (1)
21-25
: Fix Markdown formatting issuesThere are hard tabs in the import section that should be replaced with spaces to comply with Markdown linting rules.
- "context" - "os" - "github.com/formancehq/ledger/pkg/client/models/components" - "github.com/formancehq/ledger/pkg/client" - "log" + "context" + "os" + "github.com/formancehq/ledger/pkg/client/models/components" + "github.com/formancehq/ledger/pkg/client" + "log"Also applies to: 76-80
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
21-21: Hard tabs
Column: 1(MD010, no-hard-tabs)
22-22: Hard tabs
Column: 1(MD010, no-hard-tabs)
23-23: Hard tabs
Column: 1(MD010, no-hard-tabs)
24-24: Hard tabs
Column: 1(MD010, no-hard-tabs)
25-25: Hard tabs
Column: 1(MD010, no-hard-tabs)
pkg/client/models/operations/v2importlogs.go (2)
11-13
: Field naming might cause confusionThe struct and one of its fields share the same name
V2ImportLogsRequest
, which could be confusing to users of this API. Consider renaming the field to something more descriptive of its role, such asContent
orRequestData
.// Name of the ledger. Ledger string `pathParam:"style=simple,explode=false,name=ledger"` // This field accepts []byte data or io.Reader implementations, such as *os.File. -V2ImportLogsRequest any `request:"mediaType=application/octet-stream"` +Content any `request:"mediaType=application/octet-stream"`
23-28
: Getter method should match field name changeIf you rename the field as suggested above, remember to also update the getter method name to maintain consistency.
-func (o *V2ImportLogsRequest) GetV2ImportLogsRequest() any { +func (o *V2ImportLogsRequest) GetContent() any { if o == nil { return nil } - return o.V2ImportLogsRequest + return o.Content }pkg/client/models/components/errorresponse.go (1)
11-16
: Consider clearer error state representationFor the
GetErrorCode
method, returning an empty string-based enum when the receiver is nil works but might not be the most descriptive approach. Consider defining a specific "not available" or "unknown" error code in your enum that better communicates the exceptional condition.pkg/client/models/components/v2errorresponse.go (1)
1-30
: Document the difference between ErrorResponse and V2ErrorResponseIt's not immediately clear from the code what distinguishes the
V2ErrorResponse
from the regularErrorResponse
. Consider adding documentation that explains the difference and when each should be used.pkg/client/internal/utils/security.go (4)
94-104
: Reflection-basedPopulateSecurityFromEnv
may benefit from stronger error handling.
While it’s an elegant solution for dynamic population of security fields, consider validating or logging missing or incorrectly typed variables.
106-154
: Recursive environment population could be prone to edge cases.
populateStructFromEnv
works well for typical security structs; however, adding checks to guard against cyclical references or unusual struct shapes can further solidify robustness.
156-182
:hasEnvVarsForSecurityStruct
logic is correct but complex.
Try extracting or simplifying parts of this function if it grows more complicated in the future to maintain readability and testability.
213-217
: Consider documenting the “custom” subtype return behavior.
If “custom” is intentionally a no-op here, a comment clarifying intended use or future extensions would aid maintainability.pkg/client/internal/utils/utils.go (4)
100-110
: Case-insensitive environment variable lookups
getCaseInsensitiveEnvVar
checks the normal form first, then uppercase. Consider documenting or handling possible conflicts if both are set.
112-141
: Silent parse failures
ValueFromEnvVar
quietly returnsnil
on parse errors. Logging or returning explicit errors could aid debugging.
292-303
: Limited zero-value checking
isZeroValue
only checks string and numeric kinds. Consider adding booleans or other relevant kinds if needed.
305-339
: Lack of parse error messaging
setFieldValue
returns false on parse errors without logging details. Consider surfacing these errors for clarity.pkg/client/internal/hooks/clientcredentials.go (3)
44-47
: Concurrent session storage with sync.Map and singleflightStoring sessions in
sync.Map
and using a singleflight group to avoid duplicate token refresh calls is a good pattern for concurrency. Confirm that all read and write operations are properly handled to prevent data races. Also ensure the design accounts for the possibility of many concurrent calls hitting the same credentials (e.g., session thrashing).Also applies to: 58-58
120-145
: doTokenRequest method for token retrievalThe approach of dynamically building the token URL (line 136) and using
http.NewRequestWithContext
(line 142) is correct. Confirm that any upstream timeouts or contexts are respected. Additionally, consider wrapping the response read in a small helper to robustly handle partial responses or connection errors if needed.
183-222
: Credential extraction with reflection for default TokenURLThe checks for
ClientID
,ClientSecret
, and optionalTokenURL
are sound. Reflection to retrieve a default from struct tags works but may be fragile. If usage grows, consider a more explicit method for defaults. For example, you could define a config struct with explicit defaults that do not need reflection.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (10)
openapi.yaml
is excluded by!**/*.yaml
openapi/v1.yaml
is excluded by!**/*.yaml
openapi/v2.yaml
is excluded by!**/*.yaml
pkg/client/.speakeasy/gen.lock
is excluded by!**/*.lock
,!**/*.lock
pkg/client/.speakeasy/gen.yaml
is excluded by!**/*.yaml
pkg/client/go.mod
is excluded by!**/*.mod
pkg/client/go.sum
is excluded by!**/*.sum
,!**/*.sum
tools/generator/go.mod
is excluded by!**/*.mod
tools/provisioner/go.mod
is excluded by!**/*.mod
tools/provisioner/go.sum
is excluded by!**/*.sum
,!**/*.sum
📒 Files selected for processing (75)
docs/api/README.md
(14 hunks)flake.nix
(1 hunks)pkg/client/.gitignore
(1 hunks)pkg/client/README.md
(14 hunks)pkg/client/USAGE.md
(1 hunks)pkg/client/docs/models/components/errorresponse.md
(1 hunks)pkg/client/docs/models/components/security.md
(1 hunks)pkg/client/docs/models/components/v2errorresponse.md
(1 hunks)pkg/client/docs/models/operations/addmetadataontransactionrequest.md
(1 hunks)pkg/client/docs/models/operations/listaccountsresponse.md
(1 hunks)pkg/client/docs/models/operations/v2addmetadataontransactionrequest.md
(1 hunks)pkg/client/docs/models/operations/v2countaccountsrequest.md
(1 hunks)pkg/client/docs/models/operations/v2counttransactionsrequest.md
(1 hunks)pkg/client/docs/models/operations/v2createbulkrequest.md
(1 hunks)pkg/client/docs/models/operations/v2createledgerrequest.md
(1 hunks)pkg/client/docs/models/operations/v2getbalancesaggregatedrequest.md
(1 hunks)pkg/client/docs/models/operations/v2getinforesponse.md
(1 hunks)pkg/client/docs/models/operations/v2getvolumeswithbalancesrequest.md
(1 hunks)pkg/client/docs/models/operations/v2importlogsrequest.md
(1 hunks)pkg/client/docs/models/operations/v2listaccountsrequest.md
(1 hunks)pkg/client/docs/models/operations/v2listlogsrequest.md
(1 hunks)pkg/client/docs/models/operations/v2listtransactionsrequest.md
(1 hunks)pkg/client/docs/models/operations/v2updateledgermetadatarequest.md
(1 hunks)pkg/client/docs/models/operations/v2updateledgermetadataresponse.md
(1 hunks)pkg/client/docs/models/sdkerrors/errorresponse.md
(0 hunks)pkg/client/docs/models/sdkerrors/v2errorresponse.md
(0 hunks)pkg/client/docs/sdks/formance/README.md
(0 hunks)pkg/client/docs/sdks/ledger/README.md
(5 hunks)pkg/client/docs/sdks/v1/README.md
(46 hunks)pkg/client/docs/sdks/v2/README.md
(53 hunks)pkg/client/formance.go
(2 hunks)pkg/client/internal/hooks/clientcredentials.go
(8 hunks)pkg/client/internal/hooks/hooks.go
(1 hunks)pkg/client/internal/utils/env.go
(1 hunks)pkg/client/internal/utils/form.go
(1 hunks)pkg/client/internal/utils/json.go
(2 hunks)pkg/client/internal/utils/queryparams.go
(5 hunks)pkg/client/internal/utils/requestbody.go
(7 hunks)pkg/client/internal/utils/retries.go
(5 hunks)pkg/client/internal/utils/security.go
(7 hunks)pkg/client/internal/utils/utils.go
(6 hunks)pkg/client/ledger.go
(9 hunks)pkg/client/models/components/errorresponse.go
(1 hunks)pkg/client/models/components/security.go
(2 hunks)pkg/client/models/components/v2bulkelement.go
(1 hunks)pkg/client/models/components/v2bulkelementresult.go
(1 hunks)pkg/client/models/components/v2errorresponse.go
(1 hunks)pkg/client/models/components/v2targetid.go
(1 hunks)pkg/client/models/operations/listaccounts.go
(3 hunks)pkg/client/models/operations/options.go
(3 hunks)pkg/client/models/operations/v2addmetadataontransaction.go
(1 hunks)pkg/client/models/operations/v2countaccounts.go
(1 hunks)pkg/client/models/operations/v2counttransactions.go
(1 hunks)pkg/client/models/operations/v2createbulk.go
(1 hunks)pkg/client/models/operations/v2createledger.go
(2 hunks)pkg/client/models/operations/v2getbalancesaggregated.go
(1 hunks)pkg/client/models/operations/v2getinfo.go
(2 hunks)pkg/client/models/operations/v2getvolumeswithbalances.go
(1 hunks)pkg/client/models/operations/v2importlogs.go
(2 hunks)pkg/client/models/operations/v2listaccounts.go
(1 hunks)pkg/client/models/operations/v2listlogs.go
(1 hunks)pkg/client/models/operations/v2listtransactions.go
(1 hunks)pkg/client/models/operations/v2updateledgermetadata.go
(2 hunks)pkg/client/models/sdkerrors/errorresponse.go
(0 hunks)pkg/client/models/sdkerrors/v2errorresponse.go
(0 hunks)pkg/client/retry/config.go
(1 hunks)pkg/client/types/pointers.go
(1 hunks)pkg/client/v1.go
(84 hunks)test/e2e/api_ledgers_create_test.go
(3 hunks)test/e2e/api_ledgers_import_test.go
(4 hunks)test/e2e/app_logs_blocks_async_test.go
(1 hunks)test/performance/env_remote_ledger_test.go
(1 hunks)test/stress/stress_test.go
(1 hunks)tools/generator/cmd/root.go
(1 hunks)tools/provisioner/pkg/reconciler.go
(1 hunks)
💤 Files with no reviewable changes (5)
- pkg/client/docs/sdks/formance/README.md
- pkg/client/docs/models/sdkerrors/errorresponse.md
- pkg/client/models/sdkerrors/errorresponse.go
- pkg/client/models/sdkerrors/v2errorresponse.go
- pkg/client/docs/models/sdkerrors/v2errorresponse.md
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
pkg/client/docs/models/components/errorresponse.md
10-10: Bare URL used
null
(MD034, no-bare-urls)
pkg/client/USAGE.md
10-10: Hard tabs
Column: 1
(MD010, no-hard-tabs)
14-14: Hard tabs
Column: 1
(MD010, no-hard-tabs)
16-16: Hard tabs
Column: 1
(MD010, no-hard-tabs)
17-17: Hard tabs
Column: 1
(MD010, no-hard-tabs)
18-18: Hard tabs
Column: 1
(MD010, no-hard-tabs)
19-19: Hard tabs
Column: 1
(MD010, no-hard-tabs)
pkg/client/docs/sdks/ledger/README.md
21-21: Hard tabs
Column: 1
(MD010, no-hard-tabs)
22-22: Hard tabs
Column: 1
(MD010, no-hard-tabs)
23-23: Hard tabs
Column: 1
(MD010, no-hard-tabs)
24-24: Hard tabs
Column: 1
(MD010, no-hard-tabs)
25-25: Hard tabs
Column: 1
(MD010, no-hard-tabs)
76-76: Hard tabs
Column: 1
(MD010, no-hard-tabs)
77-77: Hard tabs
Column: 1
(MD010, no-hard-tabs)
78-78: Hard tabs
Column: 1
(MD010, no-hard-tabs)
79-79: Hard tabs
Column: 1
(MD010, no-hard-tabs)
80-80: Hard tabs
Column: 1
(MD010, no-hard-tabs)
pkg/client/README.md
30-30: Unordered list style
Expected: dash; Actual: asterisk
(MD004, ul-style)
31-31: Unordered list style
Expected: dash; Actual: asterisk
(MD004, ul-style)
31-31: Link fragments should be valid
null
(MD051, link-fragments)
32-32: Unordered list style
Expected: dash; Actual: asterisk
(MD004, ul-style)
33-33: Unordered list style
Expected: dash; Actual: asterisk
(MD004, ul-style)
34-34: Unordered list style
Expected: dash; Actual: asterisk
(MD004, ul-style)
35-35: Unordered list style
Expected: dash; Actual: asterisk
(MD004, ul-style)
36-36: Unordered list style
Expected: dash; Actual: asterisk
(MD004, ul-style)
37-37: Unordered list style
Expected: dash; Actual: asterisk
(MD004, ul-style)
38-38: Unordered list style
Expected: dash; Actual: asterisk
(MD004, ul-style)
39-39: Unordered list style
Expected: dash; Actual: asterisk
(MD004, ul-style)
40-40: Unordered list style
Expected: dash; Actual: asterisk
(MD004, ul-style)
41-41: Unordered list style
Expected: dash; Actual: asterisk
(MD004, ul-style)
42-42: Unordered list style
Expected: dash; Actual: asterisk
(MD004, ul-style)
68-68: Hard tabs
Column: 1
(MD010, no-hard-tabs)
72-72: Hard tabs
Column: 1
(MD010, no-hard-tabs)
74-74: Hard tabs
Column: 1
(MD010, no-hard-tabs)
75-75: Hard tabs
Column: 1
(MD010, no-hard-tabs)
76-76: Hard tabs
Column: 1
(MD010, no-hard-tabs)
77-77: Hard tabs
Column: 1
(MD010, no-hard-tabs)
102-102: Unordered list style
Expected: dash; Actual: asterisk
(MD004, ul-style)
103-103: Unordered list style
Expected: dash; Actual: asterisk
(MD004, ul-style)
175-175: Hard tabs
Column: 1
(MD010, no-hard-tabs)
179-179: Hard tabs
Column: 1
(MD010, no-hard-tabs)
181-181: Hard tabs
Column: 1
(MD010, no-hard-tabs)
182-182: Hard tabs
Column: 1
(MD010, no-hard-tabs)
183-183: Hard tabs
Column: 1
(MD010, no-hard-tabs)
184-184: Hard tabs
Column: 1
(MD010, no-hard-tabs)
219-219: Hard tabs
Column: 1
(MD010, no-hard-tabs)
223-223: Hard tabs
Column: 1
(MD010, no-hard-tabs)
238-238: Hard tabs
Column: 1
(MD010, no-hard-tabs)
239-239: Hard tabs
Column: 1
(MD010, no-hard-tabs)
281-281: Hard tabs
Column: 1
(MD010, no-hard-tabs)
285-285: Hard tabs
Column: 1
(MD010, no-hard-tabs)
287-287: Hard tabs
Column: 1
(MD010, no-hard-tabs)
288-288: Hard tabs
Column: 1
(MD010, no-hard-tabs)
289-289: Hard tabs
Column: 1
(MD010, no-hard-tabs)
290-290: Hard tabs
Column: 1
(MD010, no-hard-tabs)
328-328: Hard tabs
Column: 1
(MD010, no-hard-tabs)
332-332: Hard tabs
Column: 1
(MD010, no-hard-tabs)
334-334: Hard tabs
Column: 1
(MD010, no-hard-tabs)
335-335: Hard tabs
Column: 1
(MD010, no-hard-tabs)
336-336: Hard tabs
Column: 1
(MD010, no-hard-tabs)
337-337: Hard tabs
Column: 1
(MD010, no-hard-tabs)
338-338: Hard tabs
Column: 1
(MD010, no-hard-tabs)
403-403: Hard tabs
Column: 1
(MD010, no-hard-tabs)
407-407: Hard tabs
Column: 1
(MD010, no-hard-tabs)
409-409: Hard tabs
Column: 1
(MD010, no-hard-tabs)
410-410: Hard tabs
Column: 1
(MD010, no-hard-tabs)
411-411: Hard tabs
Column: 1
(MD010, no-hard-tabs)
412-412: Hard tabs
Column: 1
(MD010, no-hard-tabs)
docs/api/README.md
4453-4453: Multiple headings with the same content
null
(MD024, no-duplicate-heading)
pkg/client/docs/sdks/v2/README.md
44-44: Hard tabs
Column: 1
(MD010, no-hard-tabs)
45-45: Hard tabs
Column: 1
(MD010, no-hard-tabs)
46-46: Hard tabs
Column: 1
(MD010, no-hard-tabs)
47-47: Hard tabs
Column: 1
(MD010, no-hard-tabs)
48-48: Hard tabs
Column: 1
(MD010, no-hard-tabs)
49-49: Hard tabs
Column: 1
(MD010, no-hard-tabs)
104-104: Hard tabs
Column: 1
(MD010, no-hard-tabs)
105-105: Hard tabs
Column: 1
(MD010, no-hard-tabs)
106-106: Hard tabs
Column: 1
(MD010, no-hard-tabs)
107-107: Hard tabs
Column: 1
(MD010, no-hard-tabs)
108-108: Hard tabs
Column: 1
(MD010, no-hard-tabs)
109-109: Hard tabs
Column: 1
(MD010, no-hard-tabs)
163-163: Hard tabs
Column: 1
(MD010, no-hard-tabs)
164-164: Hard tabs
Column: 1
(MD010, no-hard-tabs)
165-165: Hard tabs
Column: 1
(MD010, no-hard-tabs)
166-166: Hard tabs
Column: 1
(MD010, no-hard-tabs)
167-167: Hard tabs
Column: 1
(MD010, no-hard-tabs)
168-168: Hard tabs
Column: 1
(MD010, no-hard-tabs)
227-227: Hard tabs
Column: 1
(MD010, no-hard-tabs)
228-228: Hard tabs
Column: 1
(MD010, no-hard-tabs)
229-229: Hard tabs
Column: 1
(MD010, no-hard-tabs)
230-230: Hard tabs
Column: 1
(MD010, no-hard-tabs)
231-231: Hard tabs
Column: 1
(MD010, no-hard-tabs)
232-232: Hard tabs
Column: 1
(MD010, no-hard-tabs)
289-289: Hard tabs
Column: 1
(MD010, no-hard-tabs)
290-290: Hard tabs
Column: 1
(MD010, no-hard-tabs)
291-291: Hard tabs
Column: 1
(MD010, no-hard-tabs)
292-292: Hard tabs
Column: 1
(MD010, no-hard-tabs)
293-293: Hard tabs
Column: 1
(MD010, no-hard-tabs)
294-294: Hard tabs
Column: 1
(MD010, no-hard-tabs)
349-349: Hard tabs
Column: 1
(MD010, no-hard-tabs)
350-350: Hard tabs
Column: 1
(MD010, no-hard-tabs)
351-351: Hard tabs
Column: 1
(MD010, no-hard-tabs)
352-352: Hard tabs
Column: 1
(MD010, no-hard-tabs)
353-353: Hard tabs
Column: 1
(MD010, no-hard-tabs)
354-354: Hard tabs
Column: 1
(MD010, no-hard-tabs)
408-408: Hard tabs
Column: 1
(MD010, no-hard-tabs)
409-409: Hard tabs
Column: 1
(MD010, no-hard-tabs)
410-410: Hard tabs
Column: 1
(MD010, no-hard-tabs)
411-411: Hard tabs
Column: 1
(MD010, no-hard-tabs)
412-412: Hard tabs
Column: 1
(MD010, no-hard-tabs)
413-413: Hard tabs
Column: 1
(MD010, no-hard-tabs)
414-414: Hard tabs
Column: 1
(MD010, no-hard-tabs)
478-478: Hard tabs
Column: 1
(MD010, no-hard-tabs)
479-479: Hard tabs
Column: 1
(MD010, no-hard-tabs)
480-480: Hard tabs
Column: 1
(MD010, no-hard-tabs)
481-481: Hard tabs
Column: 1
(MD010, no-hard-tabs)
482-482: Hard tabs
Column: 1
(MD010, no-hard-tabs)
483-483: Hard tabs
Column: 1
(MD010, no-hard-tabs)
540-540: Hard tabs
Column: 1
(MD010, no-hard-tabs)
541-541: Hard tabs
Column: 1
(MD010, no-hard-tabs)
542-542: Hard tabs
Column: 1
(MD010, no-hard-tabs)
543-543: Hard tabs
Column: 1
(MD010, no-hard-tabs)
544-544: Hard tabs
Column: 1
(MD010, no-hard-tabs)
545-545: Hard tabs
Column: 1
(MD010, no-hard-tabs)
604-604: Hard tabs
Column: 1
(MD010, no-hard-tabs)
605-605: Hard tabs
Column: 1
(MD010, no-hard-tabs)
606-606: Hard tabs
Column: 1
(MD010, no-hard-tabs)
607-607: Hard tabs
Column: 1
(MD010, no-hard-tabs)
608-608: Hard tabs
Column: 1
(MD010, no-hard-tabs)
609-609: Hard tabs
Column: 1
(MD010, no-hard-tabs)
664-664: Hard tabs
Column: 1
(MD010, no-hard-tabs)
665-665: Hard tabs
Column: 1
(MD010, no-hard-tabs)
666-666: Hard tabs
Column: 1
(MD010, no-hard-tabs)
667-667: Hard tabs
Column: 1
(MD010, no-hard-tabs)
668-668: Hard tabs
Column: 1
(MD010, no-hard-tabs)
669-669: Hard tabs
Column: 1
(MD010, no-hard-tabs)
728-728: Hard tabs
Column: 1
(MD010, no-hard-tabs)
729-729: Hard tabs
Column: 1
(MD010, no-hard-tabs)
730-730: Hard tabs
Column: 1
(MD010, no-hard-tabs)
731-731: Hard tabs
Column: 1
(MD010, no-hard-tabs)
732-732: Hard tabs
Column: 1
(MD010, no-hard-tabs)
733-733: Hard tabs
Column: 1
(MD010, no-hard-tabs)
790-790: Hard tabs
Column: 1
(MD010, no-hard-tabs)
791-791: Hard tabs
Column: 1
(MD010, no-hard-tabs)
792-792: Hard tabs
Column: 1
(MD010, no-hard-tabs)
793-793: Hard tabs
Column: 1
(MD010, no-hard-tabs)
794-794: Hard tabs
Column: 1
(MD010, no-hard-tabs)
795-795: Hard tabs
Column: 1
(MD010, no-hard-tabs)
849-849: Hard tabs
Column: 1
(MD010, no-hard-tabs)
850-850: Hard tabs
Column: 1
(MD010, no-hard-tabs)
851-851: Hard tabs
Column: 1
(MD010, no-hard-tabs)
852-852: Hard tabs
Column: 1
(MD010, no-hard-tabs)
853-853: Hard tabs
Column: 1
(MD010, no-hard-tabs)
854-854: Hard tabs
Column: 1
(MD010, no-hard-tabs)
912-912: Hard tabs
Column: 1
(MD010, no-hard-tabs)
913-913: Hard tabs
Column: 1
(MD010, no-hard-tabs)
914-914: Hard tabs
Column: 1
(MD010, no-hard-tabs)
915-915: Hard tabs
Column: 1
(MD010, no-hard-tabs)
916-916: Hard tabs
Column: 1
(MD010, no-hard-tabs)
917-917: Hard tabs
Column: 1
(MD010, no-hard-tabs)
976-976: Hard tabs
Column: 1
(MD010, no-hard-tabs)
977-977: Hard tabs
Column: 1
(MD010, no-hard-tabs)
978-978: Hard tabs
Column: 1
(MD010, no-hard-tabs)
979-979: Hard tabs
Column: 1
(MD010, no-hard-tabs)
980-980: Hard tabs
Column: 1
(MD010, no-hard-tabs)
981-981: Hard tabs
Column: 1
(MD010, no-hard-tabs)
982-982: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1019-1019: Hard tabs
Column: 18
(MD010, no-hard-tabs)
1020-1020: Hard tabs
Column: 18
(MD010, no-hard-tabs)
1071-1071: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1072-1072: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1073-1073: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1074-1074: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1075-1075: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1076-1076: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1077-1077: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1132-1132: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1133-1133: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1134-1134: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1135-1135: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1136-1136: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1137-1137: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1138-1138: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1197-1197: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1198-1198: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1199-1199: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1200-1200: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1201-1201: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1202-1202: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1203-1203: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1259-1259: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1260-1260: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1261-1261: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1262-1262: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1263-1263: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1264-1264: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1265-1265: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1321-1321: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1322-1322: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1323-1323: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1324-1324: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1325-1325: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1326-1326: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1383-1383: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1384-1384: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1385-1385: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1386-1386: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1387-1387: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1388-1388: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1448-1448: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1449-1449: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1450-1450: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1451-1451: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1452-1452: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1453-1453: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1510-1510: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1511-1511: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1512-1512: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1513-1513: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1514-1514: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1515-1515: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1576-1576: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1577-1577: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1578-1578: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1579-1579: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1580-1580: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1581-1581: Hard tabs
Column: 1
(MD010, no-hard-tabs)
pkg/client/docs/sdks/v1/README.md
39-39: Hard tabs
Column: 1
(MD010, no-hard-tabs)
40-40: Hard tabs
Column: 1
(MD010, no-hard-tabs)
41-41: Hard tabs
Column: 1
(MD010, no-hard-tabs)
42-42: Hard tabs
Column: 1
(MD010, no-hard-tabs)
43-43: Hard tabs
Column: 1
(MD010, no-hard-tabs)
94-94: Hard tabs
Column: 1
(MD010, no-hard-tabs)
95-95: Hard tabs
Column: 1
(MD010, no-hard-tabs)
96-96: Hard tabs
Column: 1
(MD010, no-hard-tabs)
97-97: Hard tabs
Column: 1
(MD010, no-hard-tabs)
98-98: Hard tabs
Column: 1
(MD010, no-hard-tabs)
99-99: Hard tabs
Column: 1
(MD010, no-hard-tabs)
153-153: Hard tabs
Column: 1
(MD010, no-hard-tabs)
154-154: Hard tabs
Column: 1
(MD010, no-hard-tabs)
155-155: Hard tabs
Column: 1
(MD010, no-hard-tabs)
156-156: Hard tabs
Column: 1
(MD010, no-hard-tabs)
157-157: Hard tabs
Column: 1
(MD010, no-hard-tabs)
158-158: Hard tabs
Column: 1
(MD010, no-hard-tabs)
265-265: Hard tabs
Column: 1
(MD010, no-hard-tabs)
266-266: Hard tabs
Column: 1
(MD010, no-hard-tabs)
267-267: Hard tabs
Column: 1
(MD010, no-hard-tabs)
268-268: Hard tabs
Column: 1
(MD010, no-hard-tabs)
269-269: Hard tabs
Column: 1
(MD010, no-hard-tabs)
270-270: Hard tabs
Column: 1
(MD010, no-hard-tabs)
382-382: Hard tabs
Column: 1
(MD010, no-hard-tabs)
383-383: Hard tabs
Column: 1
(MD010, no-hard-tabs)
384-384: Hard tabs
Column: 1
(MD010, no-hard-tabs)
385-385: Hard tabs
Column: 1
(MD010, no-hard-tabs)
386-386: Hard tabs
Column: 1
(MD010, no-hard-tabs)
387-387: Hard tabs
Column: 1
(MD010, no-hard-tabs)
442-442: Hard tabs
Column: 1
(MD010, no-hard-tabs)
443-443: Hard tabs
Column: 1
(MD010, no-hard-tabs)
444-444: Hard tabs
Column: 1
(MD010, no-hard-tabs)
445-445: Hard tabs
Column: 1
(MD010, no-hard-tabs)
446-446: Hard tabs
Column: 1
(MD010, no-hard-tabs)
447-447: Hard tabs
Column: 1
(MD010, no-hard-tabs)
505-505: Hard tabs
Column: 1
(MD010, no-hard-tabs)
506-506: Hard tabs
Column: 1
(MD010, no-hard-tabs)
507-507: Hard tabs
Column: 1
(MD010, no-hard-tabs)
508-508: Hard tabs
Column: 1
(MD010, no-hard-tabs)
509-509: Hard tabs
Column: 1
(MD010, no-hard-tabs)
510-510: Hard tabs
Column: 1
(MD010, no-hard-tabs)
564-564: Hard tabs
Column: 1
(MD010, no-hard-tabs)
565-565: Hard tabs
Column: 1
(MD010, no-hard-tabs)
566-566: Hard tabs
Column: 1
(MD010, no-hard-tabs)
567-567: Hard tabs
Column: 1
(MD010, no-hard-tabs)
568-568: Hard tabs
Column: 1
(MD010, no-hard-tabs)
569-569: Hard tabs
Column: 1
(MD010, no-hard-tabs)
638-638: Hard tabs
Column: 1
(MD010, no-hard-tabs)
639-639: Hard tabs
Column: 1
(MD010, no-hard-tabs)
640-640: Hard tabs
Column: 1
(MD010, no-hard-tabs)
641-641: Hard tabs
Column: 1
(MD010, no-hard-tabs)
642-642: Hard tabs
Column: 1
(MD010, no-hard-tabs)
643-643: Hard tabs
Column: 1
(MD010, no-hard-tabs)
664-664: Hard tabs
Column: 14
(MD010, no-hard-tabs)
665-665: Hard tabs
Column: 14
(MD010, no-hard-tabs)
712-712: Hard tabs
Column: 1
(MD010, no-hard-tabs)
713-713: Hard tabs
Column: 1
(MD010, no-hard-tabs)
714-714: Hard tabs
Column: 1
(MD010, no-hard-tabs)
715-715: Hard tabs
Column: 1
(MD010, no-hard-tabs)
716-716: Hard tabs
Column: 1
(MD010, no-hard-tabs)
717-717: Hard tabs
Column: 1
(MD010, no-hard-tabs)
771-771: Hard tabs
Column: 1
(MD010, no-hard-tabs)
772-772: Hard tabs
Column: 1
(MD010, no-hard-tabs)
773-773: Hard tabs
Column: 1
(MD010, no-hard-tabs)
774-774: Hard tabs
Column: 1
(MD010, no-hard-tabs)
775-775: Hard tabs
Column: 1
(MD010, no-hard-tabs)
776-776: Hard tabs
Column: 1
(MD010, no-hard-tabs)
835-835: Hard tabs
Column: 1
(MD010, no-hard-tabs)
836-836: Hard tabs
Column: 1
(MD010, no-hard-tabs)
837-837: Hard tabs
Column: 1
(MD010, no-hard-tabs)
838-838: Hard tabs
Column: 1
(MD010, no-hard-tabs)
839-839: Hard tabs
Column: 1
(MD010, no-hard-tabs)
840-840: Hard tabs
Column: 1
(MD010, no-hard-tabs)
901-901: Hard tabs
Column: 1
(MD010, no-hard-tabs)
902-902: Hard tabs
Column: 1
(MD010, no-hard-tabs)
903-903: Hard tabs
Column: 1
(MD010, no-hard-tabs)
904-904: Hard tabs
Column: 1
(MD010, no-hard-tabs)
905-905: Hard tabs
Column: 1
(MD010, no-hard-tabs)
906-906: Hard tabs
Column: 1
(MD010, no-hard-tabs)
907-907: Hard tabs
Column: 1
(MD010, no-hard-tabs)
949-949: Hard tabs
Column: 18
(MD010, no-hard-tabs)
950-950: Hard tabs
Column: 18
(MD010, no-hard-tabs)
998-998: Hard tabs
Column: 1
(MD010, no-hard-tabs)
999-999: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1000-1000: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1001-1001: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1002-1002: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1003-1003: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1004-1004: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1059-1059: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1060-1060: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1061-1061: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1062-1062: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1063-1063: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1064-1064: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1065-1065: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1123-1123: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1124-1124: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1125-1125: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1126-1126: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1127-1127: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1128-1128: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1129-1129: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1184-1184: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1185-1185: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1186-1186: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1187-1187: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1188-1188: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1189-1189: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1190-1190: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1271-1271: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1272-1272: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1273-1273: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1274-1274: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1275-1275: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1276-1276: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1333-1333: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1334-1334: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1335-1335: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1336-1336: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1337-1337: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1338-1338: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1393-1393: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1394-1394: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1395-1395: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1396-1396: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1397-1397: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1398-1398: Hard tabs
Column: 1
(MD010, no-hard-tabs)
🪛 LanguageTool
pkg/client/README.md
[uncategorized] ~260-~260: You might be missing the article “the” here.
Context: ...heir associated error. You can refer to respective Errors tables in SDK docs for more de...
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
[uncategorized] ~260-~260: You might be missing the article “the” here.
Context: ... refer to respective Errors tables in SDK docs for more details on possible error...
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Tests
🔇 Additional comments (154)
pkg/client/.gitignore (1)
1-1
: Appropriate addition to .gitignoreAdding Speakeasy reports to .gitignore is a good practice since these are generated files that don't need to be tracked in version control.
pkg/client/internal/utils/env.go (1)
9-16
: Well-implemented environment variable utility functionThe
GetEnv
function follows standard patterns for retrieving environment variables with defaults. This is a useful utility that will help make the client configuration more flexible.pkg/client/models/components/v2targetid.go (1)
20-21
: Enhanced query parameter serialization with inline tagsAdding the
queryParam:"inline"
struct tags to these fields ensures they're properly serialized as inline query parameters. This is a good improvement that makes the request formatting more explicit.pkg/client/internal/utils/json.go (3)
168-174
: Added proper error handling for string unquoting in constant field validationThis change improves the handling of constant field values by safely unquoting string values and providing meaningful error messages when unquoting fails. This prevents potential runtime issues when dealing with improperly quoted strings.
176-178
: Improved readability and error messaging for constant field validationThe refactoring enhances code readability by storing the expected constant in a variable and providing a more informative error message that includes both the expected and actual values, making debugging easier.
490-513
: Performance optimization for slice and array unmarshalingThe code has been improved to:
- Fix the typo in variable name (unmarshaled instead of unmarhsaled)
- Initialize the slice with the correct length upfront instead of repeatedly resizing it with append operations
- Proper nil pointer handling for destination values
These changes will result in better performance and more robust handling of unmarshaling operations.
pkg/client/internal/utils/form.go (1)
18-26
:✅ Verification successful
Enhanced form population with default value support
The function signature has been updated to accept a default value parameter, which allows for providing fallback values when the object is nil. This is a good improvement that increases flexibility.
Make sure all callers of this function have been updated to include the new parameter.
🏁 Script executed:
#!/bin/bash # Check if all callers of populateForm have been updated with the new parameter rg -A 1 "populateForm\(" --type goLength of output: 802
Default Value Parameter Update Verified
The changes have been verified across the codebase. The new
defaultValue
parameter inpopulateForm
is now correctly included in all call sites:
- pkg/client/internal/utils/queryparams.go: The
defaultValue
is passed as intended.- pkg/client/internal/utils/requestbody.go:
nil
is passed when no default value is needed.This update enhances flexibility by allowing fallback values when the target object is nil. The implementation looks good, and all updates have been confirmed.
pkg/client/models/operations/options.go (3)
38-38
: Added support for custom headersThe
SetHeaders
field allows for custom headers to be set on requests, providing more flexibility to the client API.
110-117
: Added WithSetHeaders function for custom header supportThis helper function enables setting custom headers that will be applied to requests, enhancing the client's flexibility. The implementation correctly assigns the headers to the Options struct.
24-26
:❓ Verification inconclusive
Renamed enum value for better semantic clarity
The enum value has been renamed from
AcceptHeaderEnumWildcardWildcard
toAcceptHeaderEnumWildcardRootWildcard
to better represent its purpose. This is a good change for clarity, but be aware this is a breaking change if external code references this enum value directly.
🏁 Script executed:
#!/bin/bash # Check if the old enum name is used elsewhere in the codebase rg "AcceptHeaderEnumWildcardWildcard" --type goLength of output: 47
Below is an updated review comment. Note that while our initial search using
rg "AcceptHeaderEnumWildcardWildcard" --type go
returned no results, the low-confidence output means it’s best to manually verify that no external code still references the old enum name.
Action Required: Confirm there are no external dependencies on the old enum value
- We verified internally that no usages of
AcceptHeaderEnumWildcardWildcard
were found with our search.- However, given that the command returned no output (a low-confidence indicator), please perform an additional manual review (or run a broader search) to ensure that external code isn’t affected by this breaking change.
Renamed enum value from
AcceptHeaderEnumWildcardWildcard
toAcceptHeaderEnumWildcardRootWildcard
improves semantic clarity. Please double-check external integrations to prevent unintended breakages.pkg/client/internal/utils/queryparams.go (5)
68-75
: Added support for constant and default values in query parametersThese changes add the ability to handle constant field values in query parameters and parse default values, which enhances the flexibility of the query parameter handling.
102-103
: Updated form parameter population to include default valuesThe function calls have been updated to pass the default value parameter to the
populateForm
function, ensuring consistency with the changes made in the form.go file.Also applies to: 109-110
225-229
: Improved handling of nested structures in query parametersThe logic for constructing the scope string in deep object parameters has been refined to better handle inline fields, particularly for union or oneOf types. This enhances the representation of nested parameters in query strings.
251-260
: Updated function signature to include default value parameterThe
populateFormParams
function now accepts a default value parameter and passes it to thepopulateForm
function, ensuring consistency across the codebase.
267-274
: Added documentation for the Inline property in paramTag structThe comments explain the purpose of the Inline property, which is used for handling union/oneOf types in deep object parameter encoding. This is good practice as it clarifies the intent and usage of the field.
pkg/client/retry/config.go (12)
5-10
: Imports look appropriate.
No issues found with the new imports and their usage.
12-13
: Documentation clarity.
These comments clearly communicate howBackoffStrategy
is intended to be used.
21-25
: Retry strategy documentation reads well.
It’s good to see clear guidance on how “backoff” vs. “none” interacts with the retry process.
31-35
: Struct definition is consistent and idiomatic.
ThePermanentError
approach for terminal failures is aligned with conventional Go custom error patterns.
37-47
: Constructing aPermanentError
is logically sound.
It’s helpful that you avoid re-wrapping errors that are already permanent.
49-55
: Error method implementation is appropriate.
Returninge.cause.Error()
ensures that callingError()
reflects the underlying cause.
57-63
:TemporaryError
struct is well-structured.
Good to handle an optional wait interval for retry.
64-72
:Temporary
constructor is straightforward.
It effectively signals retry eligibility without specifying a wait duration.
74-82
:TemporaryFromResponse
is beneficial for handling “Retry-After” logic.
Parsing the response header here is a neat example of separating concerns.
84-86
: Error method delegates well.
Returning the message directly maintains clarity on the error cause.
88-94
:RetryAfter()
method is logically consistent.
A zero duration fallback ensures the default retry policy is used if not otherwise specified.
128-148
:IsPermanentError
andIsTemporaryError
usage oferrors.As
is correct.
These checks are a clean way to distinguish error categories without duplicating logic.pkg/client/models/components/v2bulkelementresult.go (1)
158-162
: Query parameter tags for inline fields.
AddingqueryParam:"inline"
on each of these fields helps unify handling of results across different operation types. Ensure any external code relying on these field tags is updated accordingly.flake.nix (2)
36-36
: Version update notice.
Updating speakeasy to v1.517.3 is a significant jump. Verify any breaking changes in speakeasy’s release notes to ensure compatibility.
44-47
: Updated hashes.
These checksums look valid, but please confirm they're correct by comparing to the official release artifacts.pkg/client/internal/utils/requestbody.go (10)
69-69
: No issues with obtaining the reflect.Value.
This line ensures a consistent reference to the underlying request object for subsequent checks. It looks correct.
75-75
: Return value logic is valid.
Returning the result ofserializeContentType
using the newly introducedval
is correct and maintains consistency with the new approach.
86-86
: Improved function signature.
Changing the return type to(io.Reader, string, error)
offers more flexibility for streaming and is a solid enhancement.
120-121
: Safe detection of io.Reader implementation.
UsingImplements(...)
followed by a direct cast is appropriate and should not panic. The logic is clear.
167-167
: Handling file fields in multipart form data.
Conditionally branching ontag.File
is a correct approach to separate file uploads from standard fields.
169-169
: Consistent function call for file uploads.
The call toencodeMultipartFormDataFile(writer, tag.Name, fieldType, valType)
aligns well with the updated logic of handling file fields.
215-215
: Refactored function signature.
Explicitly passingfieldName
helps produce clearer error messages and aligns with standard multipart usage.
220-220
: Reader variable introduced for file content.
Definingvar reader io.Reader
is a concise approach for bridging anyio.Reader
or[]byte
to the multipart writer.
242-242
: Validation for file name and reader.
The check ensures both the filename and reader are populated. This is a robust way to detect missing data in file uploads.
295-295
: Verify closure usage and possible overshadowing.
The closure referencesfield
from the outer scope, while its parameter issf
. Confirm that this is intended and correct, as it may lead to unexpected results ifsf
differs fromfield
.pkg/client/models/components/v2bulkelement.go (1)
22-25
: Inline query parameters for bulk elements approved.
AddingqueryParam:"inline"
to these fields is consistent with other field definitions in the codebase and appears correct.docs/api/README.md (13)
274-274
: Body parameter now required for ledger creation.
Marking thebody
parameter for theV2CreateLedgerRequest
astrue
is consistent with the necessity for request data when creating a ledger.
329-329
: Metadata body set to mandatory for ledger updates.
Requiring a request body for ledger metadata updates ensures correct usage and aligns with the new design.
514-514
: Bulk request body now mandatory.
ForV2Bulk
, making the request body required is consistent with the new approach of always submitting structured data.
658-658
: Now enforcing a body for counting accounts.
Requiring a request body for the "count the accounts" endpoint helps unify input handling across multiple endpoints.
723-723
: Requiring a body for listing accounts.
This unifies the behavior across endpoints, ensuring query specifics are properly provided via the request body.
1070-1070
: Transactions count endpoint needs a body.
This change aligns with the other ledger endpoints that have shifted to requiring request bodies for consistent input structures.
1137-1137
: Request body mandatory for listing transactions.
Ensures transaction retrieval can handle complex filtering or pagination input scenarios in a structured manner.
1590-1590
: Transaction metadata update mandated to have a body.
RequiringV2Metadata
in the request body clarifies how updates must be provided.
1776-1776
: Now enforcing a body for aggregated balances.
A consistent practice with the other endpoints requiring structured input.
1836-1836
: Body parameter required for listing volumes.
Keeps the inbound request handling consistent.
1915-1915
: Body parameter required for listing logs.
Maintains uniformity in how endpoints receive data for searching or filtering.
1981-1981
: Documented file field for V2ImportLogsRequest.
Explicitly showingfile: string
clarifies the new import approach.
1989-1989
: Making request body mandatory for v2ImportLogs.
This change ensures that the logs file is always provided when importing logs into the ledger.pkg/client/internal/hooks/hooks.go (1)
27-27
:❓ Verification inconclusive
Added BaseURL field to HookContext
The addition of the BaseURL field to HookContext will allow hooks to be aware of and potentially modify the base URL used in requests. This aligns with changes in other files where dynamic URL handling has been enhanced.
Since this is a code-generated file, please verify that any code that might use this field is properly updated to set the BaseURL value correctly:
🏁 Script executed:
#!/bin/bash # Search for places where HookContext is instantiated rg "HookContext\{" --type goLength of output: 2294
Action Required: Ensure BaseURL Is Properly Initialized in All HookContext Instantiations
The change adding the BaseURL field to HookContext supports enhanced dynamic URL handling. Our search confirms that HookContext is instantiated in several places (notably in pkg/client/v1.go, pkg/client/v2.go, and pkg/client/ledger.go). Please verify that each instance properly assigns a value to the new BaseURL field. For example, update instantiation code as needed:
hookCtx := hooks.HookContext{ // ... other fields BaseURL: "<appropriate_value>", }If any instantiation is missing this, it should be updated accordingly.
pkg/client/types/pointers.go (1)
11-11
:❓ Verification inconclusive
Good addition of generic Pointer function
The new generic Pointer function is a valuable enhancement that provides a unified way to create pointers for any type. This is more flexible than the type-specific functions and follows modern Go practices with generics.
Let's check how the new generic function is being used throughout the codebase:
🏁 Script executed:
#!/bin/bash # Find usages of the new generic Pointer function rg "types\.Pointer\[" --type goLength of output: 33
Review Verification – Generic Pointer Function Usage
The implementation of the generic Pointer function in
pkg/client/types/pointers.go
(line 11) correctly leverages Go generics to offer a more flexible and unified approach than type-specific alternatives. However, an automated search for invocations oftypes.Pointer
(searching for patterns liketypes.Pointer(
) returned no matches across the codebase. This could be intentional, but I recommend verifying whether its usage is planned in upcoming changes or if adding example calls/tests would be beneficial.pkg/client/docs/models/operations/v2listtransactionsrequest.md (1)
15-15
:❓ Verification inconclusive
API breaking change: RequestBody now required for listing transactions
The RequestBody field is now marked as required for the V2ListTransactionsRequest. This is a breaking change that could affect existing clients that previously listed transactions without providing a request body.
Making a request body mandatory for what appears to be a read/list operation is somewhat unusual in API design. Consider whether this is the intended behavior, and ensure this change is properly documented in release notes to help users adapt their implementations.
🏁 Script executed:
#!/bin/bash # Check how the ListTransactions operation is implemented in the codebase # to understand the rationale for requiring a request body rg "ListTransactions" --type go -A 10Length of output: 70567
API Change Verification: Confirm RequestBody Optionality for ListTransactions
The documentation now shows RequestBody as required for V2ListTransactionsRequest, which at first glance seems unusual for a read/list operation. However, our review of the implementation (e.g. the GetRequestBody method in pkg/client/models/operations/v2listtransactions.go) indicates that if no RequestBody is provided, an empty map is used by default. Furthermore, multiple tests (see pkg/testserver/matchers.go and test/e2e/api_transactions_list_test.go) call ListTransactions without explicitly setting RequestBody yet behave as expected.Please verify that:
• This design is intentional—that the docs mark the field as required even though the default empty map permits omission.
• The release notes clearly explain that clients can continue to omit RequestBody (or provide an empty map) when no filtering is needed.
• If the aim is to allow RequestBody to be optional for GET-like operations, the docs should be updated accordingly to avoid confusion.pkg/client/docs/models/operations/addmetadataontransactionrequest.md (1)
10-10
: Documentation Field Update:RequestBody
Now Required
This update marks theRequestBody
field as required (:heavy_check_mark:), which is consistent with similar changes across other endpoints. Ensure that the backend API validations and any related unit tests are updated accordingly.pkg/client/docs/models/operations/v2createbulkrequest.md (1)
12-12
: UpdatedRequestBody
Requirement in Bulk Request
TheRequestBody
field is now marked as required (:heavy_check_mark:) and its type definition correctly links to[components.V2BulkElement](../../models/components/v2bulkelement.md)
. Double-check that the referenced documentation and the API processing logic have been adjusted to align with this new requirement.pkg/client/docs/models/operations/v2counttransactionsrequest.md (1)
10-10
: MandatoryRequestBody
in Count Transactions Request
The change to mark theRequestBody
field as required (:heavy_check_mark:) correctly aligns with the updates to other endpoints. Please ensure that this documentation change is mirrored by corresponding changes in the API logic and validation.pkg/client/docs/models/operations/v2getbalancesaggregatedrequest.md (1)
11-11
: Ensuring Consistency forRequestBody
Field
TheRequestBody
field is now required (:heavy_check_mark:). Verify that the field description (currently "N/A") and type match the API’s expected input format and that any examples provided elsewhere in documentation are updated accordingly.pkg/client/docs/models/operations/v2countaccountsrequest.md (1)
10-10
: Revised Documentation:RequestBody
is Now Mandatory
The update marks theRequestBody
field as required (:heavy_check_mark:), which brings it in line with other similar endpoints. Confirm that the type signature (map[string]*any*
) is consistent with backend expectations and that any associated validation or unit tests are updated.pkg/client/models/operations/v2listlogs.go (1)
67-68
: Behavior change to return empty map instead of nilThe
GetRequestBody
method now returns an empty map (map[string]any{}
) instead ofnil
when the receiver isnil
. This change ensures consistency with other request structures and prevents potential nil pointer dereferences when clients access the request body.pkg/client/docs/models/operations/v2listaccountsrequest.md (1)
13-13
: RequestBody field is now marked as requiredThe documentation has been updated to mark the
RequestBody
parameter as required (:heavy_check_mark:
) instead of optional (:heavy_minus_sign:
). This change aligns with the implementation where request bodies are now mandatory for this endpoint.pkg/client/docs/models/operations/v2listlogsrequest.md (1)
12-12
: RequestBody field is now marked as requiredThe documentation has been updated to mark the
RequestBody
parameter as required (:heavy_check_mark:
) instead of optional (:heavy_minus_sign:
). This change aligns with the implementation where request bodies are now mandatory for this endpoint, consistent with the code change inGetRequestBody()
that returns an empty map instead of nil.pkg/client/docs/models/operations/v2getinforesponse.md (1)
10-10
: Corrected V2ErrorResponse reference with proper linkThe reference for
V2ErrorResponse
has been updated from**sdkerrors.V2ErrorResponse*
to[*components.V2ErrorResponse](../../models/components/v2errorresponse.md)
. This correction provides a proper link to the documentation and reflects the transition from thesdkerrors
package to thecomponents
package for error responses.pkg/client/models/operations/v2addmetadataontransaction.go (1)
63-68
: Good defensive programming approach.Changing the nil return to an empty map improves robustness by ensuring callers always receive a valid map they can operate on without nil checks. This prevents potential nil pointer dereference errors and makes the API more consistent.
pkg/client/docs/models/operations/listaccountsresponse.md (1)
10-10
: Improved type reference documentation.Updating the ErrorResponse field reference from
**sdkerrors.ErrorResponse**
to a linked components reference improves documentation navigation and maintains consistency with the code changes. This change correctly reflects the transition from sdkerrors package to components.pkg/client/models/operations/v2listaccounts.go (1)
74-79
: Consistent defensive programming approach.Similar to other request types, changing the nil return to an empty map ensures API consistency and prevents potential nil pointer dereference errors. This is a good practice that makes the code more robust.
pkg/client/models/operations/v2getbalancesaggregated.go (1)
52-55
: Defensive approach for nil handlingGood change that returns an empty map instead of nil when the receiver is nil. This helps prevent nil pointer dereference errors in calling code that uses the return value directly without nil checks.
pkg/client/models/operations/v2listtransactions.go (1)
115-118
: Consistent nil handling improvementThis change follows the same pattern seen in other request types, returning an empty map instead of nil when the receiver is nil. This consistency across the codebase helps establish a reliable pattern for error prevention.
tools/generator/cmd/root.go (1)
179-186
:❓ Verification inconclusive
Changed from pointer to value struct initialization
The change from using a pointer to a direct value when initializing the V2CreateLedgerRequest field reflects a move toward value semantics rather than reference semantics, which can be more appropriate for request structures.
To ensure consistency across the codebase, let's check if other similar initializations follow this pattern:
🏁 Script executed:
#!/bin/bash # Check for patterns of struct initialization in the codebase # Look for other locations where V2CreateLedgerRequest is initialized echo "Checking V2CreateLedgerRequest initialization patterns:" rg --type go "V2CreateLedgerRequest\s*:\s*[&]?components\.V2CreateLedgerRequest\{"Length of output: 1076
Consistency Check for V2CreateLedgerRequest Initialization: Value Semantics Preferred
- The updated code in
tools/generator/cmd/root.go
now initializesV2CreateLedgerRequest
by value, aligning with the predominant pattern in other parts of the codebase.- A scan reveals that most locations (e.g., in
tools/provisioner/pkg/reconciler.go
, various test files, etc.) use value initialization, which supports the change.- However, note that the file
test/performance/env_testserver_test.go
still uses a pointer (&components.V2CreateLedgerRequest{}
). Please verify if this divergence is intentional or if it should also adopt value semantics for consistency.pkg/client/docs/models/components/errorresponse.md (1)
8-8
: LGTM: Clear documentation of the ErrorCode field.The ErrorCode field is well documented with appropriate type reference to ErrorsEnum and good example.
pkg/client/models/operations/v2counttransactions.go (1)
43-48
: Good defensive programming: returning empty map instead of nil.This change prevents potential nil pointer dereferences by ensuring that the GetRequestBody method always returns a valid map even when the receiver is nil. This is consistent with other similar methods in the file like GetHeaders.
pkg/client/models/operations/v2countaccounts.go (1)
43-48
: Good defensive programming: returning empty map instead of nil.This change prevents potential nil pointer dereferences by ensuring that the GetRequestBody method always returns a valid map even when the receiver is nil. This is consistent with other similar methods in the file like GetHeaders.
pkg/client/docs/models/operations/v2createledgerrequest.md (1)
6-9
:✅ Verification successful
Breaking change: V2CreateLedgerRequest is now required.
The V2CreateLedgerRequest field is now marked as required (
:heavy_check_mark:
) rather than optional. This is a breaking change for clients that may have previously omitted this field.Ensure all client code is updated to always provide this field, and consider communicating this requirement change to API consumers.
🏁 Script executed:
#!/bin/bash # Check for client code that might be creating V2CreateLedgerRequest without the required field grep -r "V2CreateLedgerRequest" --include="*.go" --exclude-dir="vendor" .Length of output: 7059
Breaking Change –
V2CreateLedgerRequest
Now MandatoryThe documentation now clearly indicates that the
V2CreateLedgerRequest
field is required. Our grep search through the client code confirms that all usages ofV2CreateLedgerRequest
already supply this field (for example, in both production and test code). Please ensure that any external API consumers and integrations are informed of this change since clients that previously omitted this field will experience failures.
- Verify and update client code/documentation if any legacy usage exists outside our current codebase.
- Communicate this breaking change to all relevant stakeholders.
pkg/client/docs/models/operations/v2updateledgermetadataresponse.md (1)
6-9
: Documentation updated correctly to reflect type changes.The table formatting has been improved for better readability, and the error response type has been changed from
sdkerrors.V2ErrorResponse
tocomponents.V2ErrorResponse
, which aligns with the broader refactoring of error handling in the codebase.test/e2e/app_logs_blocks_async_test.go (1)
56-61
: Request object instantiation changed from pointer to value.The change from using a pointer (
&components.V2CreateLedgerRequest
) to using a struct value directly is part of a consistent pattern across the codebase. This simplifies memory management and avoids unnecessary pointer indirection.pkg/client/docs/models/components/security.md (1)
6-10
:✅ Verification successful
Security fields changed from required to optional.
The documentation has been updated to mark security credentials (ClientID, ClientSecret, TokenURL) as optional (:heavy_minus_sign:) rather than required. This suggests changes in the underlying types from
string
to*string
.Ensure this change is reflected in client usage documentation and verify that existing client code can handle these fields being optional:
🏁 Script executed:
#!/bin/bash # Search for client code examples using Security credentials rg -l "ClientID|ClientSecret|TokenURL" --glob="*.md" pkg/client/docs/Length of output: 223
Security Docs and Client Usage Update Verified
The update marking
ClientID
,ClientSecret
, andTokenURL
as optional (using ➖) is consistently reflected in the security component documentation as well as in the client usage docs. Our search confirms that these fields appear across the relevant markdown files (including those underpkg/client/docs/sdks/v1/README.md
,pkg/client/docs/sdks/v2/README.md
, andpkg/client/docs/sdks/ledger/README.md
), and the change fromstring
to*string
is clearly documented.No further modifications are needed.
pkg/client/models/operations/v2getvolumeswithbalances.go (1)
92-97
:✅ Verification successful
Defensive programming: empty map returned instead of nil.
Changing the return value from
nil
tomap[string]any{}
when the receiver is nil prevents potential nil pointer dereference errors in calling code. This is a good defensive programming practice.Let's verify if similar changes have been applied consistently across all request types:
🏁 Script executed:
#!/bin/bash # Check if other request types have been updated with similar patterns grep -r "return map\[string\]any{}" --include="*.go" pkg/client/models/operations/Length of output: 620
Consistent Defensive Pattern Across Request Types
The change inpkg/client/models/operations/v2getvolumeswithbalances.go
(returning an empty map instead of nil) has been applied consistently across all request types, as verified by the grep results. No further modifications are required.test/performance/env_remote_ledger_test.go (1)
31-31
: Value-based struct initialization aligns with project styleThe change from pointer-based initialization to value-based initialization for
V2CreateLedgerRequest
aligns with similar changes throughout the codebase, creating a more consistent pattern for request object instantiation.test/stress/stress_test.go (1)
55-55
: Value-based struct initialization aligns with project styleThe change from pointer-based initialization to value-based initialization for
V2CreateLedgerRequest
follows the same pattern as in other parts of the codebase, ensuring consistency across the project.pkg/client/docs/sdks/ledger/README.md (4)
4-5
: Added helpful overview sectionAdding an overview section improves the document structure and helps users understand the available operations at a glance.
21-22
: Improved context handling in examplesAdding proper context imports and initialization in the examples follows Go best practices for context propagation.
Also applies to: 29-30
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
21-21: Hard tabs
Column: 1(MD010, no-hard-tabs)
22-22: Hard tabs
Column: 1(MD010, no-hard-tabs)
33-34
: Enhanced security with environment variablesUsing environment variables for sensitive credentials instead of hardcoded empty strings is a security best practice that prevents credential leakage in code.
Also applies to: 88-89
59-64
: Improved error documentationAdding dedicated error sections with standardized status code formatting (4XX, 5XX) provides more consistent and detailed information about possible error responses.
Also applies to: 114-119
pkg/client/docs/models/operations/v2importlogsrequest.md (1)
6-9
:✅ Verification successful
Updated request model structure
The model now requires a structured
V2ImportLogsRequest
object of typeany
instead of a simpleRequestBody
string. This change aligns with updates to the API, which now expects a more structured request for import logs.Verify that client code using this endpoint has been updated to match this new request structure.
🏁 Script executed:
#!/bin/bash # Check for usages of the import logs endpoint to ensure they've been updated # Look for any code using the import logs endpoint rg -A 5 "ImportLogs" --glob "*.go" | grep -v "V2ImportLogsRequest"Length of output: 3529
Client Code and Documentation Alignment Confirmed
The updated request model in
pkg/client/docs/models/operations/v2importlogsrequest.md
now correctly specifies a structuredV2ImportLogsRequest
object (typeany
) instead of a simple string. A search through the codebase confirms that all usages of the import logs endpoint (e.g., inpkg/testserver/api.go
andpkg/client/v2.go
) align with this change, with no residual usage of an outdated string model.
- The documentation table clearly reflects the new structure:
| Field | Type | Required | Description | Example | | --------------------- | --------------------- | --------------------- | --------------------- | --------------------- | | `Ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | | `V2ImportLogsRequest` | *any* | :heavy_check_mark: | N/A | |
- Client code references (as seen in the grep output) consistently use the import logs endpoint without any legacy request body patterns.
No further adjustments appear necessary.
pkg/client/docs/models/operations/v2addmetadataontransactionrequest.md (1)
12-12
:✅ Verification successful
API documentation update - RequestBody now required
The
RequestBody
field has been updated to a required status (:heavy_check_mark:
), which means it's now mandatory when making this API call. This is a significant change that ensures clients provide the necessary metadata when adding it to a transaction.
🏁 Script executed:
#!/bin/bash # Check if this change is consistent across other similar request models grep -r ':heavy_check_mark:' --include="*.md" pkg/client/docs/models/operations/ | grep 'RequestBody'Length of output: 9107
Confirm RequestBody Update Consistency
The updated documentation now correctly marks the
RequestBody
field as required, consistent with similar v2 request models. The verification output confirms that inpkg/client/docs/models/operations/v2addmetadataontransactionrequest.md
the field is shown with the required indicator (:heavy_check_mark:
) alongside the appropriate type and example value. No discrepancies were found across related endpoints.tools/provisioner/pkg/reconciler.go (1)
54-54
: Request initialization changed from pointer to valueThe
V2CreateLedgerRequest
is now initialized by value rather than pointer, which matches changes across the codebase to use a more consistent instantiation pattern.pkg/client/USAGE.md (3)
10-10
: Added import for environment variable supportAdded the necessary
os
package import to support retrieving credentials from environment variables, which is a good security practice.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
10-10: Hard tabs
Column: 1(MD010, no-hard-tabs)
14-15
: Context initialization moved to the beginning of the functionThe context initialization is now positioned earlier in the function, improving code readability and following best practices for variable initialization.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
14-14: Hard tabs
Column: 1(MD010, no-hard-tabs)
18-19
: Security credentials now use environment variablesCredentials are now retrieved from environment variables (
FORMANCE_CLIENT_ID
andFORMANCE_CLIENT_SECRET
) instead of using hardcoded empty strings. This is a significant security improvement as it:
- Prevents hardcoded credentials in source code
- Follows security best practices
- Makes the example more production-ready
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
18-18: Hard tabs
Column: 1(MD010, no-hard-tabs)
19-19: Hard tabs
Column: 1(MD010, no-hard-tabs)
pkg/client/formance.go (3)
44-46
: New generic pointer helper function addedAdded a generic
Pointer[T any]
helper function that works with any type, which is a good addition that complements the existing type-specific pointer helpers. This makes the API more flexible and simplifies pointer creation for various types.
149-151
: SDK version and related metadata updatedThe SDK version, generation version, and user agent string have been updated to reflect the current release. This is a standard maintenance update.
159-164
: Added environment variable fallback for security credentialsThis new code adds a fallback mechanism to automatically populate security credentials from environment variables if they're not explicitly provided. This is an excellent improvement that:
- Aligns with the updated usage example
- Promotes secure credential management
- Provides a more user-friendly experience by automatically detecting credentials
- Follows security best practices by encouraging environment variable usage
The implementation checks if security is nil before attempting to populate from environment variables, ensuring it only acts as a fallback.
pkg/client/models/operations/v2importlogs.go (1)
13-13
: Type safety concern withany
typeChanging from a specific type to
any
reduces type safety, which could lead to runtime errors if callers provide unexpected types. Consider adding validation in the setter methods or providing clear examples in documentation to guide proper usage.pkg/client/models/operations/v2getinfo.go (1)
14-14
: Switching from sdkerrors to components packageThe change from
*sdkerrors.V2ErrorResponse
to*components.V2ErrorResponse
looks good. This appears to be part of a broader reorganization of error handling. Ensure all references throughout the codebase have been updated for consistency.Also applies to: 31-36
pkg/client/models/components/errorresponse.go (2)
5-9
: New ErrorResponse structure looks goodThe
ErrorResponse
struct is well-defined with appropriate fields for error code, message, and optional details. The JSON tags are properly set.
11-30
: Consistent nil handling in gettersAll getter methods properly check if the receiver is nil before attempting to access its fields, which prevents potential nil dereference errors. This is good defensive programming.
pkg/client/models/components/v2errorresponse.go (2)
5-9
: V2ErrorResponse structure is well-definedThe struct provides a clear structure for V2 error responses with appropriate fields and JSON tags.
11-30
: Consistent getter implementations with null safetyThe getter methods are implemented consistently with proper nil checks, following the same pattern as in the
ErrorResponse
struct. This consistency across similar structures is good practice.pkg/client/README.md (5)
28-44
: Improved table of contents structure and organization.The addition of a max depth parameter for the TOC and the reorganization of sections provides better navigation through the documentation. This makes it easier for users to find relevant information.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
30-30: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
31-31: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
31-31: Link fragments should be valid
null(MD051, link-fragments)
32-32: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
33-33: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
34-34: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
35-35: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
36-36: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
37-37: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
38-38: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
39-39: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
40-40: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
41-41: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
42-42: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
68-78
: Security improvement: Using environment variables instead of hardcoded credentials.Great update to use environment variables for sensitive credentials instead of empty strings or hardcoded values. This follows security best practices and provides a better example for users.
Also applies to: 175-185, 219-240, 281-291, 403-413
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
68-68: Hard tabs
Column: 1(MD010, no-hard-tabs)
72-72: Hard tabs
Column: 1(MD010, no-hard-tabs)
74-74: Hard tabs
Column: 1(MD010, no-hard-tabs)
75-75: Hard tabs
Column: 1(MD010, no-hard-tabs)
76-76: Hard tabs
Column: 1(MD010, no-hard-tabs)
77-77: Hard tabs
Column: 1(MD010, no-hard-tabs)
78-78: Hard tabs
Column: 1(MD010, no-hard-tabs)
96-156
: Improved readability for operations documentation.Using a collapsible details section for available methods and adjusting heading hierarchy improves the readability of the documentation. This helps users navigate the available operations more efficiently.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
102-102: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
103-103: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
107-107: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
108-108: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
109-109: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
110-110: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
111-111: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
112-112: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
113-113: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
114-114: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
115-115: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
116-116: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
117-117: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
118-118: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
119-119: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
120-120: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
121-121: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
122-122: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
123-123: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
124-124: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
125-125: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
126-126: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
130-130: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
131-131: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
132-132: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
133-133: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
134-134: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
135-135: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
136-136: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
137-137: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
138-138: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
139-139: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
140-140: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
141-141: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
142-142: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
143-143: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
144-144: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
145-145: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
146-146: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
147-147: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
148-148: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
149-149: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
150-150: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
151-151: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
152-152: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
153-153: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
154-154: Unordered list style
Expected: dash; Actual: asterisk(MD004, ul-style)
258-267
: Enhanced error handling documentation.The detailed explanation of error handling with specific examples for the
GetInfo
function provides valuable guidance for users. The error table format is particularly useful for understanding the different error types that might be returned.🧰 Tools
🪛 LanguageTool
[uncategorized] ~260-~260: You might be missing the article “the” here.
Context: ...heir associated error. You can refer to respective Errors tables in SDK docs for more de...(AI_EN_LECTOR_MISSING_DETERMINER_THE)
[uncategorized] ~260-~260: You might be missing the article “the” here.
Context: ... refer to respective Errors tables in SDK docs for more details on possible error...(AI_EN_LECTOR_MISSING_DETERMINER_THE)
317-319
: Clarified server URL override functionality.The rephrasing of the server selection section to emphasize
WithServerURL
option instead of the previously mentionedWithServerIndex
makes the documentation more accurate and prevents confusion.test/e2e/api_ledgers_create_test.go (3)
43-43
: Consistent request initialization pattern.Changed from pointer to value initialization for
V2CreateLedgerRequest
. This appears to be part of a broader standardization effort across the codebase.
122-125
: Consistent request initialization pattern.Changed from pointer to value initialization for
V2CreateLedgerRequest
in the invalid bucket name test case. This is consistent with the changes in the other places.
133-136
: Consistent request initialization pattern.Changed from pointer to value initialization for
V2CreateLedgerRequest
in the alternate bucket test case. This maintains consistency with the pattern used elsewhere.pkg/client/ledger.go (5)
48-53
: Improved server URL handling.The updated logic for determining the
baseURL
now properly checks ifo.ServerURL
is nil, enhancing flexibility in URL handling. This prevents potential nil pointer dereferences and makes the code more robust.
59-65
: Enhanced hook context with BaseURL.Adding the
BaseURL
field to thehookCtx
improves the context available to hooks, which can be useful for logging, monitoring, and debugging purposes.
89-91
: Added support for custom headers.The new loop to set headers from
o.SetHeaders
map allows for more flexible HTTP request customization from consumer code.Also applies to: 314-316
123-128
: Improved error handling for request preparation.The updated error handling logic now differentiates between permanent and temporary errors using the
retry
package rather than always returning a permanent error. This allows for more nuanced retry behavior based on the error type.Also applies to: 348-353
193-196
: Consistent response body handling.Replaced direct response body reading with
utils.ConsumeRawBody(httpRes)
, ensuring consistent processing of the response body across both success and error handling paths. This is a good refactoring that eliminates potential duplicate code and standardizes the approach.Also applies to: 205-209, 214-219, 226-230, 235-239, 247-251, 418-422, 430-434, 439-443, 451-455
pkg/client/models/operations/v2updateledgermetadata.go (2)
22-27
: Improved GetRequestBody method for nil safety.The
GetRequestBody
method now returns an empty map instead ofnil
when the receiver isnil
. This is a defensive programming approach that prevents potential nil map panics when the caller tries to access the result.
32-33
: Updated error response type for consistency.Changed the type of
V2ErrorResponse
from*sdkerrors.V2ErrorResponse
to*components.V2ErrorResponse
, and updated the corresponding getter method. This change is part of a standardization effort for error handling across the codebase and improves consistency.Also applies to: 42-43
test/e2e/api_ledgers_import_test.go (4)
46-46
: Use of direct struct instantiation aligns with pointer removal.
Switching to a non-pointerV2CreateLedgerRequest
helps avoid nil-pointer pitfalls and streamlines usage.
65-66
: Good practice to pass logs as a byte slice.
Replacing a pointer or string with a[]byte
simplifies data handling and aligns with the enhanced log import flow.
221-221
: Consistent direct instantiation for ledger creation.
Using a value type forV2CreateLedgerRequest
is in line with the broader shift away from pointers and ensures consistent usage.
232-233
: Importing logs from an io.Reader promotes streaming.
Passing a reader directly supports the new streaming import mechanism. Consider verifying that the reader remains open for the required duration.pkg/client/internal/utils/security.go (4)
24-24
: NewEnv
field enhances environment variable support.
Storing the environment variable name insecurityTag
is a clean approach to dynamically populate security configurations.
327-327
: Clear initialization ofenv
variable.
This straightforward declaration supports the new environment-variable-driven security mechanism.
347-347
: Ensure robust handling forenv = parts[1]
.
Although this logic works for well-formed tags, consider verifying thatparts
has at least two elements to prevent panics with malformed tags.
360-360
: Storing environment variable reference fully completes tag parsing.
AssigningEnv: env
is consistent with the extendedsecurityTag
approach.pkg/client/models/operations/v2createledger.go (2)
11-12
: Direct usage forV2CreateLedgerRequest
removes null checks.
Defining this field as a value rather than a pointer ensures cleaner memory handling and more straightforward usage.
22-25
: Returning an empty struct instead ofnil
is safer.
This guards against nil-pointer dereferences by guaranteeing a valid struct, even if the request is uninitialized.pkg/client/models/operations/listaccounts.go (2)
36-36
: Doc comment update
The comment now uses a more concise "Deprecated:" label, aligning with common conventions. No functional changes.
118-118
: Matching getter return type
GetErrorResponse()
now returns the updated*components.ErrorResponse
, maintaining consistency with the field.pkg/client/internal/utils/utils.go (4)
6-6
: New imports to support response handling and environment variables
These imports ("bytes", "net/http", and "os") are introduced for utility operations such as reading and restoring HTTP response bodies and reading environment variables.Also applies to: 11-11, 12-12
143-151
: Parsing 'const' tag
Straightforward extraction of the"const"
struct tag. Implementation looks good.
153-161
: Parsing 'default' tag
Similar approach for"default"
struct tags. No issues noted.
350-360
: Reuse response body
ConsumeRawBody
correctly reads the body, closes it, and replaces it with a newio.NopCloser
. This pattern ensures the body can be read again if needed.pkg/client/models/components/security.go (4)
10-12
: Pointer-based security fields
SwitchingClientID
,ClientSecret
, andTokenURL
to pointers clarifies optional vs. required fields.
26-31
: Graceful handling of nil receiver
GetClientID
now returnsnil
if theSecurity
instance isnil
, aligning with the pointer-based field.
33-38
: Consistent pointer return
GetClientSecret
follows the same pointer approach, ensuring safety whenSecurity
is uninitialized.
40-45
: Optional TokenURL
Returningnil
forGetTokenurl("")
if the struct is uninitialized is coherent with the new pointer design.pkg/client/internal/utils/retries.go (3)
10-11
: Jitter-related imports
Addingmath
andmath/rand
supports exponential backoff logic with jitter. This is appropriate for robust retry behavior.
30-104
: Refined retry flow
Retry
delegates toretryWithBackoff
for the "backoff" strategy. Closingresp.Body
after each attempt avoids resource leaks.
106-220
: Modular exponential backoff with jitter
retryWithBackoff
and the newTimer
interface cleanly implement a customizable retry loop. The jitter logic helps prevent synchronized retries.pkg/client/internal/hooks/clientcredentials.go (4)
13-13
: Use of new imports for concurrency and reflectionThese imports (
golang.org/x/sync/singleflight
,reflect
, andsync
) suggest a shift in architecture to handle concurrency (token refresh deduplication and parallel session management) and to dynamically inspect token URL fields. Ensure that reflection usage is well-justified, as it can be more brittle and expensive than direct field references over the long term.Also applies to: 17-17, 19-19
73-87
: Streamlined OAuth credentials retrieval in BeforeRequestYou’ve introduced
getCredentials
andgetSession
calls here to handle credential loading/construction and manage token lifecycles. This is a clean separation of concerns. Double-check that error handling covers all corner cases (e.g., missing or invalid credentials leading toFailEarly
).
103-114
: Invalidate sessions on unauthorized responsesForgetting the singleflight entry and deleting the session on
401
helps ensure an immediate retry with fresh credentials. Verify that you’re not inadvertently removing sessions that might still be valid for other scopes, but from this snippet it looks consistent with your logic.
226-261
: Singleflight-based session retrieval and refresh logicThe function
getSession
correctly handles:
• Checking if existing tokens need new scopes or are expired.
• LeveragingsessionsGroup.Do
to avoid multiple simultaneous token requests.
• Handling invalidation flows properly.Make sure the token is promptly removed from the session cache if the refresh fails, avoiding stale sessions. Overall, this is a robust concurrency strategy.
pkg/client/v1.go (7)
14-14
: Introduction of retry packageUsing
github.com/formancehq/ledger/pkg/client/retry
signals a more structured approach to transient error handling. Validate that it appropriately distinguishes between permanent vs. temporary errors to avoid unbounded retries in production.
43-48
: Base URL determination in GetInfoSwitching to a dynamic base URL (
baseURL = *o.ServerURL
vs. fallback) is flexible. Just ensure that if users specify an invalid URL ino.ServerURL
, you have robust error logging so they can diagnose misconfiguration.
54-60
: Creating HookContext with additional metadataProviding
BaseURL
,OperationID
, andOAuth2Scopes
to hooks gives them context about the request. This is a good extension that simplifies subsequent error, logging, or instrumentation hooks.
84-86
: Applying custom headers from SetHeadersAllowing the user to inject custom headers via an option is flexible. Double-check for potential header collisions or security-related overrides, e.g., clobbering authorization or content-type inadvertently.
118-123
: Retry logic for permanent vs. temporary errors in GetInfoYou’ve introduced checks for
retry.IsPermanentError
/retry.IsTemporaryError
. Ensure that all relevant error cases are properly classified, or you might inadvertently block necessary retries or attempt to retry hopeless errors.
188-192
: Consuming raw HTTP response bodies in GetInfoUsing
utils.ConsumeRawBody
is safer than partial reads for JSON decoding. Properly capturing the raw body also simplifies error handling if you need to surface the entire payload to end-users. Just be aware of memory usage for very large responses.Also applies to: 200-205
247-253
: ** Repeated pattern in subsequent methods**All subsequent methods (e.g.,
GetLedgerInfo
,CountAccounts
,ListAccounts
, etc.) use similar logic for:
• DeterminingbaseURL
.
• Constructing aHookContext
.
• Overriding headers witho.SetHeaders
.
• Usingretry
to differentiate permanent vs. temporary errors.
• Consuming raw HTTP responses viautils.ConsumeRawBody
.The general considerations, benefits, and caveats outlined in previous comments apply here as well.
Also applies to: 258-264, 288-290, 322-327, 392-396, 404-409, 412-417, 425-430, 448-456, 473-478, 488-490, 497-499, 530-535, 721-726, 946-951, 1157-1162, 1341-1346, 2167-2173, 2359-2364, 3596-3601, 3804-3809
pkg/client/docs/sdks/v1/README.md (2)
4-5
: Add Overview Section
The new "## Overview" section provides a clear introduction to the V1 documentation and helps set the stage for the available operations.
35-64
: Consistent Context and Credential Handling in Examples
Across the examples (e.g. for GetInfo, GetLedgerInfo, CountAccounts, etc.), the code now initializes a background context usingcontext.Background()
and retrieves security credentials viaos.Getenv
. This update improves cancellation support and avoids hardcoded credentials, enhancing both security and maintainability.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
39-39: Hard tabs
Column: 1(MD010, no-hard-tabs)
40-40: Hard tabs
Column: 1(MD010, no-hard-tabs)
41-41: Hard tabs
Column: 1(MD010, no-hard-tabs)
42-42: Hard tabs
Column: 1(MD010, no-hard-tabs)
43-43: Hard tabs
Column: 1(MD010, no-hard-tabs)
pkg/client/docs/sdks/v2/README.md (2)
4-5
: Add Overview Section
The addition of the "## Overview" section at the beginning of the V2 document offers readers an immediate summary of available operations, improving overall documentation clarity.
40-73
: Enhanced Example Consistency in V2
The updated examples (e.g. in the ListLedgers section) now consistently initialize a background context and obtain credentials from environment variables. This reinforces best practices for security and concurrency across the SDK documentation.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
44-44: Hard tabs
Column: 1(MD010, no-hard-tabs)
45-45: Hard tabs
Column: 1(MD010, no-hard-tabs)
46-46: Hard tabs
Column: 1(MD010, no-hard-tabs)
47-47: Hard tabs
Column: 1(MD010, no-hard-tabs)
48-48: Hard tabs
Column: 1(MD010, no-hard-tabs)
49-49: Hard tabs
Column: 1(MD010, no-hard-tabs)
| `RequestBody` | map[string]*any* | :heavy_check_mark: | N/A | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
❓ Verification inconclusive
Important API contract change - RequestBody now required
This documentation update correctly reflects that the RequestBody
field is now mandatory for this operation. This represents a breaking change to the API contract, so all client implementations must be updated to always provide this field when calling this endpoint.
Does this breaking change have a corresponding note in the CHANGELOG or release notes to alert users they'll need to update their code?
🏁 Script executed:
#!/bin/bash
# Check for changelog entries related to this breaking change
grep -r "RequestBody" --include="CHANGELOG*" .
Length of output: 46
Breaking API Contract: Mandatory RequestBody Change
This documentation update correctly reflects that the RequestBody
field in the V2GetVolumesWithBalancesRequest
structure is now required, representing a breaking change that will impact client implementations. However, the grep check for any related changelog entries returned no output. Please manually verify if a corresponding entry exists in the CHANGELOG or release notes. If one is missing, update the documentation to alert users of this breaking change.
- File:
pkg/client/docs/models/operations/v2getvolumeswithbalancesrequest.md
(line 15) - Action Required: Confirm and, if necessary, add a relevant changelog entry to notify users of the API contract update.
| `RequestBody` | map[string]*string* | :heavy_check_mark: | N/A | {<br/>"admin": "true"<br/>} | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API breaking change: RequestBody now required
The RequestBody field is now marked as required (:heavy_check_mark:
) whereas it was previously optional. This is a breaking change that could affect existing clients that don't always provide a request body when updating ledger metadata.
Ensure this change is clearly documented in release notes or migration guides to help users update their implementations accordingly.
@@ -99,7 +98,7 @@ type ListAccountsResponse struct { | |||
// OK | |||
AccountsCursorResponse *components.AccountsCursorResponse | |||
// Not found | |||
ErrorResponse *sdkerrors.ErrorResponse | |||
ErrorResponse *components.ErrorResponse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Switching from sdkerrors.ErrorResponse
to components.ErrorResponse
Changing the field type to *components.ErrorResponse
is valid if all references to sdkerrors.ErrorResponse
have been migrated.
Use the following script to confirm no stale references remain:
🏁 Script executed:
#!/bin/bash
rg "sdkerrors\.ErrorResponse" -A 5
Length of output: 13454
Action Required: Incomplete Migration of sdkerrors.ErrorResponse
- The change in
pkg/client/models/operations/listaccounts.go
(line 101) to use*components.ErrorResponse
is correctly applied. - However, our search shows multiple references to
sdkerrors.ErrorResponse
inpkg/client/v1.go
(and in the SDK documentation underpkg/client/docs/sdks/v1/README.md
). - Please verify whether these remaining references should also be migrated to
components.ErrorResponse
to maintain consistency, or if there is an intentional reason to leave them unchanged.
b135de7
to
46b6c29
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (13)
pkg/client/retry/config.go (1)
57-94
: Well-implemented TemporaryError with proper retry semantics.The TemporaryError implementation is solid with a good separation of creation methods and clear semantics. The RetryAfter method provides a clean API for retry loops.
There's a small typo in the comment though:
-// value should be interpreted by retry loops to mean they should fallback on -// their default policy whether expenonential, constant backoff or something +// value should be interpreted by retry loops to mean they should fallback on +// their default policy whether exponential, constant backoff or somethingpkg/client/docs/sdks/ledger/README.md (2)
21-22
: Import Formatting Improvement
The Go code import block now uses hard tabs, which trigger markdownlint warnings. Consider replacing hard tabs with spaces to comply with common Markdown formatting guidelines.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
21-21: Hard tabs
Column: 1(MD010, no-hard-tabs)
22-22: Hard tabs
Column: 1(MD010, no-hard-tabs)
76-77
: Import Formatting Improvement in GetMetrics Example
Similar to the GetInfo snippet, the import block in the GetMetrics example uses hard tabs. Replacing these with spaces will enhance consistency and address markdownlint MD010 warnings.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
76-76: Hard tabs
Column: 1(MD010, no-hard-tabs)
77-77: Hard tabs
Column: 1(MD010, no-hard-tabs)
docs/api/README.md (1)
4453-4453
: Documentation formatting issue with duplicate headingsThe static analysis tool found a duplicate heading at line 4453. Consider checking and fixing this to ensure the documentation renders correctly in all Markdown viewers.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
4453-4453: Multiple headings with the same content
null(MD024, no-duplicate-heading)
pkg/client/docs/models/components/errorresponse.md (1)
1-10
: Well-structured documentation for the ErrorResponse model.The documentation clearly defines the ErrorResponse model with its fields, types, requirements, and examples.
However, there's a minor issue with the
Details
field example - it contains a bare URL that should be formatted as a proper markdown link according to best practices.-| `Details` | **string* | :heavy_minus_sign: | N/A | https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9 | +| `Details` | **string* | :heavy_minus_sign: | N/A | [Example Link](https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9) |🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
10-10: Bare URL used
null(MD034, no-bare-urls)
pkg/client/README.md (1)
258-268
: Improved error handling documentation with specific examples.The updated error handling section provides clearer expectations about possible errors and includes specific examples. However, there's a minor grammar issue in the sentence.
Consider adding "the" before "respective":
-By Default, an API error will return `sdkerrors.SDKError`. When custom error responses are specified for an operation, the SDK may also return their associated error. You can refer to respective *Errors* tables in SDK docs for more details on possible error types for each operation. +By Default, an API error will return `sdkerrors.SDKError`. When custom error responses are specified for an operation, the SDK may also return their associated error. You can refer to the respective *Errors* tables in SDK docs for more details on possible error types for each operation.🧰 Tools
🪛 LanguageTool
[uncategorized] ~260-~260: You might be missing the article “the” here.
Context: ...heir associated error. You can refer to respective Errors tables in SDK docs for more de...(AI_EN_LECTOR_MISSING_DETERMINER_THE)
[uncategorized] ~260-~260: You might be missing the article “the” here.
Context: ... refer to respective Errors tables in SDK docs for more details on possible error...(AI_EN_LECTOR_MISSING_DETERMINER_THE)
pkg/client/internal/utils/utils.go (1)
350-360
: Implemented safe response body consumption.The
ConsumeRawBody
function allows reading an HTTP response body while ensuring it can be read again later by restoring it with a buffer. This prevents common issues with body consumption in HTTP clients.However, there's a potential resource leak if the read fails before closing the original body.
Consider using a defer statement to ensure the body is always closed:
func ConsumeRawBody(res *http.Response) ([]byte, error) { + defer res.Body.Close() rawBody, err := io.ReadAll(res.Body) if err != nil { return nil, fmt.Errorf("error reading response body: %w", err) } - res.Body.Close() res.Body = io.NopCloser(bytes.NewBuffer(rawBody)) return rawBody, nil }pkg/client/internal/utils/retries.go (2)
30-104
: Refined retry logic inRetry
function looks solid but watch for double-close of response Body.
Inside the retry closure, the code attempts to close the previous response body before each retry. Ensure the final returned response is not prematurely closed, especially if the code might be reused outside of this call sequence.Consider wrapping response-body management in a small helper to avoid accidental double closes.
196-220
:nextInterval
correctly integrates jitter, but watch for uniform distribution.
Using a 50% chance to negate the jitter is typically fine, but ensure this random distribution meets your needs (sometimes an exponential distribution is more appropriate).If you want more advanced distribution control, consider abstracting the jitter logic behind an interface.
pkg/client/internal/hooks/clientcredentials.go (1)
203-217
: Handling nilTokenURL
by reading the tag's default.
This is a neat fallback for uninitialized security structs. Double-check that no code path expects a strictly non-nilTokenURL
before assignment.You could log or warn if the fallback is used, to help detect misconfigurations in test or production environments.
pkg/client/v1.go (3)
43-48
: Handling of custom server URLs vs. default.
This fallback logic is consistent, but please confirm the environment variable flow or user-supplied server URL is tested.Add a small test to ensure that if
ServerURL
is specified, it overrides the default in all relevant endpoints.
201-205
:utils.PopulateSecurity
usage
All calls appear consistent. Remember to handle the new pointer-based fields fromSecurity
if any are unset.Unit test with partial or missing credentials to ensure the code gracefully handles nil pointers.
1671-1671
: Deprecation notice forRunScript
.
The inline comment is clear. Confirm you have a timeline or plan to remove or forward traffic.Would you want help drafting a migration plan for users who rely on
RunScript
?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (10)
openapi.yaml
is excluded by!**/*.yaml
openapi/v1.yaml
is excluded by!**/*.yaml
openapi/v2.yaml
is excluded by!**/*.yaml
pkg/client/.speakeasy/gen.lock
is excluded by!**/*.lock
,!**/*.lock
pkg/client/.speakeasy/gen.yaml
is excluded by!**/*.yaml
pkg/client/go.mod
is excluded by!**/*.mod
pkg/client/go.sum
is excluded by!**/*.sum
,!**/*.sum
tools/generator/go.mod
is excluded by!**/*.mod
tools/provisioner/go.mod
is excluded by!**/*.mod
tools/provisioner/go.sum
is excluded by!**/*.sum
,!**/*.sum
📒 Files selected for processing (75)
docs/api/README.md
(14 hunks)flake.nix
(1 hunks)pkg/client/.gitignore
(1 hunks)pkg/client/README.md
(14 hunks)pkg/client/USAGE.md
(1 hunks)pkg/client/docs/models/components/errorresponse.md
(1 hunks)pkg/client/docs/models/components/security.md
(1 hunks)pkg/client/docs/models/components/v2errorresponse.md
(1 hunks)pkg/client/docs/models/operations/addmetadataontransactionrequest.md
(1 hunks)pkg/client/docs/models/operations/listaccountsresponse.md
(1 hunks)pkg/client/docs/models/operations/v2addmetadataontransactionrequest.md
(1 hunks)pkg/client/docs/models/operations/v2countaccountsrequest.md
(1 hunks)pkg/client/docs/models/operations/v2counttransactionsrequest.md
(1 hunks)pkg/client/docs/models/operations/v2createbulkrequest.md
(1 hunks)pkg/client/docs/models/operations/v2createledgerrequest.md
(1 hunks)pkg/client/docs/models/operations/v2getbalancesaggregatedrequest.md
(1 hunks)pkg/client/docs/models/operations/v2getinforesponse.md
(1 hunks)pkg/client/docs/models/operations/v2getvolumeswithbalancesrequest.md
(1 hunks)pkg/client/docs/models/operations/v2importlogsrequest.md
(1 hunks)pkg/client/docs/models/operations/v2listaccountsrequest.md
(1 hunks)pkg/client/docs/models/operations/v2listlogsrequest.md
(1 hunks)pkg/client/docs/models/operations/v2listtransactionsrequest.md
(1 hunks)pkg/client/docs/models/operations/v2updateledgermetadatarequest.md
(1 hunks)pkg/client/docs/models/operations/v2updateledgermetadataresponse.md
(1 hunks)pkg/client/docs/models/sdkerrors/errorresponse.md
(0 hunks)pkg/client/docs/models/sdkerrors/v2errorresponse.md
(0 hunks)pkg/client/docs/sdks/formance/README.md
(0 hunks)pkg/client/docs/sdks/ledger/README.md
(5 hunks)pkg/client/docs/sdks/v1/README.md
(46 hunks)pkg/client/docs/sdks/v2/README.md
(53 hunks)pkg/client/formance.go
(2 hunks)pkg/client/internal/hooks/clientcredentials.go
(8 hunks)pkg/client/internal/hooks/hooks.go
(1 hunks)pkg/client/internal/utils/env.go
(1 hunks)pkg/client/internal/utils/form.go
(1 hunks)pkg/client/internal/utils/json.go
(2 hunks)pkg/client/internal/utils/queryparams.go
(5 hunks)pkg/client/internal/utils/requestbody.go
(7 hunks)pkg/client/internal/utils/retries.go
(5 hunks)pkg/client/internal/utils/security.go
(7 hunks)pkg/client/internal/utils/utils.go
(6 hunks)pkg/client/ledger.go
(9 hunks)pkg/client/models/components/errorresponse.go
(1 hunks)pkg/client/models/components/security.go
(2 hunks)pkg/client/models/components/v2bulkelement.go
(1 hunks)pkg/client/models/components/v2bulkelementresult.go
(1 hunks)pkg/client/models/components/v2errorresponse.go
(1 hunks)pkg/client/models/components/v2targetid.go
(1 hunks)pkg/client/models/operations/listaccounts.go
(3 hunks)pkg/client/models/operations/options.go
(3 hunks)pkg/client/models/operations/v2addmetadataontransaction.go
(1 hunks)pkg/client/models/operations/v2countaccounts.go
(1 hunks)pkg/client/models/operations/v2counttransactions.go
(1 hunks)pkg/client/models/operations/v2createbulk.go
(1 hunks)pkg/client/models/operations/v2createledger.go
(2 hunks)pkg/client/models/operations/v2getbalancesaggregated.go
(1 hunks)pkg/client/models/operations/v2getinfo.go
(2 hunks)pkg/client/models/operations/v2getvolumeswithbalances.go
(1 hunks)pkg/client/models/operations/v2importlogs.go
(2 hunks)pkg/client/models/operations/v2listaccounts.go
(1 hunks)pkg/client/models/operations/v2listlogs.go
(1 hunks)pkg/client/models/operations/v2listtransactions.go
(1 hunks)pkg/client/models/operations/v2updateledgermetadata.go
(2 hunks)pkg/client/models/sdkerrors/errorresponse.go
(0 hunks)pkg/client/models/sdkerrors/v2errorresponse.go
(0 hunks)pkg/client/retry/config.go
(1 hunks)pkg/client/types/pointers.go
(1 hunks)pkg/client/v1.go
(84 hunks)test/e2e/api_ledgers_create_test.go
(3 hunks)test/e2e/api_ledgers_import_test.go
(4 hunks)test/e2e/app_logs_blocks_async_test.go
(1 hunks)test/performance/env_remote_ledger_test.go
(1 hunks)test/stress/stress_test.go
(1 hunks)tools/generator/cmd/root.go
(1 hunks)tools/provisioner/pkg/reconciler.go
(1 hunks)
💤 Files with no reviewable changes (5)
- pkg/client/models/sdkerrors/errorresponse.go
- pkg/client/docs/sdks/formance/README.md
- pkg/client/docs/models/sdkerrors/errorresponse.md
- pkg/client/docs/models/sdkerrors/v2errorresponse.md
- pkg/client/models/sdkerrors/v2errorresponse.go
🚧 Files skipped from review as they are similar to previous changes (53)
- pkg/client/.gitignore
- pkg/client/internal/utils/env.go
- pkg/client/docs/models/operations/v2updateledgermetadatarequest.md
- pkg/client/types/pointers.go
- pkg/client/docs/models/operations/v2counttransactionsrequest.md
- pkg/client/docs/models/operations/addmetadataontransactionrequest.md
- pkg/client/docs/models/operations/v2createledgerrequest.md
- pkg/client/docs/models/operations/v2getvolumeswithbalancesrequest.md
- pkg/client/docs/models/operations/v2listlogsrequest.md
- pkg/client/models/operations/v2addmetadataontransaction.go
- pkg/client/docs/models/operations/v2addmetadataontransactionrequest.md
- pkg/client/docs/models/operations/v2updateledgermetadataresponse.md
- pkg/client/docs/models/operations/v2countaccountsrequest.md
- pkg/client/docs/models/operations/v2createbulkrequest.md
- test/stress/stress_test.go
- pkg/client/models/operations/v2listaccounts.go
- pkg/client/models/operations/v2createbulk.go
- pkg/client/models/operations/v2listtransactions.go
- tools/generator/cmd/root.go
- test/performance/env_remote_ledger_test.go
- test/e2e/app_logs_blocks_async_test.go
- pkg/client/models/operations/v2getvolumeswithbalances.go
- pkg/client/models/operations/v2counttransactions.go
- pkg/client/models/operations/v2countaccounts.go
- pkg/client/models/operations/v2importlogs.go
- pkg/client/models/components/v2targetid.go
- pkg/client/models/operations/v2listlogs.go
- pkg/client/docs/models/components/v2errorresponse.md
- pkg/client/docs/models/components/security.md
- pkg/client/internal/utils/json.go
- pkg/client/ledger.go
- pkg/client/USAGE.md
- pkg/client/models/operations/v2updateledgermetadata.go
- pkg/client/docs/models/operations/listaccountsresponse.md
- pkg/client/internal/utils/form.go
- pkg/client/models/operations/v2getinfo.go
- pkg/client/models/components/v2errorresponse.go
- pkg/client/internal/hooks/hooks.go
- pkg/client/docs/models/operations/v2getbalancesaggregatedrequest.md
- pkg/client/docs/models/operations/v2listtransactionsrequest.md
- test/e2e/api_ledgers_create_test.go
- tools/provisioner/pkg/reconciler.go
- pkg/client/docs/models/operations/v2getinforesponse.md
- pkg/client/models/operations/v2getbalancesaggregated.go
- pkg/client/models/operations/listaccounts.go
- pkg/client/models/components/v2bulkelementresult.go
- test/e2e/api_ledgers_import_test.go
- pkg/client/docs/models/operations/v2importlogsrequest.md
- pkg/client/models/components/errorresponse.go
- pkg/client/models/operations/v2createledger.go
- pkg/client/models/components/v2bulkelement.go
- flake.nix
- pkg/client/docs/models/operations/v2listaccountsrequest.md
🧰 Additional context used
🪛 LanguageTool
pkg/client/README.md
[uncategorized] ~260-~260: You might be missing the article “the” here.
Context: ...heir associated error. You can refer to respective Errors tables in SDK docs for more de...
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
[uncategorized] ~260-~260: You might be missing the article “the” here.
Context: ... refer to respective Errors tables in SDK docs for more details on possible error...
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
🪛 markdownlint-cli2 (0.17.2)
docs/api/README.md
4453-4453: Multiple headings with the same content
null
(MD024, no-duplicate-heading)
pkg/client/docs/sdks/v1/README.md
39-39: Hard tabs
Column: 1
(MD010, no-hard-tabs)
40-40: Hard tabs
Column: 1
(MD010, no-hard-tabs)
41-41: Hard tabs
Column: 1
(MD010, no-hard-tabs)
42-42: Hard tabs
Column: 1
(MD010, no-hard-tabs)
43-43: Hard tabs
Column: 1
(MD010, no-hard-tabs)
94-94: Hard tabs
Column: 1
(MD010, no-hard-tabs)
95-95: Hard tabs
Column: 1
(MD010, no-hard-tabs)
96-96: Hard tabs
Column: 1
(MD010, no-hard-tabs)
97-97: Hard tabs
Column: 1
(MD010, no-hard-tabs)
98-98: Hard tabs
Column: 1
(MD010, no-hard-tabs)
99-99: Hard tabs
Column: 1
(MD010, no-hard-tabs)
153-153: Hard tabs
Column: 1
(MD010, no-hard-tabs)
154-154: Hard tabs
Column: 1
(MD010, no-hard-tabs)
155-155: Hard tabs
Column: 1
(MD010, no-hard-tabs)
156-156: Hard tabs
Column: 1
(MD010, no-hard-tabs)
157-157: Hard tabs
Column: 1
(MD010, no-hard-tabs)
158-158: Hard tabs
Column: 1
(MD010, no-hard-tabs)
265-265: Hard tabs
Column: 1
(MD010, no-hard-tabs)
266-266: Hard tabs
Column: 1
(MD010, no-hard-tabs)
267-267: Hard tabs
Column: 1
(MD010, no-hard-tabs)
268-268: Hard tabs
Column: 1
(MD010, no-hard-tabs)
269-269: Hard tabs
Column: 1
(MD010, no-hard-tabs)
270-270: Hard tabs
Column: 1
(MD010, no-hard-tabs)
382-382: Hard tabs
Column: 1
(MD010, no-hard-tabs)
383-383: Hard tabs
Column: 1
(MD010, no-hard-tabs)
384-384: Hard tabs
Column: 1
(MD010, no-hard-tabs)
385-385: Hard tabs
Column: 1
(MD010, no-hard-tabs)
386-386: Hard tabs
Column: 1
(MD010, no-hard-tabs)
387-387: Hard tabs
Column: 1
(MD010, no-hard-tabs)
442-442: Hard tabs
Column: 1
(MD010, no-hard-tabs)
443-443: Hard tabs
Column: 1
(MD010, no-hard-tabs)
444-444: Hard tabs
Column: 1
(MD010, no-hard-tabs)
445-445: Hard tabs
Column: 1
(MD010, no-hard-tabs)
446-446: Hard tabs
Column: 1
(MD010, no-hard-tabs)
447-447: Hard tabs
Column: 1
(MD010, no-hard-tabs)
505-505: Hard tabs
Column: 1
(MD010, no-hard-tabs)
506-506: Hard tabs
Column: 1
(MD010, no-hard-tabs)
507-507: Hard tabs
Column: 1
(MD010, no-hard-tabs)
508-508: Hard tabs
Column: 1
(MD010, no-hard-tabs)
509-509: Hard tabs
Column: 1
(MD010, no-hard-tabs)
510-510: Hard tabs
Column: 1
(MD010, no-hard-tabs)
564-564: Hard tabs
Column: 1
(MD010, no-hard-tabs)
565-565: Hard tabs
Column: 1
(MD010, no-hard-tabs)
566-566: Hard tabs
Column: 1
(MD010, no-hard-tabs)
567-567: Hard tabs
Column: 1
(MD010, no-hard-tabs)
568-568: Hard tabs
Column: 1
(MD010, no-hard-tabs)
569-569: Hard tabs
Column: 1
(MD010, no-hard-tabs)
638-638: Hard tabs
Column: 1
(MD010, no-hard-tabs)
639-639: Hard tabs
Column: 1
(MD010, no-hard-tabs)
640-640: Hard tabs
Column: 1
(MD010, no-hard-tabs)
641-641: Hard tabs
Column: 1
(MD010, no-hard-tabs)
642-642: Hard tabs
Column: 1
(MD010, no-hard-tabs)
643-643: Hard tabs
Column: 1
(MD010, no-hard-tabs)
664-664: Hard tabs
Column: 14
(MD010, no-hard-tabs)
665-665: Hard tabs
Column: 14
(MD010, no-hard-tabs)
712-712: Hard tabs
Column: 1
(MD010, no-hard-tabs)
713-713: Hard tabs
Column: 1
(MD010, no-hard-tabs)
714-714: Hard tabs
Column: 1
(MD010, no-hard-tabs)
715-715: Hard tabs
Column: 1
(MD010, no-hard-tabs)
716-716: Hard tabs
Column: 1
(MD010, no-hard-tabs)
717-717: Hard tabs
Column: 1
(MD010, no-hard-tabs)
771-771: Hard tabs
Column: 1
(MD010, no-hard-tabs)
772-772: Hard tabs
Column: 1
(MD010, no-hard-tabs)
773-773: Hard tabs
Column: 1
(MD010, no-hard-tabs)
774-774: Hard tabs
Column: 1
(MD010, no-hard-tabs)
775-775: Hard tabs
Column: 1
(MD010, no-hard-tabs)
776-776: Hard tabs
Column: 1
(MD010, no-hard-tabs)
835-835: Hard tabs
Column: 1
(MD010, no-hard-tabs)
836-836: Hard tabs
Column: 1
(MD010, no-hard-tabs)
837-837: Hard tabs
Column: 1
(MD010, no-hard-tabs)
838-838: Hard tabs
Column: 1
(MD010, no-hard-tabs)
839-839: Hard tabs
Column: 1
(MD010, no-hard-tabs)
840-840: Hard tabs
Column: 1
(MD010, no-hard-tabs)
901-901: Hard tabs
Column: 1
(MD010, no-hard-tabs)
902-902: Hard tabs
Column: 1
(MD010, no-hard-tabs)
903-903: Hard tabs
Column: 1
(MD010, no-hard-tabs)
904-904: Hard tabs
Column: 1
(MD010, no-hard-tabs)
905-905: Hard tabs
Column: 1
(MD010, no-hard-tabs)
906-906: Hard tabs
Column: 1
(MD010, no-hard-tabs)
907-907: Hard tabs
Column: 1
(MD010, no-hard-tabs)
949-949: Hard tabs
Column: 18
(MD010, no-hard-tabs)
950-950: Hard tabs
Column: 18
(MD010, no-hard-tabs)
998-998: Hard tabs
Column: 1
(MD010, no-hard-tabs)
999-999: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1000-1000: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1001-1001: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1002-1002: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1003-1003: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1004-1004: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1059-1059: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1060-1060: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1061-1061: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1062-1062: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1063-1063: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1064-1064: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1065-1065: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1123-1123: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1124-1124: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1125-1125: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1126-1126: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1127-1127: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1128-1128: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1129-1129: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1184-1184: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1185-1185: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1186-1186: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1187-1187: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1188-1188: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1189-1189: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1190-1190: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1271-1271: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1272-1272: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1273-1273: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1274-1274: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1275-1275: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1276-1276: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1333-1333: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1334-1334: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1335-1335: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1336-1336: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1337-1337: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1338-1338: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1393-1393: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1394-1394: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1395-1395: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1396-1396: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1397-1397: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1398-1398: Hard tabs
Column: 1
(MD010, no-hard-tabs)
pkg/client/docs/sdks/v2/README.md
44-44: Hard tabs
Column: 1
(MD010, no-hard-tabs)
45-45: Hard tabs
Column: 1
(MD010, no-hard-tabs)
46-46: Hard tabs
Column: 1
(MD010, no-hard-tabs)
47-47: Hard tabs
Column: 1
(MD010, no-hard-tabs)
48-48: Hard tabs
Column: 1
(MD010, no-hard-tabs)
49-49: Hard tabs
Column: 1
(MD010, no-hard-tabs)
104-104: Hard tabs
Column: 1
(MD010, no-hard-tabs)
105-105: Hard tabs
Column: 1
(MD010, no-hard-tabs)
106-106: Hard tabs
Column: 1
(MD010, no-hard-tabs)
107-107: Hard tabs
Column: 1
(MD010, no-hard-tabs)
108-108: Hard tabs
Column: 1
(MD010, no-hard-tabs)
109-109: Hard tabs
Column: 1
(MD010, no-hard-tabs)
163-163: Hard tabs
Column: 1
(MD010, no-hard-tabs)
164-164: Hard tabs
Column: 1
(MD010, no-hard-tabs)
165-165: Hard tabs
Column: 1
(MD010, no-hard-tabs)
166-166: Hard tabs
Column: 1
(MD010, no-hard-tabs)
167-167: Hard tabs
Column: 1
(MD010, no-hard-tabs)
168-168: Hard tabs
Column: 1
(MD010, no-hard-tabs)
227-227: Hard tabs
Column: 1
(MD010, no-hard-tabs)
228-228: Hard tabs
Column: 1
(MD010, no-hard-tabs)
229-229: Hard tabs
Column: 1
(MD010, no-hard-tabs)
230-230: Hard tabs
Column: 1
(MD010, no-hard-tabs)
231-231: Hard tabs
Column: 1
(MD010, no-hard-tabs)
232-232: Hard tabs
Column: 1
(MD010, no-hard-tabs)
289-289: Hard tabs
Column: 1
(MD010, no-hard-tabs)
290-290: Hard tabs
Column: 1
(MD010, no-hard-tabs)
291-291: Hard tabs
Column: 1
(MD010, no-hard-tabs)
292-292: Hard tabs
Column: 1
(MD010, no-hard-tabs)
293-293: Hard tabs
Column: 1
(MD010, no-hard-tabs)
294-294: Hard tabs
Column: 1
(MD010, no-hard-tabs)
349-349: Hard tabs
Column: 1
(MD010, no-hard-tabs)
350-350: Hard tabs
Column: 1
(MD010, no-hard-tabs)
351-351: Hard tabs
Column: 1
(MD010, no-hard-tabs)
352-352: Hard tabs
Column: 1
(MD010, no-hard-tabs)
353-353: Hard tabs
Column: 1
(MD010, no-hard-tabs)
354-354: Hard tabs
Column: 1
(MD010, no-hard-tabs)
408-408: Hard tabs
Column: 1
(MD010, no-hard-tabs)
409-409: Hard tabs
Column: 1
(MD010, no-hard-tabs)
410-410: Hard tabs
Column: 1
(MD010, no-hard-tabs)
411-411: Hard tabs
Column: 1
(MD010, no-hard-tabs)
412-412: Hard tabs
Column: 1
(MD010, no-hard-tabs)
413-413: Hard tabs
Column: 1
(MD010, no-hard-tabs)
414-414: Hard tabs
Column: 1
(MD010, no-hard-tabs)
478-478: Hard tabs
Column: 1
(MD010, no-hard-tabs)
479-479: Hard tabs
Column: 1
(MD010, no-hard-tabs)
480-480: Hard tabs
Column: 1
(MD010, no-hard-tabs)
481-481: Hard tabs
Column: 1
(MD010, no-hard-tabs)
482-482: Hard tabs
Column: 1
(MD010, no-hard-tabs)
483-483: Hard tabs
Column: 1
(MD010, no-hard-tabs)
540-540: Hard tabs
Column: 1
(MD010, no-hard-tabs)
541-541: Hard tabs
Column: 1
(MD010, no-hard-tabs)
542-542: Hard tabs
Column: 1
(MD010, no-hard-tabs)
543-543: Hard tabs
Column: 1
(MD010, no-hard-tabs)
544-544: Hard tabs
Column: 1
(MD010, no-hard-tabs)
545-545: Hard tabs
Column: 1
(MD010, no-hard-tabs)
604-604: Hard tabs
Column: 1
(MD010, no-hard-tabs)
605-605: Hard tabs
Column: 1
(MD010, no-hard-tabs)
606-606: Hard tabs
Column: 1
(MD010, no-hard-tabs)
607-607: Hard tabs
Column: 1
(MD010, no-hard-tabs)
608-608: Hard tabs
Column: 1
(MD010, no-hard-tabs)
609-609: Hard tabs
Column: 1
(MD010, no-hard-tabs)
664-664: Hard tabs
Column: 1
(MD010, no-hard-tabs)
665-665: Hard tabs
Column: 1
(MD010, no-hard-tabs)
666-666: Hard tabs
Column: 1
(MD010, no-hard-tabs)
667-667: Hard tabs
Column: 1
(MD010, no-hard-tabs)
668-668: Hard tabs
Column: 1
(MD010, no-hard-tabs)
669-669: Hard tabs
Column: 1
(MD010, no-hard-tabs)
728-728: Hard tabs
Column: 1
(MD010, no-hard-tabs)
729-729: Hard tabs
Column: 1
(MD010, no-hard-tabs)
730-730: Hard tabs
Column: 1
(MD010, no-hard-tabs)
731-731: Hard tabs
Column: 1
(MD010, no-hard-tabs)
732-732: Hard tabs
Column: 1
(MD010, no-hard-tabs)
733-733: Hard tabs
Column: 1
(MD010, no-hard-tabs)
790-790: Hard tabs
Column: 1
(MD010, no-hard-tabs)
791-791: Hard tabs
Column: 1
(MD010, no-hard-tabs)
792-792: Hard tabs
Column: 1
(MD010, no-hard-tabs)
793-793: Hard tabs
Column: 1
(MD010, no-hard-tabs)
794-794: Hard tabs
Column: 1
(MD010, no-hard-tabs)
795-795: Hard tabs
Column: 1
(MD010, no-hard-tabs)
849-849: Hard tabs
Column: 1
(MD010, no-hard-tabs)
850-850: Hard tabs
Column: 1
(MD010, no-hard-tabs)
851-851: Hard tabs
Column: 1
(MD010, no-hard-tabs)
852-852: Hard tabs
Column: 1
(MD010, no-hard-tabs)
853-853: Hard tabs
Column: 1
(MD010, no-hard-tabs)
854-854: Hard tabs
Column: 1
(MD010, no-hard-tabs)
912-912: Hard tabs
Column: 1
(MD010, no-hard-tabs)
913-913: Hard tabs
Column: 1
(MD010, no-hard-tabs)
914-914: Hard tabs
Column: 1
(MD010, no-hard-tabs)
915-915: Hard tabs
Column: 1
(MD010, no-hard-tabs)
916-916: Hard tabs
Column: 1
(MD010, no-hard-tabs)
917-917: Hard tabs
Column: 1
(MD010, no-hard-tabs)
976-976: Hard tabs
Column: 1
(MD010, no-hard-tabs)
977-977: Hard tabs
Column: 1
(MD010, no-hard-tabs)
978-978: Hard tabs
Column: 1
(MD010, no-hard-tabs)
979-979: Hard tabs
Column: 1
(MD010, no-hard-tabs)
980-980: Hard tabs
Column: 1
(MD010, no-hard-tabs)
981-981: Hard tabs
Column: 1
(MD010, no-hard-tabs)
982-982: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1019-1019: Hard tabs
Column: 18
(MD010, no-hard-tabs)
1020-1020: Hard tabs
Column: 18
(MD010, no-hard-tabs)
1071-1071: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1072-1072: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1073-1073: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1074-1074: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1075-1075: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1076-1076: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1077-1077: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1132-1132: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1133-1133: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1134-1134: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1135-1135: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1136-1136: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1137-1137: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1138-1138: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1197-1197: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1198-1198: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1199-1199: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1200-1200: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1201-1201: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1202-1202: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1203-1203: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1259-1259: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1260-1260: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1261-1261: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1262-1262: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1263-1263: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1264-1264: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1265-1265: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1321-1321: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1322-1322: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1323-1323: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1324-1324: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1325-1325: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1326-1326: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1383-1383: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1384-1384: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1385-1385: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1386-1386: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1387-1387: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1388-1388: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1448-1448: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1449-1449: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1450-1450: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1451-1451: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1452-1452: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1453-1453: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1510-1510: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1511-1511: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1512-1512: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1513-1513: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1514-1514: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1515-1515: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1576-1576: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1577-1577: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1578-1578: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1579-1579: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1580-1580: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1581-1581: Hard tabs
Column: 1
(MD010, no-hard-tabs)
pkg/client/docs/models/components/errorresponse.md
10-10: Bare URL used
null
(MD034, no-bare-urls)
pkg/client/docs/sdks/ledger/README.md
21-21: Hard tabs
Column: 1
(MD010, no-hard-tabs)
22-22: Hard tabs
Column: 1
(MD010, no-hard-tabs)
23-23: Hard tabs
Column: 1
(MD010, no-hard-tabs)
24-24: Hard tabs
Column: 1
(MD010, no-hard-tabs)
25-25: Hard tabs
Column: 1
(MD010, no-hard-tabs)
76-76: Hard tabs
Column: 1
(MD010, no-hard-tabs)
77-77: Hard tabs
Column: 1
(MD010, no-hard-tabs)
78-78: Hard tabs
Column: 1
(MD010, no-hard-tabs)
79-79: Hard tabs
Column: 1
(MD010, no-hard-tabs)
80-80: Hard tabs
Column: 1
(MD010, no-hard-tabs)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Tests
🔇 Additional comments (65)
pkg/client/retry/config.go (5)
12-13
: Good addition of explanatory comments for BackoffStrategy.The added comments clearly describe the purpose of the BackoffStrategy struct, making it more user-friendly.
21-26
: Clear improvements to Config documentation.The enhanced comments for the Strategy field make it much clearer what options are available and what each does.
31-55
: Well-designed PermanentError implementation.The PermanentError type and associated functions follow Go best practices:
- Good separation of concerns with clear purpose
- Proper error wrapping with Unwrap()
- Smart handling in Permanent() to avoid double-wrapping
This implementation clearly distinguishes errors that should not be retried.
96-126
: Robust implementation of retry interval parsing.The retryIntervalFromResponse function properly handles:
- Both numeric and date formats according to HTTP specs
- Negative values and dates in the past
- NULL responses and missing headers
This comprehensive implementation will make the retry logic much more reliable.
128-148
: Effective error type checking functions.The IsPermanentError and IsTemporaryError functions correctly use errors.As() to check for errors in the error chain, following Go 1.13+ error handling best practices.
pkg/client/docs/sdks/ledger/README.md (5)
4-5
: Overview Section Addition
The new "Overview" section offers users a concise introduction to the ledger operations, enhancing clarity and navigation.
29-34
: Secure Credential Handling & Context Initialization
Initializing the context withctx := context.Background()
and injecting security credentials usingos.Getenv
forClientID
andClientSecret
improves consistency and security by leveraging environment variables.
58-64
: Enhanced Errors Section Formatting (GetInfo)
The updated "Errors" section now clearly lists error types, status codes, and content types—with the content type rendered as\*/\*
for proper Markdown escaping. This improves clarity in error documentation.
84-90
: Consistent Credential Handling in GetMetrics Example
The declaration ofctx
and the use of environment variables forClientID
andClientSecret
in the GetMetrics example ensures consistency with the GetInfo example, helping to secure sensitive data during client initialization.
113-119
: Uniform Error Documentation for GetMetrics
The Errors section in the GetMetrics documentation mirrors the improvements made in the GetInfo section. The layout and markdown escaping (e.g., using\*/\*
) now provide consistent and clear error information.pkg/client/models/operations/options.go (3)
38-38
: Enhanced request header customization capabilityAdding the
SetHeaders
map field to theOptions
struct enables flexible header customization at the request level. This is a valuable addition that allows for more dynamic control of HTTP headers, which is particularly useful in API client scenarios.
110-117
: Well-implemented header setter functionThe
WithSetHeaders
function implementation is clean and straightforward. Unlike other option setters that check against supported options, this function directly sets headers without validation, providing flexibility while maintaining the consistent Options pattern. The function is also well-documented with a clear comment explaining its purpose.
25-25
: Improved naming clarity for Accept header constantRenaming from
AcceptHeaderEnumWildcardWildcard
toAcceptHeaderEnumWildcardRootWildcard
better describes the intent of this constant, making the code more self-documenting and easier to understand.pkg/client/internal/utils/requestbody.go (4)
69-70
: Improved type handling with standardized value extractionExtracting the interface value with
val := reflect.ValueOf(requestVal.Interface())
and using it consistently in subsequent calls standardizes how values are handled. This approach makes the code more robust when dealing with different types of request values.Also applies to: 75-75, 78-78
86-86
: Enhanced flexibility with io.Reader interface supportChanging the return type of
serializeContentType
from*bytes.Buffer
toio.Reader
and adding direct support for values implementing theio.Reader
interface significantly improves the flexibility of the serialization process. This enables streaming data handling, which is more memory-efficient for large payloads.Also applies to: 120-121
214-221
: Improved file upload handling with streaming supportThe updates to
encodeMultipartFormDataFile
now support both byte slices andio.Reader
implementations, enabling streaming file uploads. This is a significant improvement for handling large files, as it:
- Avoids loading the entire file into memory
- Uses
io.Copy
for efficient streaming- Properly validates both the filename and reader before proceeding
This improvement aligns well with the PR objective of using streaming file system for logs imports.
Also applies to: 231-236, 242-242, 250-250
130-131
: Simplified byte slice type checkingThe change to directly check
reflect.TypeOf(val.Interface()) == reflect.TypeOf([]byte(nil))
is more straightforward than the previous approach. This makes the code more readable and potentially more efficient by directly checking the concrete type.docs/api/README.md (2)
274-274
: Consistent API requirements with mandatory request bodiesThe API documentation has been updated to mark request bodies as mandatory (required=true) across multiple endpoints. This change enforces more consistent API usage patterns and helps prevent errors from missing request data. This aligns with best practices for RESTful API design by ensuring that operations have the necessary data to execute correctly.
Also applies to: 329-329, 514-514, 658-658, 723-723, 836-836, 1070-1070, 1137-1137, 1590-1590, 1776-1776, 1915-1915
1990-1990
: Enhanced logs import functionality with structured file uploadThe API for importing logs has been improved by:
- Changing from accepting a simple string to a structured
V2ImportLogsRequest
with a binary file- Adding a dedicated schema definition that clearly specifies the required
file
property of typestring(binary)
This change provides better type safety and documentation for the file upload functionality, supporting the PR's objective of using streaming file system for logs imports.
Also applies to: 4439-4458
pkg/client/docs/sdks/v1/README.md (3)
4-5
: Great addition of the Overview section.This section improves the documentation organization by providing a clear introduction to the available operations, enhancing usability for developers.
38-54
: Good security practice: Using environment variables for credentials.The update to use environment variables (
os.Getenv("FORMANCE_CLIENT_ID")
andos.Getenv("FORMANCE_CLIENT_SECRET")
) for retrieving security credentials is a significant security improvement over hardcoded values. This follows security best practices and prevents credential exposure in source code.Additionally, the introduction of context management with
ctx := context.Background()
improves the code by supporting timeout and cancellation in API requests.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
39-39: Hard tabs
Column: 1(MD010, no-hard-tabs)
40-40: Hard tabs
Column: 1(MD010, no-hard-tabs)
41-41: Hard tabs
Column: 1(MD010, no-hard-tabs)
42-42: Hard tabs
Column: 1(MD010, no-hard-tabs)
43-43: Hard tabs
Column: 1(MD010, no-hard-tabs)
77-82
: Good addition of explicit error documentation.The new "Errors" section for each operation adds valuable information about the possible error types and status codes that can be returned, making error handling clearer for developers.
pkg/client/docs/sdks/v2/README.md (4)
4-5
: Excellent addition of the Overview section.Adding this section provides a clear entry point for developers to understand the available operations in the V2 API.
44-59
: Security improvement: Using environment variables for credentials.Using environment variables for security credentials is a significant security improvement. This pattern is consistently applied across the SDK examples.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
44-44: Hard tabs
Column: 1(MD010, no-hard-tabs)
45-45: Hard tabs
Column: 1(MD010, no-hard-tabs)
46-46: Hard tabs
Column: 1(MD010, no-hard-tabs)
47-47: Hard tabs
Column: 1(MD010, no-hard-tabs)
48-48: Hard tabs
Column: 1(MD010, no-hard-tabs)
49-49: Hard tabs
Column: 1(MD010, no-hard-tabs)
87-92
: Good addition of structured error documentation.The new "Errors" section with standardized format (4XX, 5XX) provides clearer information about possible errors for each API operation.
1528-1537
: Updated ImportLogs implementation with proper file handling.The implementation correctly demonstrates how to open and use a file for the logs import operation.
pkg/client/formance.go (3)
44-45
: Nice addition of a generic Pointer function.The new generic
Pointer[T any]
function is a great improvement that leverages Go's generics (1.18+) to provide a type-safe way to create pointers for any type. This eliminates the need for additional type-specific helper functions in the future.
149-152
: Updated SDK version information.The version updates from 0.6.5/2.384.1 to 0.7.15/2.548.6 keep the library current.
159-164
: Enhanced security with automatic environment variable loading.This improvement automatically populates security credentials from environment variables when not explicitly provided, which:
- Makes the SDK more user-friendly by reducing required configuration
- Encourages the use of environment variables for security
- Aligns with the updated example code in the documentation
This is a significant usability and security enhancement.
pkg/client/README.md (5)
29-42
: Improved documentation structure with proper TOC depth control.The addition of a TOC max depth control and clear hierarchy in the table of contents improves documentation navigation. Having a consistent, well-organized structure makes it easier for developers to find relevant information quickly.
68-78
: Enhanced security through environment variables for credentials.Great update to use environment variables for security credentials instead of hardcoded values. This follows security best practices by:
- Preventing credential leakage in source code
- Enabling different credentials per environment
- Making the example consistent with security standards
- ClientID: client.String("YOUR_CLIENT_ID_HERE"), - ClientSecret: client.String("YOUR_CLIENT_SECRET_HERE"), + ClientID: client.String(os.Getenv("FORMANCE_CLIENT_ID")), + ClientSecret: client.String(os.Getenv("FORMANCE_CLIENT_SECRET")),
96-156
: Better documentation organization with collapsible sections.The use of collapsible
<details>
sections for the API methods makes the README more navigable and less overwhelming. The heading level adjustments also provide better hierarchy, making it easier to understand the structure of the API.
317-320
: Clearer server selection documentation.The rephrasing emphasizes using
WithServerURL
instead ofWithServerIndex
, making it easier for developers to understand how to override the server URL.
390-392
: Improved authentication documentation with environment variables.The authentication table now includes the corresponding environment variables, which helps developers quickly understand how to configure authentication without hardcoding credentials.
pkg/client/internal/utils/security.go (6)
24-24
: Added environment variable support to security tag configuration.Adding the
Env
field to thesecurityTag
struct enables security credentials to be sourced from environment variables, which is a significant security improvement.
94-104
: Implemented environment variable population for security configuration.The new
PopulateSecurityFromEnv
function enhances security by allowing credentials to be sourced from environment variables rather than hardcoded values. This promotes better security practices and ease of configuration.
106-154
: Added robust struct population from environment variables.The
populateStructFromEnv
function intelligently sets security configuration values from environment variables, handling different field types and nested structures. This makes the SDK more flexible and secure.
211-219
: Added support for custom HTTP authentication scheme.Adding the
custom
subtype in the HTTP authentication scheme handling provides flexibility for custom authentication methods beyond the standard ones.
269-269
: Consistent handling of custom HTTP authentication.The addition of the
custom
case inparseSecuritySchemeValue
complements the earlier change inparseSecurityScheme
, ensuring consistent handling of custom authentication methods.
347-349
: Added environment variable tag parsing.The
parseSecurityTag
function now handles theenv
option from struct tags, enabling fields to specify which environment variable should provide their value. This completes the environment variable integration for security configurations.Also applies to: 360-361
pkg/client/internal/utils/queryparams.go (6)
68-72
: Added support for constant query parameter values.The new functionality to extract constant values from field types allows for static parameter values to be defined directly in struct tags, improving flexibility in API requests.
74-74
: Added default value parsing for query parameters.Extracting default values from field tags provides a fallback when no value is explicitly set, enhancing the robustness of the query parameter handling.
102-102
: Updated function calls to include default values.The calls to
populateFormParams
now pass the parsed default value, ensuring the default values are properly used when populating query parameters.Also applies to: 109-109
225-229
: Improved handling of nested parameters with inline option.The updated logic for scope construction in
populateDeepObjectParamsStruct
properly respects theInline
property, allowing for more flexible representation of nested parameters in the query string.
251-253
: Updated function signature for form parameter population.The
populateFormParams
function now accepts adefaultValue
parameter, enhancing its flexibility and consistency with the other changes in the file.
267-273
: Added inline parameter support for union/oneOf types.The addition of the
Inline
field to theparamTag
struct with comprehensive documentation explains its purpose for handling union/oneOf types, improving the clarity and flexibility of the code.pkg/client/internal/utils/utils.go (5)
100-110
: Added case-insensitive environment variable retrieval.The new
getCaseInsensitiveEnvVar
function improves flexibility by allowing environment variables to be specified in any case, which is particularly helpful across different operating systems and environments.
112-141
: Implemented type-aware environment variable conversion.The
ValueFromEnvVar
function intelligently converts string environment variable values to appropriate types (string, int, float, bool) based on the target field's type. This reduces manual conversion code throughout the codebase.
143-161
: Added support for constant and default value tags.The
parseConstTag
andparseDefaultTag
functions extract values from struct tags, enabling declarative configuration of constant and default values directly in struct definitions.
208-209
: Added inline tag parsing for parameter configuration.The
parseParamTag
function now handles theinline
option, supporting theInline
property added to theparamTag
struct and ensuring consistent tag handling.
292-339
: Added robust value handling utilities.The
isZeroValue
andsetFieldValue
functions provide solid utilities for reflective operations on different types, enhancing the SDK's ability to handle various types safely and consistently.pkg/client/models/components/security.go (3)
26-29
: Getter method is correct.
Returningnil
when the receiver or field is nil is consistent with the new pointer-based model, helping callers handle missing values gracefully.
33-38
: Consistent approach for secret retrieval.
This mirrors the logic inGetClientID()
, which is good for uniformity. No issues noted.
40-45
: Token URL getter aligns with the pointer-based design.
The logic is straightforward, returningnil
if the struct is uninitialized. Ensure you manage any default logic elsewhere ifTokenURL
is omitted.Would you like to check other parts of the codebase to confirm they correctly handle a nil TokenURL scenario, or rely on the
default:"/oauth/token"
tag? If so, I can generate a script to search for usage patterns.pkg/client/internal/utils/retries.go (2)
106-155
:retryWithBackoff
function is a clear, testable approach to backoff.
The design is easier to follow than depending on external packages. Good job usingPermanentError
vs.TemporaryError
checks. However, ensure that timeouts or context cancellations don’t lead to partial updates if the operation is non-idempotent.
156-195
: Well-definedTimer
interface for injective timing in tests.
This approach enhances testability and decouples you from the concretetime.Timer
. Great design!pkg/client/internal/hooks/clientcredentials.go (3)
44-47
: Concurrent session handling viasync.Map
andsingleflight.Group
.
This design avoids data races when multiple goroutines request a token simultaneously. Good approach!
73-84
: Scope checks and session refresh logic.
Your logic to discard sessions missing required scopes or with an expired token is correct. Ensure partial overlap of scopes is handled as expected (some use-cases might accept a superset of scopes).Would you like to confirm if partial-superset is ever needed? Let me know if you’d like a quick code scan script to verify usage patterns.
226-261
:getSession
method nicely centralizes session logic.
Combiningsingleflight
with session caching is a solid concurrency approach. The additional check to combine new scopes with the cached session’s scopes is also well-structured.pkg/client/v1.go (6)
14-15
: Reference to removedbackoff
and newretry
usage.
The import line still referencesgithub.com/formancehq/ledger/pkg/client/retry
, which is correct for the new logic; just ensure no stale references remain to the oldbackoff
library.Could you confirm no leftover references to the old
backoff
package exist? I can generate a script to grep for it across the codebase if needed.
84-86
: Headers fromo.SetHeaders
.
Setting custom headers is a nice design. Validate no collisions with standard headers or frameworks that might rename them.
108-122
: Check for permanent or temporary errors before returning.
You handle typical cases forretry.IsPermanentError(err)
orretry.IsTemporaryError(err)
. This is a big improvement in clarity!
138-146
: After retry response, callingHooks.AfterSuccess
.
Ensure the success hook is well tested, especially if further hooks can alter the response object. No issues spotted.
188-192
: De-duplicated approach to fallback on global retry config.
This block consolidates logic, though watch for any edge cases if the local config is not set and the global config is also nil.
2687-2687
: End of file updates.
No major concerns beyond ensuring consistent hooking of the new retry logic. Great job on standardizing the pattern across so many endpoints!
func hasEnvVarsForSecurityStruct(structType reflect.Type, isSecurityOption bool) bool { | ||
valid := false | ||
for i := 0; i < structType.NumField(); i++ { | ||
fieldType := structType.Field(i) | ||
secTag := parseSecurityTag(fieldType) | ||
if secTag == nil { | ||
continue | ||
} | ||
|
||
if secTag.Env != "" || getCaseInsensitiveEnvVar(secTag.Env) != "" { | ||
valid = true | ||
} else if isSecurityOption { | ||
return false | ||
} | ||
|
||
if fieldType.Type.Kind() == reflect.Struct || | ||
(fieldType.Type.Kind() == reflect.Ptr && fieldType.Type.Elem().Kind() == reflect.Struct) { | ||
if hasEnvVarsForSecurityStruct(fieldType.Type, secTag.Option) { | ||
valid = true | ||
} else if isSecurityOption { | ||
return false | ||
} | ||
} | ||
} | ||
|
||
return valid | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Added validation for environment variable availability.
The hasEnvVarsForSecurityStruct
function verifies whether environment variables exist for a security struct before attempting to populate it. However, there's a potential issue in the condition checking.
Line 165 contains a logical error in the condition. It will always return true when secTag.Env
is not empty, regardless of whether the environment variable exists:
- if secTag.Env != "" || getCaseInsensitiveEnvVar(secTag.Env) != "" {
+ if secTag.Env != "" && getCaseInsensitiveEnvVar(secTag.Env) != "" {
The current logic will mark a field as valid if it has a tag, even if the environment variable doesn't exist. The suggested change ensures the environment variable exists before marking the field as valid.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
func hasEnvVarsForSecurityStruct(structType reflect.Type, isSecurityOption bool) bool { | |
valid := false | |
for i := 0; i < structType.NumField(); i++ { | |
fieldType := structType.Field(i) | |
secTag := parseSecurityTag(fieldType) | |
if secTag == nil { | |
continue | |
} | |
if secTag.Env != "" || getCaseInsensitiveEnvVar(secTag.Env) != "" { | |
valid = true | |
} else if isSecurityOption { | |
return false | |
} | |
if fieldType.Type.Kind() == reflect.Struct || | |
(fieldType.Type.Kind() == reflect.Ptr && fieldType.Type.Elem().Kind() == reflect.Struct) { | |
if hasEnvVarsForSecurityStruct(fieldType.Type, secTag.Option) { | |
valid = true | |
} else if isSecurityOption { | |
return false | |
} | |
} | |
} | |
return valid | |
} | |
func hasEnvVarsForSecurityStruct(structType reflect.Type, isSecurityOption bool) bool { | |
valid := false | |
for i := 0; i < structType.NumField(); i++ { | |
fieldType := structType.Field(i) | |
secTag := parseSecurityTag(fieldType) | |
if secTag == nil { | |
continue | |
} | |
if secTag.Env != "" && getCaseInsensitiveEnvVar(secTag.Env) != "" { | |
valid = true | |
} else if isSecurityOption { | |
return false | |
} | |
if fieldType.Type.Kind() == reflect.Struct || | |
(fieldType.Type.Kind() == reflect.Ptr && fieldType.Type.Elem().Kind() == reflect.Struct) { | |
if hasEnvVarsForSecurityStruct(fieldType.Type, secTag.Option) { | |
valid = true | |
} else if isSecurityOption { | |
return false | |
} | |
} | |
} | |
return valid | |
} |
46b6c29
to
409bdba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
pkg/client/internal/utils/security.go (1)
165-165
:⚠️ Potential issueFix logical error in environment variable check
This condition has a logical error that was previously identified but not fixed. It will always evaluate to true when
secTag.Env
is non-empty, regardless of whether the environment variable exists.-if secTag.Env != "" || getCaseInsensitiveEnvVar(secTag.Env) != "" { +if secTag.Env != "" && getCaseInsensitiveEnvVar(secTag.Env) != "" {Using
&&
ensures both conditions must be true: the tag must be defined and the environment variable must exist.
🧹 Nitpick comments (13)
pkg/client/docs/models/components/errorresponse.md (1)
1-10
: Documentation structure for ErrorResponse looks goodThe documentation clearly defines the ErrorResponse model structure with appropriate field descriptions and examples.
On line 10, consider linking the bare URL to avoid markdown linting issues:
-| `Details` | **string* | :heavy_minus_sign: | N/A | https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9 | +| `Details` | **string* | :heavy_minus_sign: | N/A | [Link](https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9) |🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
10-10: Bare URL used
null(MD034, no-bare-urls)
pkg/client/docs/sdks/ledger/README.md (2)
21-35
: Improved example code with proper context initialization and environment variablesThe example now correctly initializes a context and uses environment variables for security credentials, which is a more secure approach than hardcoded values.
Consider replacing hard tabs with spaces in the code block to address the markdown linting issues.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
21-21: Hard tabs
Column: 1(MD010, no-hard-tabs)
22-22: Hard tabs
Column: 1(MD010, no-hard-tabs)
23-23: Hard tabs
Column: 1(MD010, no-hard-tabs)
24-24: Hard tabs
Column: 1(MD010, no-hard-tabs)
25-25: Hard tabs
Column: 1(MD010, no-hard-tabs)
76-90
: Improved example code for GetMetrics with proper context initializationSimilar improvements to the GetInfo example, properly initializing context and using environment variables for security credentials.
Consider replacing hard tabs with spaces in the code block to address the markdown linting issues.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
76-76: Hard tabs
Column: 1(MD010, no-hard-tabs)
77-77: Hard tabs
Column: 1(MD010, no-hard-tabs)
78-78: Hard tabs
Column: 1(MD010, no-hard-tabs)
79-79: Hard tabs
Column: 1(MD010, no-hard-tabs)
80-80: Hard tabs
Column: 1(MD010, no-hard-tabs)
pkg/client/README.md (1)
260-260
: Minor grammatical issueThere's a small grammatical issue in this line.
-You can refer to respective *Errors* tables in SDK docs for more details on possible error types for each operation. +You can refer to the respective *Errors* tables in SDK docs for more details on possible error types for each operation.🧰 Tools
🪛 LanguageTool
[uncategorized] ~260-~260: You might be missing the article “the” here.
Context: ...heir associated error. You can refer to respective Errors tables in SDK docs for more de...(AI_EN_LECTOR_MISSING_DETERMINER_THE)
[uncategorized] ~260-~260: You might be missing the article “the” here.
Context: ... refer to respective Errors tables in SDK docs for more details on possible error...(AI_EN_LECTOR_MISSING_DETERMINER_THE)
pkg/client/internal/utils/utils.go (4)
100-110
: Consider potential name collisions and improved caching.While
getCaseInsensitiveEnvVar
is functional, environment variables are typically case-sensitive (depending on OS). For systems that treat them case-insensitively, collision might occur if both uppercase and lowercase variables exist. Consider clarifying or memoizing lookups if performance is an active concern.
112-141
: Potential parse error logging.
ValueFromEnvVar
effectively returnsnil
if parsing fails. You might consider logging parse errors or returning them for easier debugging. This would help differentiate invalid environment variable content from merely absent environment variables.
292-303
: Consider more robust zero-value checks.The
isZeroValue
function only handles certain primitive kinds. If needed for additional types (arrays, slices, structs), consider expanding logic or switching tov.IsZero()
for broader checks.
305-339
: Extended numeric parsing coverage.
setFieldValue
handles basic numeric/bool/string fields well. If you need to parse more complex numeric or specialized types (e.g., big.Int, decimal), consider extending this logic.pkg/client/v1.go (3)
43-48
: Consider extracting repeated baseURL logic.
This same snippet recurs in multiple methods; consolidating into a helper function would improve maintainability.
54-60
: Double-check duplicated OAuth2 scopes.
The same scope appears twice; verify if that’s intentional or just a leftover.
1670-1670
: Deprecation notice is helpful.
Consider also specifying a target removal version or recommended alternative.pkg/client/docs/sdks/v1/README.md (1)
4-5
: [Overview Section Addition]
The new “Overview” section improves the reader’s first impression of the API by summarizing available operations. Please double‐check that the description and formatting are consistent with other SDK documentation files.pkg/client/docs/sdks/v2/README.md (1)
405-447
: [CreateBulk Example Update]
TheCreateBulk
example is comprehensive and demonstrates the use of bulk operations with flags (e.g.ContinueOnFailure
,Atomic
,Parallel
). Ensure that the use of the helper (e.g.components.CreateV2BulkElementRevertTransaction
) is well documented elsewhere so that users can easily understand how to construct complex bulk requests.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
408-408: Hard tabs
Column: 1(MD010, no-hard-tabs)
409-409: Hard tabs
Column: 1(MD010, no-hard-tabs)
410-410: Hard tabs
Column: 1(MD010, no-hard-tabs)
411-411: Hard tabs
Column: 1(MD010, no-hard-tabs)
412-412: Hard tabs
Column: 1(MD010, no-hard-tabs)
413-413: Hard tabs
Column: 1(MD010, no-hard-tabs)
414-414: Hard tabs
Column: 1(MD010, no-hard-tabs)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (10)
openapi.yaml
is excluded by!**/*.yaml
openapi/v1.yaml
is excluded by!**/*.yaml
openapi/v2.yaml
is excluded by!**/*.yaml
pkg/client/.speakeasy/gen.lock
is excluded by!**/*.lock
,!**/*.lock
pkg/client/.speakeasy/gen.yaml
is excluded by!**/*.yaml
pkg/client/go.mod
is excluded by!**/*.mod
pkg/client/go.sum
is excluded by!**/*.sum
,!**/*.sum
tools/generator/go.mod
is excluded by!**/*.mod
tools/provisioner/go.mod
is excluded by!**/*.mod
tools/provisioner/go.sum
is excluded by!**/*.sum
,!**/*.sum
📒 Files selected for processing (75)
docs/api/README.md
(14 hunks)flake.nix
(1 hunks)pkg/client/.gitignore
(1 hunks)pkg/client/README.md
(14 hunks)pkg/client/USAGE.md
(1 hunks)pkg/client/docs/models/components/errorresponse.md
(1 hunks)pkg/client/docs/models/components/security.md
(1 hunks)pkg/client/docs/models/components/v2errorresponse.md
(1 hunks)pkg/client/docs/models/operations/addmetadataontransactionrequest.md
(1 hunks)pkg/client/docs/models/operations/listaccountsresponse.md
(1 hunks)pkg/client/docs/models/operations/v2addmetadataontransactionrequest.md
(1 hunks)pkg/client/docs/models/operations/v2countaccountsrequest.md
(1 hunks)pkg/client/docs/models/operations/v2counttransactionsrequest.md
(1 hunks)pkg/client/docs/models/operations/v2createbulkrequest.md
(1 hunks)pkg/client/docs/models/operations/v2createledgerrequest.md
(1 hunks)pkg/client/docs/models/operations/v2getbalancesaggregatedrequest.md
(1 hunks)pkg/client/docs/models/operations/v2getinforesponse.md
(1 hunks)pkg/client/docs/models/operations/v2getvolumeswithbalancesrequest.md
(1 hunks)pkg/client/docs/models/operations/v2importlogsrequest.md
(1 hunks)pkg/client/docs/models/operations/v2listaccountsrequest.md
(1 hunks)pkg/client/docs/models/operations/v2listlogsrequest.md
(1 hunks)pkg/client/docs/models/operations/v2listtransactionsrequest.md
(1 hunks)pkg/client/docs/models/operations/v2updateledgermetadatarequest.md
(1 hunks)pkg/client/docs/models/operations/v2updateledgermetadataresponse.md
(1 hunks)pkg/client/docs/models/sdkerrors/errorresponse.md
(0 hunks)pkg/client/docs/models/sdkerrors/v2errorresponse.md
(0 hunks)pkg/client/docs/sdks/formance/README.md
(0 hunks)pkg/client/docs/sdks/ledger/README.md
(5 hunks)pkg/client/docs/sdks/v1/README.md
(46 hunks)pkg/client/docs/sdks/v2/README.md
(53 hunks)pkg/client/formance.go
(2 hunks)pkg/client/internal/hooks/clientcredentials.go
(8 hunks)pkg/client/internal/hooks/hooks.go
(1 hunks)pkg/client/internal/utils/env.go
(1 hunks)pkg/client/internal/utils/form.go
(1 hunks)pkg/client/internal/utils/json.go
(2 hunks)pkg/client/internal/utils/queryparams.go
(5 hunks)pkg/client/internal/utils/requestbody.go
(7 hunks)pkg/client/internal/utils/retries.go
(5 hunks)pkg/client/internal/utils/security.go
(7 hunks)pkg/client/internal/utils/utils.go
(6 hunks)pkg/client/ledger.go
(9 hunks)pkg/client/models/components/errorresponse.go
(1 hunks)pkg/client/models/components/security.go
(2 hunks)pkg/client/models/components/v2bulkelement.go
(1 hunks)pkg/client/models/components/v2bulkelementresult.go
(1 hunks)pkg/client/models/components/v2errorresponse.go
(1 hunks)pkg/client/models/components/v2targetid.go
(1 hunks)pkg/client/models/operations/listaccounts.go
(3 hunks)pkg/client/models/operations/options.go
(3 hunks)pkg/client/models/operations/v2addmetadataontransaction.go
(1 hunks)pkg/client/models/operations/v2countaccounts.go
(1 hunks)pkg/client/models/operations/v2counttransactions.go
(1 hunks)pkg/client/models/operations/v2createbulk.go
(1 hunks)pkg/client/models/operations/v2createledger.go
(2 hunks)pkg/client/models/operations/v2getbalancesaggregated.go
(1 hunks)pkg/client/models/operations/v2getinfo.go
(2 hunks)pkg/client/models/operations/v2getvolumeswithbalances.go
(1 hunks)pkg/client/models/operations/v2importlogs.go
(2 hunks)pkg/client/models/operations/v2listaccounts.go
(1 hunks)pkg/client/models/operations/v2listlogs.go
(1 hunks)pkg/client/models/operations/v2listtransactions.go
(1 hunks)pkg/client/models/operations/v2updateledgermetadata.go
(2 hunks)pkg/client/models/sdkerrors/errorresponse.go
(0 hunks)pkg/client/models/sdkerrors/v2errorresponse.go
(0 hunks)pkg/client/retry/config.go
(1 hunks)pkg/client/types/pointers.go
(1 hunks)pkg/client/v1.go
(84 hunks)test/e2e/api_ledgers_create_test.go
(3 hunks)test/e2e/api_ledgers_import_test.go
(4 hunks)test/e2e/app_logs_blocks_async_test.go
(1 hunks)test/performance/env_remote_ledger_test.go
(1 hunks)test/stress/stress_test.go
(1 hunks)tools/generator/cmd/root.go
(1 hunks)tools/provisioner/pkg/reconciler.go
(1 hunks)
💤 Files with no reviewable changes (5)
- pkg/client/models/sdkerrors/errorresponse.go
- pkg/client/docs/models/sdkerrors/v2errorresponse.md
- pkg/client/docs/sdks/formance/README.md
- pkg/client/models/sdkerrors/v2errorresponse.go
- pkg/client/docs/models/sdkerrors/errorresponse.md
🚧 Files skipped from review as they are similar to previous changes (54)
- pkg/client/.gitignore
- pkg/client/internal/hooks/hooks.go
- tools/generator/cmd/root.go
- pkg/client/docs/models/operations/v2counttransactionsrequest.md
- pkg/client/docs/models/operations/v2listtransactionsrequest.md
- pkg/client/docs/models/operations/v2getbalancesaggregatedrequest.md
- pkg/client/docs/models/components/v2errorresponse.md
- pkg/client/internal/utils/env.go
- pkg/client/docs/models/operations/addmetadataontransactionrequest.md
- test/stress/stress_test.go
- pkg/client/models/operations/v2listtransactions.go
- pkg/client/types/pointers.go
- pkg/client/docs/models/operations/v2addmetadataontransactionrequest.md
- pkg/client/docs/models/operations/v2updateledgermetadatarequest.md
- pkg/client/docs/models/components/security.md
- test/e2e/app_logs_blocks_async_test.go
- pkg/client/docs/models/operations/v2createbulkrequest.md
- pkg/client/models/operations/v2addmetadataontransaction.go
- pkg/client/docs/models/operations/v2listlogsrequest.md
- pkg/client/docs/models/operations/listaccountsresponse.md
- pkg/client/docs/models/operations/v2getinforesponse.md
- pkg/client/models/operations/v2listaccounts.go
- pkg/client/docs/models/operations/v2countaccountsrequest.md
- pkg/client/models/operations/v2countaccounts.go
- pkg/client/docs/models/operations/v2updateledgermetadataresponse.md
- pkg/client/models/operations/v2listlogs.go
- pkg/client/docs/models/operations/v2importlogsrequest.md
- pkg/client/models/operations/v2getbalancesaggregated.go
- test/performance/env_remote_ledger_test.go
- pkg/client/models/operations/v2createbulk.go
- pkg/client/USAGE.md
- tools/provisioner/pkg/reconciler.go
- pkg/client/models/components/v2targetid.go
- pkg/client/models/operations/v2getinfo.go
- pkg/client/ledger.go
- pkg/client/models/operations/v2getvolumeswithbalances.go
- pkg/client/docs/models/operations/v2listaccountsrequest.md
- pkg/client/models/components/errorresponse.go
- pkg/client/models/operations/v2updateledgermetadata.go
- pkg/client/internal/utils/form.go
- pkg/client/docs/models/operations/v2getvolumeswithbalancesrequest.md
- pkg/client/docs/models/operations/v2createledgerrequest.md
- pkg/client/models/components/security.go
- test/e2e/api_ledgers_import_test.go
- pkg/client/models/components/v2errorresponse.go
- pkg/client/models/operations/v2counttransactions.go
- pkg/client/models/components/v2bulkelementresult.go
- test/e2e/api_ledgers_create_test.go
- pkg/client/models/operations/v2createledger.go
- pkg/client/models/components/v2bulkelement.go
- flake.nix
- pkg/client/internal/utils/requestbody.go
- pkg/client/internal/utils/json.go
- pkg/client/models/operations/listaccounts.go
🧰 Additional context used
🪛 LanguageTool
pkg/client/README.md
[uncategorized] ~260-~260: You might be missing the article “the” here.
Context: ...heir associated error. You can refer to respective Errors tables in SDK docs for more de...
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
[uncategorized] ~260-~260: You might be missing the article “the” here.
Context: ... refer to respective Errors tables in SDK docs for more details on possible error...
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
🪛 markdownlint-cli2 (0.17.2)
docs/api/README.md
4453-4453: Multiple headings with the same content
null
(MD024, no-duplicate-heading)
pkg/client/docs/sdks/v1/README.md
39-39: Hard tabs
Column: 1
(MD010, no-hard-tabs)
40-40: Hard tabs
Column: 1
(MD010, no-hard-tabs)
41-41: Hard tabs
Column: 1
(MD010, no-hard-tabs)
42-42: Hard tabs
Column: 1
(MD010, no-hard-tabs)
43-43: Hard tabs
Column: 1
(MD010, no-hard-tabs)
94-94: Hard tabs
Column: 1
(MD010, no-hard-tabs)
95-95: Hard tabs
Column: 1
(MD010, no-hard-tabs)
96-96: Hard tabs
Column: 1
(MD010, no-hard-tabs)
97-97: Hard tabs
Column: 1
(MD010, no-hard-tabs)
98-98: Hard tabs
Column: 1
(MD010, no-hard-tabs)
99-99: Hard tabs
Column: 1
(MD010, no-hard-tabs)
153-153: Hard tabs
Column: 1
(MD010, no-hard-tabs)
154-154: Hard tabs
Column: 1
(MD010, no-hard-tabs)
155-155: Hard tabs
Column: 1
(MD010, no-hard-tabs)
156-156: Hard tabs
Column: 1
(MD010, no-hard-tabs)
157-157: Hard tabs
Column: 1
(MD010, no-hard-tabs)
158-158: Hard tabs
Column: 1
(MD010, no-hard-tabs)
265-265: Hard tabs
Column: 1
(MD010, no-hard-tabs)
266-266: Hard tabs
Column: 1
(MD010, no-hard-tabs)
267-267: Hard tabs
Column: 1
(MD010, no-hard-tabs)
268-268: Hard tabs
Column: 1
(MD010, no-hard-tabs)
269-269: Hard tabs
Column: 1
(MD010, no-hard-tabs)
270-270: Hard tabs
Column: 1
(MD010, no-hard-tabs)
382-382: Hard tabs
Column: 1
(MD010, no-hard-tabs)
383-383: Hard tabs
Column: 1
(MD010, no-hard-tabs)
384-384: Hard tabs
Column: 1
(MD010, no-hard-tabs)
385-385: Hard tabs
Column: 1
(MD010, no-hard-tabs)
386-386: Hard tabs
Column: 1
(MD010, no-hard-tabs)
387-387: Hard tabs
Column: 1
(MD010, no-hard-tabs)
442-442: Hard tabs
Column: 1
(MD010, no-hard-tabs)
443-443: Hard tabs
Column: 1
(MD010, no-hard-tabs)
444-444: Hard tabs
Column: 1
(MD010, no-hard-tabs)
445-445: Hard tabs
Column: 1
(MD010, no-hard-tabs)
446-446: Hard tabs
Column: 1
(MD010, no-hard-tabs)
447-447: Hard tabs
Column: 1
(MD010, no-hard-tabs)
505-505: Hard tabs
Column: 1
(MD010, no-hard-tabs)
506-506: Hard tabs
Column: 1
(MD010, no-hard-tabs)
507-507: Hard tabs
Column: 1
(MD010, no-hard-tabs)
508-508: Hard tabs
Column: 1
(MD010, no-hard-tabs)
509-509: Hard tabs
Column: 1
(MD010, no-hard-tabs)
510-510: Hard tabs
Column: 1
(MD010, no-hard-tabs)
564-564: Hard tabs
Column: 1
(MD010, no-hard-tabs)
565-565: Hard tabs
Column: 1
(MD010, no-hard-tabs)
566-566: Hard tabs
Column: 1
(MD010, no-hard-tabs)
567-567: Hard tabs
Column: 1
(MD010, no-hard-tabs)
568-568: Hard tabs
Column: 1
(MD010, no-hard-tabs)
569-569: Hard tabs
Column: 1
(MD010, no-hard-tabs)
638-638: Hard tabs
Column: 1
(MD010, no-hard-tabs)
639-639: Hard tabs
Column: 1
(MD010, no-hard-tabs)
640-640: Hard tabs
Column: 1
(MD010, no-hard-tabs)
641-641: Hard tabs
Column: 1
(MD010, no-hard-tabs)
642-642: Hard tabs
Column: 1
(MD010, no-hard-tabs)
643-643: Hard tabs
Column: 1
(MD010, no-hard-tabs)
664-664: Hard tabs
Column: 14
(MD010, no-hard-tabs)
665-665: Hard tabs
Column: 14
(MD010, no-hard-tabs)
712-712: Hard tabs
Column: 1
(MD010, no-hard-tabs)
713-713: Hard tabs
Column: 1
(MD010, no-hard-tabs)
714-714: Hard tabs
Column: 1
(MD010, no-hard-tabs)
715-715: Hard tabs
Column: 1
(MD010, no-hard-tabs)
716-716: Hard tabs
Column: 1
(MD010, no-hard-tabs)
717-717: Hard tabs
Column: 1
(MD010, no-hard-tabs)
771-771: Hard tabs
Column: 1
(MD010, no-hard-tabs)
772-772: Hard tabs
Column: 1
(MD010, no-hard-tabs)
773-773: Hard tabs
Column: 1
(MD010, no-hard-tabs)
774-774: Hard tabs
Column: 1
(MD010, no-hard-tabs)
775-775: Hard tabs
Column: 1
(MD010, no-hard-tabs)
776-776: Hard tabs
Column: 1
(MD010, no-hard-tabs)
835-835: Hard tabs
Column: 1
(MD010, no-hard-tabs)
836-836: Hard tabs
Column: 1
(MD010, no-hard-tabs)
837-837: Hard tabs
Column: 1
(MD010, no-hard-tabs)
838-838: Hard tabs
Column: 1
(MD010, no-hard-tabs)
839-839: Hard tabs
Column: 1
(MD010, no-hard-tabs)
840-840: Hard tabs
Column: 1
(MD010, no-hard-tabs)
901-901: Hard tabs
Column: 1
(MD010, no-hard-tabs)
902-902: Hard tabs
Column: 1
(MD010, no-hard-tabs)
903-903: Hard tabs
Column: 1
(MD010, no-hard-tabs)
904-904: Hard tabs
Column: 1
(MD010, no-hard-tabs)
905-905: Hard tabs
Column: 1
(MD010, no-hard-tabs)
906-906: Hard tabs
Column: 1
(MD010, no-hard-tabs)
907-907: Hard tabs
Column: 1
(MD010, no-hard-tabs)
949-949: Hard tabs
Column: 18
(MD010, no-hard-tabs)
950-950: Hard tabs
Column: 18
(MD010, no-hard-tabs)
998-998: Hard tabs
Column: 1
(MD010, no-hard-tabs)
999-999: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1000-1000: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1001-1001: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1002-1002: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1003-1003: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1004-1004: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1059-1059: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1060-1060: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1061-1061: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1062-1062: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1063-1063: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1064-1064: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1065-1065: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1123-1123: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1124-1124: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1125-1125: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1126-1126: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1127-1127: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1128-1128: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1129-1129: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1184-1184: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1185-1185: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1186-1186: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1187-1187: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1188-1188: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1189-1189: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1190-1190: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1271-1271: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1272-1272: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1273-1273: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1274-1274: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1275-1275: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1276-1276: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1333-1333: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1334-1334: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1335-1335: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1336-1336: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1337-1337: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1338-1338: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1393-1393: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1394-1394: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1395-1395: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1396-1396: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1397-1397: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1398-1398: Hard tabs
Column: 1
(MD010, no-hard-tabs)
pkg/client/docs/sdks/v2/README.md
44-44: Hard tabs
Column: 1
(MD010, no-hard-tabs)
45-45: Hard tabs
Column: 1
(MD010, no-hard-tabs)
46-46: Hard tabs
Column: 1
(MD010, no-hard-tabs)
47-47: Hard tabs
Column: 1
(MD010, no-hard-tabs)
48-48: Hard tabs
Column: 1
(MD010, no-hard-tabs)
49-49: Hard tabs
Column: 1
(MD010, no-hard-tabs)
104-104: Hard tabs
Column: 1
(MD010, no-hard-tabs)
105-105: Hard tabs
Column: 1
(MD010, no-hard-tabs)
106-106: Hard tabs
Column: 1
(MD010, no-hard-tabs)
107-107: Hard tabs
Column: 1
(MD010, no-hard-tabs)
108-108: Hard tabs
Column: 1
(MD010, no-hard-tabs)
109-109: Hard tabs
Column: 1
(MD010, no-hard-tabs)
163-163: Hard tabs
Column: 1
(MD010, no-hard-tabs)
164-164: Hard tabs
Column: 1
(MD010, no-hard-tabs)
165-165: Hard tabs
Column: 1
(MD010, no-hard-tabs)
166-166: Hard tabs
Column: 1
(MD010, no-hard-tabs)
167-167: Hard tabs
Column: 1
(MD010, no-hard-tabs)
168-168: Hard tabs
Column: 1
(MD010, no-hard-tabs)
227-227: Hard tabs
Column: 1
(MD010, no-hard-tabs)
228-228: Hard tabs
Column: 1
(MD010, no-hard-tabs)
229-229: Hard tabs
Column: 1
(MD010, no-hard-tabs)
230-230: Hard tabs
Column: 1
(MD010, no-hard-tabs)
231-231: Hard tabs
Column: 1
(MD010, no-hard-tabs)
232-232: Hard tabs
Column: 1
(MD010, no-hard-tabs)
289-289: Hard tabs
Column: 1
(MD010, no-hard-tabs)
290-290: Hard tabs
Column: 1
(MD010, no-hard-tabs)
291-291: Hard tabs
Column: 1
(MD010, no-hard-tabs)
292-292: Hard tabs
Column: 1
(MD010, no-hard-tabs)
293-293: Hard tabs
Column: 1
(MD010, no-hard-tabs)
294-294: Hard tabs
Column: 1
(MD010, no-hard-tabs)
349-349: Hard tabs
Column: 1
(MD010, no-hard-tabs)
350-350: Hard tabs
Column: 1
(MD010, no-hard-tabs)
351-351: Hard tabs
Column: 1
(MD010, no-hard-tabs)
352-352: Hard tabs
Column: 1
(MD010, no-hard-tabs)
353-353: Hard tabs
Column: 1
(MD010, no-hard-tabs)
354-354: Hard tabs
Column: 1
(MD010, no-hard-tabs)
408-408: Hard tabs
Column: 1
(MD010, no-hard-tabs)
409-409: Hard tabs
Column: 1
(MD010, no-hard-tabs)
410-410: Hard tabs
Column: 1
(MD010, no-hard-tabs)
411-411: Hard tabs
Column: 1
(MD010, no-hard-tabs)
412-412: Hard tabs
Column: 1
(MD010, no-hard-tabs)
413-413: Hard tabs
Column: 1
(MD010, no-hard-tabs)
414-414: Hard tabs
Column: 1
(MD010, no-hard-tabs)
478-478: Hard tabs
Column: 1
(MD010, no-hard-tabs)
479-479: Hard tabs
Column: 1
(MD010, no-hard-tabs)
480-480: Hard tabs
Column: 1
(MD010, no-hard-tabs)
481-481: Hard tabs
Column: 1
(MD010, no-hard-tabs)
482-482: Hard tabs
Column: 1
(MD010, no-hard-tabs)
483-483: Hard tabs
Column: 1
(MD010, no-hard-tabs)
540-540: Hard tabs
Column: 1
(MD010, no-hard-tabs)
541-541: Hard tabs
Column: 1
(MD010, no-hard-tabs)
542-542: Hard tabs
Column: 1
(MD010, no-hard-tabs)
543-543: Hard tabs
Column: 1
(MD010, no-hard-tabs)
544-544: Hard tabs
Column: 1
(MD010, no-hard-tabs)
545-545: Hard tabs
Column: 1
(MD010, no-hard-tabs)
604-604: Hard tabs
Column: 1
(MD010, no-hard-tabs)
605-605: Hard tabs
Column: 1
(MD010, no-hard-tabs)
606-606: Hard tabs
Column: 1
(MD010, no-hard-tabs)
607-607: Hard tabs
Column: 1
(MD010, no-hard-tabs)
608-608: Hard tabs
Column: 1
(MD010, no-hard-tabs)
609-609: Hard tabs
Column: 1
(MD010, no-hard-tabs)
664-664: Hard tabs
Column: 1
(MD010, no-hard-tabs)
665-665: Hard tabs
Column: 1
(MD010, no-hard-tabs)
666-666: Hard tabs
Column: 1
(MD010, no-hard-tabs)
667-667: Hard tabs
Column: 1
(MD010, no-hard-tabs)
668-668: Hard tabs
Column: 1
(MD010, no-hard-tabs)
669-669: Hard tabs
Column: 1
(MD010, no-hard-tabs)
728-728: Hard tabs
Column: 1
(MD010, no-hard-tabs)
729-729: Hard tabs
Column: 1
(MD010, no-hard-tabs)
730-730: Hard tabs
Column: 1
(MD010, no-hard-tabs)
731-731: Hard tabs
Column: 1
(MD010, no-hard-tabs)
732-732: Hard tabs
Column: 1
(MD010, no-hard-tabs)
733-733: Hard tabs
Column: 1
(MD010, no-hard-tabs)
790-790: Hard tabs
Column: 1
(MD010, no-hard-tabs)
791-791: Hard tabs
Column: 1
(MD010, no-hard-tabs)
792-792: Hard tabs
Column: 1
(MD010, no-hard-tabs)
793-793: Hard tabs
Column: 1
(MD010, no-hard-tabs)
794-794: Hard tabs
Column: 1
(MD010, no-hard-tabs)
795-795: Hard tabs
Column: 1
(MD010, no-hard-tabs)
849-849: Hard tabs
Column: 1
(MD010, no-hard-tabs)
850-850: Hard tabs
Column: 1
(MD010, no-hard-tabs)
851-851: Hard tabs
Column: 1
(MD010, no-hard-tabs)
852-852: Hard tabs
Column: 1
(MD010, no-hard-tabs)
853-853: Hard tabs
Column: 1
(MD010, no-hard-tabs)
854-854: Hard tabs
Column: 1
(MD010, no-hard-tabs)
912-912: Hard tabs
Column: 1
(MD010, no-hard-tabs)
913-913: Hard tabs
Column: 1
(MD010, no-hard-tabs)
914-914: Hard tabs
Column: 1
(MD010, no-hard-tabs)
915-915: Hard tabs
Column: 1
(MD010, no-hard-tabs)
916-916: Hard tabs
Column: 1
(MD010, no-hard-tabs)
917-917: Hard tabs
Column: 1
(MD010, no-hard-tabs)
976-976: Hard tabs
Column: 1
(MD010, no-hard-tabs)
977-977: Hard tabs
Column: 1
(MD010, no-hard-tabs)
978-978: Hard tabs
Column: 1
(MD010, no-hard-tabs)
979-979: Hard tabs
Column: 1
(MD010, no-hard-tabs)
980-980: Hard tabs
Column: 1
(MD010, no-hard-tabs)
981-981: Hard tabs
Column: 1
(MD010, no-hard-tabs)
982-982: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1019-1019: Hard tabs
Column: 18
(MD010, no-hard-tabs)
1020-1020: Hard tabs
Column: 18
(MD010, no-hard-tabs)
1071-1071: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1072-1072: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1073-1073: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1074-1074: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1075-1075: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1076-1076: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1077-1077: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1132-1132: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1133-1133: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1134-1134: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1135-1135: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1136-1136: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1137-1137: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1138-1138: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1197-1197: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1198-1198: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1199-1199: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1200-1200: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1201-1201: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1202-1202: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1203-1203: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1259-1259: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1260-1260: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1261-1261: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1262-1262: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1263-1263: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1264-1264: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1265-1265: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1321-1321: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1322-1322: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1323-1323: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1324-1324: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1325-1325: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1326-1326: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1383-1383: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1384-1384: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1385-1385: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1386-1386: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1387-1387: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1388-1388: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1448-1448: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1449-1449: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1450-1450: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1451-1451: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1452-1452: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1453-1453: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1510-1510: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1511-1511: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1512-1512: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1513-1513: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1514-1514: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1515-1515: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1576-1576: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1577-1577: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1578-1578: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1579-1579: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1580-1580: Hard tabs
Column: 1
(MD010, no-hard-tabs)
1581-1581: Hard tabs
Column: 1
(MD010, no-hard-tabs)
pkg/client/docs/models/components/errorresponse.md
10-10: Bare URL used
null
(MD034, no-bare-urls)
pkg/client/docs/sdks/ledger/README.md
21-21: Hard tabs
Column: 1
(MD010, no-hard-tabs)
22-22: Hard tabs
Column: 1
(MD010, no-hard-tabs)
23-23: Hard tabs
Column: 1
(MD010, no-hard-tabs)
24-24: Hard tabs
Column: 1
(MD010, no-hard-tabs)
25-25: Hard tabs
Column: 1
(MD010, no-hard-tabs)
76-76: Hard tabs
Column: 1
(MD010, no-hard-tabs)
77-77: Hard tabs
Column: 1
(MD010, no-hard-tabs)
78-78: Hard tabs
Column: 1
(MD010, no-hard-tabs)
79-79: Hard tabs
Column: 1
(MD010, no-hard-tabs)
80-80: Hard tabs
Column: 1
(MD010, no-hard-tabs)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Tests
🔇 Additional comments (97)
pkg/client/models/operations/options.go (2)
38-38
: New field added to Options structThe
SetHeaders
field enhances the SDK by allowing custom headers to be set for requests. This is a valuable addition for clients that need to set specific headers for authentication or other purposes.
110-117
: New helper function for setting custom headersThe
WithSetHeaders
function implementation looks good. Unlike other "With" functions, it doesn't check against supported options, which is appropriate since custom headers shouldn't be limited to a predefined set.pkg/client/docs/sdks/ledger/README.md (3)
4-5
: Added overview sectionGood addition that provides better structure to the documentation.
59-64
: Added error section for GetInfo operationGood addition that provides important information about possible error responses. The format change from "4xx-5xx" to "4XX, 5XX" maintains consistency with other documentation.
114-119
: Added error section for GetMetrics operationConsistent with the GetInfo operation, this addition provides important information about possible error responses.
pkg/client/formance.go (3)
44-46
: Added generic Pointer helper functionGood use of Go generics to create a more flexible helper function that can replace the type-specific pointer helpers. This simplifies the codebase while maintaining backward compatibility.
149-151
: Updated SDK version and related metadataStandard version update as part of the release process.
159-164
: Added environment variable fallback for security configurationThis is an excellent security enhancement that allows credentials to be loaded from environment variables when not explicitly provided. This approach:
- Improves security by avoiding hardcoded credentials
- Maintains backward compatibility by only applying when security is nil
- Aligns with the updated examples in the documentation
pkg/client/models/operations/v2importlogs.go (2)
11-13
: Improved flexibility for the request body parameterThe change from a string pointer to
any
type provides more flexibility, allowing various data sources like byte arrays and file handles to be used for log imports. This is a good enhancement that makes the API more versatile.
23-27
: Method correctly updated to match the new field nameThe getter method has been properly renamed from
GetRequestBody()
toGetV2ImportLogsRequest()
to maintain consistency with the field it accesses.pkg/client/README.md (2)
76-77
: Improved security by using environment variablesGood change - using environment variables for sensitive credentials instead of hardcoding them is a security best practice.
29-43
: Better documentation organizationThe improved table of contents structure with max depth setting and additional sections (Retries, Custom HTTP Client) makes the documentation more navigable and comprehensive.
pkg/client/internal/utils/security.go (3)
94-104
: Well-designed entry point for environment variable security populationThe
PopulateSecurityFromEnv
function provides a clean entry point for populating security configurations from environment variables. This enhances security by eliminating hardcoded credentials in the code.
106-154
: Well-structured recursive approach for struct populationThe
populateStructFromEnv
function uses a robust recursive approach to handle nested structs. It correctly handles pointer types, initializes new values when needed, and returns a boolean to indicate whether any fields were populated.
347-348
: Enhanced tag parsing with environment variable supportAdding the
env
option to the security tag enables seamless integration with environment variables, improving security and configuration flexibility.pkg/client/internal/utils/queryparams.go (4)
68-72
: Added support for constant query parametersGood enhancement that allows for static/constant query parameters to be added regardless of field values. This increases flexibility when defining API requests.
225-229
: Improved handling of nested parameters with inline optionThe updated scope calculation now respects the
Inline
flag, which allows for proper handling of union/oneOf types in nested structures. This creates cleaner query parameter structures in complex scenarios.
267-273
: Well-documented Inline flag for union/oneOf typesThe addition of the
Inline
field with comprehensive documentation provides clear guidance on its usage for special cases. This is a good example of self-documenting code.
251-252
: Enhanced form parameter handling with default valuesAdding default value support to the form parameter handling improves robustness when dealing with optional parameters. This change is well integrated with the existing parameter handling flow.
pkg/client/internal/utils/utils.go (5)
6-6
: No significant issues with the new import.Straightforward addition of the "bytes" package for usage in other parts of the code.
11-12
: Added standard libraries net/http and os imports.These imports appear correct for the new HTTP response manipulation and environment variable usage. No concerns.
143-161
: No issues with parsing field tags.The
parseConstTag
andparseDefaultTag
logic is straightforward and handles empty tags cleanly.
194-195
: Inline example comments only.No functional changes or concerns here.
350-360
: Reusable response body logic looks good.
ConsumeRawBody
properly reads the body, closes it, and replaces it to allow subsequent reads. Implementation is standard and correct.pkg/client/retry/config.go (13)
5-10
: Imports for error & HTTP usage look correct.No issues with new imports for
errors
,net/http
,strconv
, andtime
.
12-13
: Minor doc commentary changes.These lines only update the docstring for backoff strategy usage. Looks good.
21-21
: No functional changes in BackoffStrategy.The existing fields remain unchanged, so there’s nothing to address.
22-22
: Config struct doc updates.Clarifies supported strategies, including "backoff" and "none". No issues.
31-36
: New PermanentError struct introduced.Encapsulates terminal failures and cleanly signals when retries should be abandoned.
37-47
: Implementation of Permanent(...) function.Checks if error is already permanent, otherwise wraps it. Concise pattern for controlling retries.
49-55
: Error() and Unwrap() on PermanentError.Implements the standard error interface. No issues found.
57-62
: New TemporaryError type introduced.Separates retryable from non-retryable errors. Straightforward design choice.
64-72
: Temporary(...) function.Simple constructor for a retryable error. Clear and concise.
74-82
: TemporaryFromResponse(...) function.Allows dynamic backoff intervals based on the Retry-After header. Well-integrated.
84-127
: TemporaryError methods & helper function.
Error()
returns a string,RetryAfter()
returns a custom interval, andretryIntervalFromResponse
logic covers both integer seconds and RFC1123 date formats.
128-137
: IsPermanentError implementation.Uses errors.As(...) for robust error chain detection. Good usage of the standard pattern.
139-148
: IsTemporaryError implementation.Similar approach to detect a TemporaryError in the chain. No concerns.
pkg/client/internal/utils/retries.go (20)
10-11
: New math & rand imports.These facilitate exponential backoff and jitter. No concerns.
30-30
: Parameter rename from 'action' to 'operation'.Slight improvement in clarity. No issues.
39-39
: Introduction of retryWithBackoff usage.Moves logic into a dedicated function for improved maintainability.
43-43
: Closing the previous response body if not nil.Prevents resource leaks between retry attempts. Good practice.
50-50
: Operation call inside retry loop.Ensures each retry is an independent request. Implementation looks correct.
59-59
: Permanent error classification.Wrapping an error as permanent avoids retries for non-transient failures. Appropriate approach.
75-77
: Use of TemporaryFromResponse with matching status codes.Dynamically applies Retry-After from the response when a known error status is encountered.
85-86
: Similar approach for other status code checks.No concerns; consistent method for signaling temporary errors.
94-96
: Handling TemporaryError specifically.If error is not temporary, returning it immediately prevents unnecessary retries.
100-100
: Returning final response after successful retry loop.Captures and returns the latest valid response.
102-104
: Default: 'none' or empty retry strategy.Provides a simple pass-through without retries if not configured.
106-109
: New function signature forretryWithBackoff
.Centralizes backoff-based retry logic. Cleaner separation of concerns.
115-153
: Robust backoff loop with typed errors.Defers timer cleanup, detects permanent/temporary errors, and respects maximum elapsed time. Solid implementation.
156-161
: Timer interface helps with testability.Good design for mocking or custom time manipulation.
162-167
: defaultTimer struct for real-time usage.Straightforward usage of time.Timer implementing the Timer interface.
168-170
: Timer channel accessor.Provides the time channel for synchronization.
172-177
: Start method ensures Timer creation or reset.Prevents stale timers and ensures fresh durations for each retry.
179-187
: Stop method carefully drains the channel.Ensures no channel leaks or unexpected triggers.
189-194
: Stop method finalization.Double-checks the timer is not reused. Clean resource handling.
196-220
: nextInterval for exponential backoff with jitter.Good standard approach. Helps mitigate the thundering herd problem.
docs/api/README.md (7)
274-274
: Body parameter now required forV2CreateLedgerRequest
The API documentation correctly updates the required status of the
body
parameter for the Create Ledger endpoint fromfalse
totrue
. This aligns with the implementation changes in the SDK whereV2CreateLedgerRequest
is now used as a value type rather than a pointer.
329-329
: Body parameter now required forV2Metadata
The required status for the body parameter has been updated to
true
for update ledger metadata operations, correctly reflecting that this data is mandatory.
514-514
: Body parameter now required for bulk operationsThe bulk request endpoint now correctly specifies that the body parameter is required, which aligns with the actual API behavior.
658-658
: Body parameter now required for various object requestsAll these endpoints (Count Accounts, List Accounts, Count Transactions, List Transactions, and Get Aggregated Balances) now correctly specify that the body parameter is required, which ensures proper API consumption.
Also applies to: 723-723, 1070-1070, 1137-1137, 1776-1776
1590-1590
: Body parameter now required for transaction metadataThe Update Transaction Metadata endpoint now correctly specifies that the body parameter is required, ensuring clients provide the necessary metadata information.
1980-1990
: Improved request structure for importing logsThe request body for importing logs has been significantly improved:
- Changed from a simple string to a properly structured
V2ImportLogsRequest
object- Added proper documentation for the file parameter as a binary string
- Made the parameter required with
true
This change provides better API clarity and documentation for consumers.
4439-4458
: Well-structured schema forV2ImportLogsRequest
The addition of the
V2ImportLogsRequest
schema properly documents the structure expected for log imports, with a required binary file field. This enhances the API documentation's completeness and usability.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
4453-4453: Multiple headings with the same content
null(MD024, no-duplicate-heading)
pkg/client/internal/hooks/clientcredentials.go (8)
13-13
: Improved thread safety with sync importsThe addition of
singleflight
andsync
packages enables better handling of concurrent requests for authentication tokens, whilereflect
allows for more dynamic handling of security configurations.Also applies to: 17-19
42-48
: Enhanced concurrency handling for session managementThe refactoring from a regular map to
sync.Map
and the addition ofsingleflight.Group
significantly improves thread safety and prevents redundant token refresh requests, which is critical for high-concurrency environments.
56-60
: Updated constructor for thread-safe operationThe constructor now initializes the
singleflight.Group
instead of a regular map, ensuring the hook is properly configured for concurrent operation from the start.
73-88
: Simplified token acquisition in request handlingThe BeforeRequest method now uses the new
getSession
helper method, making the code more modular and easier to maintain while ensuring proper token handling and error propagation.
111-115
: Improved token invalidation on unauthorized responsesThe AfterError method now properly handles token invalidation using the singleflight group's Forget method alongside the sync.Map's Delete method, ensuring proper cleanup of expired or invalid tokens.
120-143
: Refactored token request method for improved context handlingThe doTokenRequest method now accepts a HookContext instead of a basic context.Context, and properly uses the BaseURL from the context for constructing token URLs. This ensures proper URL resolution across different API endpoints.
183-224
: Improved credential handling with better organizationThe refactoring of the credential logic into separate methods (getCredentials and getCredentialsGlobal) improves code organization and maintainability. The addition of detailed field inspection using reflection is a robust approach to handle missing TokenURL values by falling back to default values from struct tags.
226-261
: Well-implemented session management with concurrency controlThe new getSession method is a significant improvement that:
- Properly handles concurrent token requests using singleflight
- Checks for required scopes and token expiration
- Efficiently stores and retrieves sessions using sync.Map
- Has clear error handling and propagation
This implementation prevents the "thundering herd" problem when multiple requests need token refresh simultaneously.
pkg/client/v1.go (6)
14-14
: No concerns about the new 'retry' import.
This addition cleanly supports the updated error-handling approach.
84-86
: Good approach for injecting user-defined headers.
This allows customization but note that these calls will override existing headers with the same key.
118-122
: Confirm handling strategy for temporary vs. permanent errors.
Currently, both temporary and permanent errors return immediately. If a “temporary” error really should be retried, this logic might prevent proper retry attempts.
188-191
: Switch to 'ConsumeRawBody' looks fine.
Reading the entire response body is straightforward but be mindful of large payloads to avoid memory bloat.
1115-1117
: Conditional Content-Type header assignment is clear.
Setting “Content-Type” only if it’s non-empty is a sensible approach for configured payloads.
2689-2690
: New 'GetTransaction' method signature looks fine.
Be sure to add test coverage to ensure correctness of the newly introduced endpoint.pkg/client/docs/sdks/v1/README.md (2)
36-40
: [Operation List Content Review]
The “Available Operations” list is now much more detailed. Verify that the order and naming of operations align with the API specification and that deprecated endpoints (e.g. RunScript) are clearly marked.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
39-39: Hard tabs
Column: 1(MD010, no-hard-tabs)
40-40: Hard tabs
Column: 1(MD010, no-hard-tabs)
75-83
: [Enhanced Error Documentation]
The newly introduced “### Errors” subsections in each operation now clearly list error types and status codes. This is a good improvement that enhances the developer experience.pkg/client/docs/sdks/v2/README.md (17)
4-5
: [Overview Section Addition]
The addition of the “Overview” section for v2 is a welcome improvement, as it offers a succinct summary of new and updated operations. Ensure that the styling remains consistent with other parts of the documentation.
40-73
: [ListLedgers Example Update]
The example usage forListLedgers
correctly demonstrates how to initialize context, set up security credentials from environment variables, and invoke the new V2 endpoint. The use of a cursor and page size is clear. Please verify that the sample cursor value is illustrative and that it matches the expected format from your API.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
44-44: Hard tabs
Column: 1(MD010, no-hard-tabs)
45-45: Hard tabs
Column: 1(MD010, no-hard-tabs)
46-46: Hard tabs
Column: 1(MD010, no-hard-tabs)
47-47: Hard tabs
Column: 1(MD010, no-hard-tabs)
48-48: Hard tabs
Column: 1(MD010, no-hard-tabs)
49-49: Hard tabs
Column: 1(MD010, no-hard-tabs)
100-132
: [GetLedger Example Consistency]
TheGetLedger
example now uses the V2 request object properly and the parameters are clearly documented. This refactoring promotes clarity over intermediate variable creation.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
104-104: Hard tabs
Column: 1(MD010, no-hard-tabs)
105-105: Hard tabs
Column: 1(MD010, no-hard-tabs)
106-106: Hard tabs
Column: 1(MD010, no-hard-tabs)
107-107: Hard tabs
Column: 1(MD010, no-hard-tabs)
108-108: Hard tabs
Column: 1(MD010, no-hard-tabs)
109-109: Hard tabs
Column: 1(MD010, no-hard-tabs)
153-196
: [CreateLedger Example Update]
The newCreateLedger
example demonstrates the updated pattern—including the use of the nestedV2CreateLedgerRequest
within the request object. Verify that the metadata example is representative of actual use cases.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
163-163: Hard tabs
Column: 1(MD010, no-hard-tabs)
164-164: Hard tabs
Column: 1(MD010, no-hard-tabs)
165-165: Hard tabs
Column: 1(MD010, no-hard-tabs)
166-166: Hard tabs
Column: 1(MD010, no-hard-tabs)
167-167: Hard tabs
Column: 1(MD010, no-hard-tabs)
168-168: Hard tabs
Column: 1(MD010, no-hard-tabs)
217-278
: [Update and Delete Ledger Metadata Endpoints]
The examples forUpdateLedgerMetadata
andDeleteLedgerMetadata
now include proper request bodies and key values, enhancing the documentation. Please confirm that the descriptions in the “Parameters” sections correctly explain the purpose of each field.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
227-227: Hard tabs
Column: 1(MD010, no-hard-tabs)
228-228: Hard tabs
Column: 1(MD010, no-hard-tabs)
229-229: Hard tabs
Column: 1(MD010, no-hard-tabs)
230-230: Hard tabs
Column: 1(MD010, no-hard-tabs)
231-231: Hard tabs
Column: 1(MD010, no-hard-tabs)
232-232: Hard tabs
Column: 1(MD010, no-hard-tabs)
340-397
: [GetLedgerInfo Example Refinement]
The updatedGetLedgerInfo
example now follows the consistent pattern of context management, security credentials, and request initialization. The “Errors” table shows the new error types (e.g.sdkerrors.V2ErrorResponse
). This consistency will greatly help developers understand error handling.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
349-349: Hard tabs
Column: 1(MD010, no-hard-tabs)
350-350: Hard tabs
Column: 1(MD010, no-hard-tabs)
351-351: Hard tabs
Column: 1(MD010, no-hard-tabs)
352-352: Hard tabs
Column: 1(MD010, no-hard-tabs)
353-353: Hard tabs
Column: 1(MD010, no-hard-tabs)
354-354: Hard tabs
Column: 1(MD010, no-hard-tabs)
468-529
: [CountAccounts and ListAccounts Examples]
Both examples now include aRequestBody
(even if empty or minimal) which aligns with the updated API requirement that the body parameter is mandatory. Please double-check that the examples cover typical use cases and that the key names in the maps match those expected by the API.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
478-478: Hard tabs
Column: 1(MD010, no-hard-tabs)
479-479: Hard tabs
Column: 1(MD010, no-hard-tabs)
480-480: Hard tabs
Column: 1(MD010, no-hard-tabs)
481-481: Hard tabs
Column: 1(MD010, no-hard-tabs)
482-482: Hard tabs
Column: 1(MD010, no-hard-tabs)
483-483: Hard tabs
Column: 1(MD010, no-hard-tabs)
595-653
: [GetAccount and AddMetadataToAccount Examples]
The updated examples show proper integration with the V2 endpoints by providing the required address details and request bodies. The usage of flags likeDryRun
is clear.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
604-604: Hard tabs
Column: 1(MD010, no-hard-tabs)
605-605: Hard tabs
Column: 1(MD010, no-hard-tabs)
606-606: Hard tabs
Column: 1(MD010, no-hard-tabs)
607-607: Hard tabs
Column: 1(MD010, no-hard-tabs)
608-608: Hard tabs
Column: 1(MD010, no-hard-tabs)
609-609: Hard tabs
Column: 1(MD010, no-hard-tabs)
728-778
: [DeleteAccountMetadata Example]
TheDeleteAccountMetadata
usage is now fully aligned with the V2 API, clearly demonstrating the required parameters. Verify that the address value shown (e.g."96609 Cummings Canyon"
) is intended as an example and does not unintentionally reveal sensitive data.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
728-728: Hard tabs
Column: 1(MD010, no-hard-tabs)
729-729: Hard tabs
Column: 1(MD010, no-hard-tabs)
730-730: Hard tabs
Column: 1(MD010, no-hard-tabs)
731-731: Hard tabs
Column: 1(MD010, no-hard-tabs)
732-732: Hard tabs
Column: 1(MD010, no-hard-tabs)
733-733: Hard tabs
Column: 1(MD010, no-hard-tabs)
778-838
: [ReadStats and CountTransactions Examples]
The detailed examples forReadStats
andCountTransactions
cover initialization, request objects, and error handling. The improvements in formatting and consistency are notable. Please ensure that the examples fully reflect all mandatory fields.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
790-790: Hard tabs
Column: 1(MD010, no-hard-tabs)
791-791: Hard tabs
Column: 1(MD010, no-hard-tabs)
792-792: Hard tabs
Column: 1(MD010, no-hard-tabs)
793-793: Hard tabs
Column: 1(MD010, no-hard-tabs)
794-794: Hard tabs
Column: 1(MD010, no-hard-tabs)
795-795: Hard tabs
Column: 1(MD010, no-hard-tabs)
902-965
: [ListTransactions and CreateTransaction Examples]
The examples for listing and creating transactions now demonstrate the proper conversion of numeric fields (usingbig.NewInt(...)
) and include flags likeDryRun
andForce
where applicable. The inclusion of a script within the transaction object is very helpful.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
912-912: Hard tabs
Column: 1(MD010, no-hard-tabs)
913-913: Hard tabs
Column: 1(MD010, no-hard-tabs)
914-914: Hard tabs
Column: 1(MD010, no-hard-tabs)
915-915: Hard tabs
Column: 1(MD010, no-hard-tabs)
916-916: Hard tabs
Column: 1(MD010, no-hard-tabs)
917-917: Hard tabs
Column: 1(MD010, no-hard-tabs)
1060-1121
: [GetTransaction and AddMetadataOnTransaction Examples]
Both examples have been updated to use V2 request objects and to demonstrate conversion of IDs usingbig.NewInt(...)
. The consistent error handling and response checking make the examples easy to follow.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
1071-1071: Hard tabs
Column: 1(MD010, no-hard-tabs)
1072-1072: Hard tabs
Column: 1(MD010, no-hard-tabs)
1073-1073: Hard tabs
Column: 1(MD010, no-hard-tabs)
1074-1074: Hard tabs
Column: 1(MD010, no-hard-tabs)
1075-1075: Hard tabs
Column: 1(MD010, no-hard-tabs)
1076-1076: Hard tabs
Column: 1(MD010, no-hard-tabs)
1077-1077: Hard tabs
Column: 1(MD010, no-hard-tabs)
1188-1248
: [DeleteTransactionMetadata Example]
The updated example shows the required fields for deleting transaction metadata and uses a clear demonstration format. Ensure that example ID values and keys are generic enough for public documentation.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
1197-1197: Hard tabs
Column: 1(MD010, no-hard-tabs)
1198-1198: Hard tabs
Column: 1(MD010, no-hard-tabs)
1199-1199: Hard tabs
Column: 1(MD010, no-hard-tabs)
1200-1200: Hard tabs
Column: 1(MD010, no-hard-tabs)
1201-1201: Hard tabs
Column: 1(MD010, no-hard-tabs)
1202-1202: Hard tabs
Column: 1(MD010, no-hard-tabs)
1203-1203: Hard tabs
Column: 1(MD010, no-hard-tabs)
1259-1310
: [RevertTransaction Example]
The changes in theRevertTransaction
example now include aDryRun
flag and use the appropriate V2 request object. This update mirrors other operations and should be well understood by API consumers.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
1259-1259: Hard tabs
Column: 1(MD010, no-hard-tabs)
1260-1260: Hard tabs
Column: 1(MD010, no-hard-tabs)
1261-1261: Hard tabs
Column: 1(MD010, no-hard-tabs)
1262-1262: Hard tabs
Column: 1(MD010, no-hard-tabs)
1263-1263: Hard tabs
Column: 1(MD010, no-hard-tabs)
1264-1264: Hard tabs
Column: 1(MD010, no-hard-tabs)
1265-1265: Hard tabs
Column: 1(MD010, no-hard-tabs)
1311-1372
: [GetBalancesAggregated and GetVolumesWithBalances Examples]
The examples here incorporate the mandatory request body fields and demonstrate the use of pagination and grouping parameters. They are well-structured and clear.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
1321-1321: Hard tabs
Column: 1(MD010, no-hard-tabs)
1322-1322: Hard tabs
Column: 1(MD010, no-hard-tabs)
1323-1323: Hard tabs
Column: 1(MD010, no-hard-tabs)
1324-1324: Hard tabs
Column: 1(MD010, no-hard-tabs)
1325-1325: Hard tabs
Column: 1(MD010, no-hard-tabs)
1326-1326: Hard tabs
Column: 1(MD010, no-hard-tabs)
1439-1501
: [ListLogs Example]
TheListLogs
example now requires aRequestBody
map, aligning with the updated API requirements. The pagination parameters and cursor values are clearly shown.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
1448-1448: Hard tabs
Column: 1(MD010, no-hard-tabs)
1449-1449: Hard tabs
Column: 1(MD010, no-hard-tabs)
1450-1450: Hard tabs
Column: 1(MD010, no-hard-tabs)
1451-1451: Hard tabs
Column: 1(MD010, no-hard-tabs)
1452-1452: Hard tabs
Column: 1(MD010, no-hard-tabs)
1453-1453: Hard tabs
Column: 1(MD010, no-hard-tabs)
1503-1565
: [ImportLogs and ExportLogs Examples]
TheImportLogs
example shows how to stream logs from a file (usingos.Open
), which aligns with the new PR objective “use streaming file system for logs imports.” This is a significant improvement. TheExportLogs
example is similarly well structured.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
1510-1510: Hard tabs
Column: 1(MD010, no-hard-tabs)
1511-1511: Hard tabs
Column: 1(MD010, no-hard-tabs)
1512-1512: Hard tabs
Column: 1(MD010, no-hard-tabs)
1513-1513: Hard tabs
Column: 1(MD010, no-hard-tabs)
1514-1514: Hard tabs
Column: 1(MD010, no-hard-tabs)
1515-1515: Hard tabs
Column: 1(MD010, no-hard-tabs)
AcceptHeaderEnumApplicationJson AcceptHeaderEnum = "application/json" | ||
AcceptHeaderEnumWildcardRootWildcard AcceptHeaderEnum = "*/*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API Change: Constant renamed from AcceptHeaderEnumWildcardWildcard to AcceptHeaderEnumWildcardRootWildcard
This is a breaking change that might affect existing code. Ensure this change is communicated in release notes and that all dependent code is updated accordingly.
1828b5f
to
4310124
Compare
4310124
to
ae04486
Compare
#766) * feat: upgrade skeapeasy and use streaming file system for logs imports * feat: use speakeasy workflow to regenerate the sdk * fix: add staticcheck for speakeasy
#766) * feat: upgrade skeapeasy and use streaming file system for logs imports * feat: use speakeasy workflow to regenerate the sdk * fix: add staticcheck for speakeasy
#766) * feat: upgrade skeapeasy and use streaming file system for logs imports * feat: use speakeasy workflow to regenerate the sdk * fix: add staticcheck for speakeasy
#766) * feat: upgrade skeapeasy and use streaming file system for logs imports * feat: use speakeasy workflow to regenerate the sdk * fix: add staticcheck for speakeasy
No description provided.