-
Notifications
You must be signed in to change notification settings - Fork 0
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
[INTER-690] Response Transparency, re-written request handling logic #63
Conversation
10a018a
to
2660efd
Compare
This comment has been minimized.
This comment has been minimized.
BREAKING CHANGE: optional pkg is no longer used in this SDK. Please pass native GO types instead.
c5fe241
to
e1917e8
Compare
e35b3dd
to
00261dd
Compare
BREAKING CHANGE: when checking for too many requests error, please use `*sdk.ManyRequestsResponse`. For example: ```go response, httpRes, err := client.FingerprintApi.GetVisits(auth, visitorId, &opts) fmt.Printf("%+v\n", httpRes) if err != nil { switch err.(type) { case sdk.GenericSwaggerError: switch model := err.(sdk.GenericSwaggerError).Model().(type) { case *sdk.ManyRequestsResponse: log.Printf("Too many requests, retry after %d seconds", model.RetryAfter) } default: log.Fatal(err) } } ```
00261dd
to
aaf0ca9
Compare
This PR will create a major release 🚀6.0.0 (2024-06-17)⚠ BREAKING CHANGES
response, httpRes, err := client.FingerprintApi.GetVisits(auth, visitorId, &opts)
fmt.Printf("%+v\n", httpRes)
if err != nil {
switch err.(type) {
case sdk.GenericSwaggerError:
switch model := err.(sdk.GenericSwaggerError).Model().(type) {
case *sdk.ManyRequestsResponse:
log.Printf("Too many requests, retry after %d seconds", model.RetryAfter)
}
default:
log.Fatal(err)
}
}
Features |
Wrong commit message format detectedWe use Semantic Commit Messages in our project.
Run the next command in the project root to activate local hooks: sh ./install_hooks.sh More info you can find in job logs Commitlint Errors |
🎉 This PR is included in version 6.0.0-test.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 6.0.0-test.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
2 similar comments
🎉 This PR is included in version 6.0.0-test.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 6.0.0-test.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 6.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This PR introduces couple of changes.
The main change is removal of swagger generated code used for sending requests. Right now this logic is written by hand.
I've tried to find a good balance between generated code that ensures that the SDK is in sync with our OpenAPI schema and manually written code that will be easy to maintain, and I've came up with the following solution:
Model
property ofGenericSwaggerError
which was required in order for the statusCode -> responseType mapping to work. This change was reflected in examples and readme.Other changes included in this PR:
generate.go
to automatically update module version mentions on major releases.