Skip to content

feat(sdk): init Go, Python and TypeScript SDKs#4358

Draft
tothandras wants to merge 1 commit into
mainfrom
feat/v3-sdk
Draft

feat(sdk): init Go, Python and TypeScript SDKs#4358
tothandras wants to merge 1 commit into
mainfrom
feat/v3-sdk

Conversation

@tothandras
Copy link
Copy Markdown
Contributor

No description provided.

@tothandras tothandras added the release-note/feature Release note: Exciting New Features label May 13, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2caead5d-6b36-4705-beec-b79d36d270a4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/v3-sdk

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

//
// The `asc` suffix is optional as the default sort order is ascending. The `desc`
// suffix is used to specify a descending order.
type SortQuery struct {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks incorrect to me, since the sort should be string type.


sdk := sdkpkg.New(sdkpkg.WithServerURL(srv.URL))
ctx := context.Background()
res, err := sdk.OpenMeterMeters.ListMeters(ctx, operations.ListMetersRequest{})
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method naming is redundant, can you please change it? Either way would be great, like: sdk.OpenMeterMeters.List(...) or sdk.OpenMeter.ListMeters(...)

I personally like the first option a little bit more.

}

// String provides a helper function to return a pointer to a string
func String(s string) *string { return &s }
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part is redundant, since the types package already has a pointer helper file. Can you please use that instead of these?

{
"port": "8888",
},
{},
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please remove the empty map instances from here?

return nil, fmt.Errorf("error generating URL: %w", err)
}

req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please modify the skill to use http.MethodGet and other constants for method setup?

if err != nil {
return nil, err
}
var out map[string]any
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way the response value would be nearly typeless, which is not a good thing, can you please force it to unmarshal into the real response format? Also, this is not a very optimal way for parsing an io.Reader, please use the json.NewDecoder(httpRes.Body).Decode(res.Body) instead.


type ListAddonsResponse struct {
HTTPMeta components.HTTPMetadata
Body *map[string]any
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please force the generator to populate here the real ListAddon response format.

if res == nil {
t.Fatal("ListMeters returned nil response")
}
if res.HTTPMeta.Response == nil {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smoke test it not correct, please change it to check the type of the response body.

@tothandras tothandras changed the title feat(sdk): init go and typescript SDKs feat(sdk): init Go, Python and TypeScript SDKs May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/feature Release note: Exciting New Features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants