-
Notifications
You must be signed in to change notification settings - Fork 270
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
Go SDK #4134
Go SDK #4134
Conversation
assert.Nil(t, err) | ||
client := registryclientv2.NewApiClient(adapter) | ||
|
||
info, err := client.System().Info().Get(context.Background(), nil) |
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.
this is the actual usage of the generated SDK by the user (and for a GET is pretty nice!)
assert.Equal(t, "apicurio-registry", *info.GetName()) | ||
} | ||
|
||
func TestCreateAnArtifact(t *testing.T) { |
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.
and this is a POST to create an artifact etc. It looks like way too much work than necessary ...
with: | ||
go-version: '1.20' | ||
|
||
- name: Build Registry |
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.
We must start considering having a previous step in building the project instead of building it in every single job (not saying it must be done in this PR, just making it clear).
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.
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.
agree, that will be a nice optimization.
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.
LGTM
This makes me wonder, if we're generating now the Python SDK on this repo and also the Go SDK, shall we remove the notify-sdk-x jobs from the CI jobs? |
Yes, let me do it. |
ready to merge? |
There is still a gritty detail about disabling a compression middleware when performing POST operations ( ref ).
But we can iterate on it when we solve the issue upstream.
For the reviewers, skip the generated code and look at those:
go-sdk/pkg/tests/client_test.go
as it shows the usage from a user perspective