Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.90.0"
".": "0.90.1"
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.90.1 (2025-01-31)

Full Changelog: [v0.90.0...v0.90.1](https://github.com/orbcorp/orb-go/compare/v0.90.0...v0.90.1)

### Bug Fixes

* fix unicode encoding for json ([#413](https://github.com/orbcorp/orb-go/issues/413)) ([c516247](https://github.com/orbcorp/orb-go/commit/c5162474177d71695aea73341cb1e2802e88672d))


### Chores

* **internal:** codegen related update ([#411](https://github.com/orbcorp/orb-go/issues/411)) ([c816078](https://github.com/orbcorp/orb-go/commit/c816078d28d0101fe4c4bd3aa2bd6bd3568e7c38))

## 0.90.0 (2025-01-30)

Full Changelog: [v0.89.1...v0.90.0](https://github.com/orbcorp/orb-go/compare/v0.89.1...v0.90.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/orbcorp/[email protected].0'
go get -u 'github.com/orbcorp/[email protected].1'
```

<!-- x-release-please-end -->
Expand Down
42 changes: 21 additions & 21 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ func TestRetryAfter(t *testing.T) {
},
}),
)
res, err := client.Customers.New(context.Background(), orb.CustomerNewParams{
_, err := client.Customers.New(context.Background(), orb.CustomerNewParams{
Email: orb.F("[email protected]"),
Name: orb.F("My Customer"),
})
if err == nil || res != nil {
t.Error("Expected there to be a cancel error and for the response to be nil")
if err == nil {
t.Error("Expected there to be a cancel error")
}

attempts := len(retryCountHeaders)
Expand Down Expand Up @@ -100,12 +100,12 @@ func TestDeleteRetryCountHeader(t *testing.T) {
}),
option.WithHeaderDel("X-Stainless-Retry-Count"),
)
res, err := client.Customers.New(context.Background(), orb.CustomerNewParams{
_, err := client.Customers.New(context.Background(), orb.CustomerNewParams{
Email: orb.F("[email protected]"),
Name: orb.F("My Customer"),
})
if err == nil || res != nil {
t.Error("Expected there to be a cancel error and for the response to be nil")
if err == nil {
t.Error("Expected there to be a cancel error")
}

expectedRetryCountHeaders := []string{"", "", ""}
Expand All @@ -132,12 +132,12 @@ func TestOverwriteRetryCountHeader(t *testing.T) {
}),
option.WithHeader("X-Stainless-Retry-Count", "42"),
)
res, err := client.Customers.New(context.Background(), orb.CustomerNewParams{
_, err := client.Customers.New(context.Background(), orb.CustomerNewParams{
Email: orb.F("[email protected]"),
Name: orb.F("My Customer"),
})
if err == nil || res != nil {
t.Error("Expected there to be a cancel error and for the response to be nil")
if err == nil {
t.Error("Expected there to be a cancel error")
}

expectedRetryCountHeaders := []string{"42", "42", "42"}
Expand All @@ -163,12 +163,12 @@ func TestRetryAfterMs(t *testing.T) {
},
}),
)
res, err := client.Customers.New(context.Background(), orb.CustomerNewParams{
_, err := client.Customers.New(context.Background(), orb.CustomerNewParams{
Email: orb.F("[email protected]"),
Name: orb.F("My Customer"),
})
if err == nil || res != nil {
t.Error("Expected there to be a cancel error and for the response to be nil")
if err == nil {
t.Error("Expected there to be a cancel error")
}
if want := 3; attempts != want {
t.Errorf("Expected %d attempts, got %d", want, attempts)
Expand All @@ -188,12 +188,12 @@ func TestContextCancel(t *testing.T) {
)
cancelCtx, cancel := context.WithCancel(context.Background())
cancel()
res, err := client.Customers.New(cancelCtx, orb.CustomerNewParams{
_, err := client.Customers.New(cancelCtx, orb.CustomerNewParams{
Email: orb.F("[email protected]"),
Name: orb.F("My Customer"),
})
if err == nil || res != nil {
t.Error("Expected there to be a cancel error and for the response to be nil")
if err == nil {
t.Error("Expected there to be a cancel error")
}
}

Expand All @@ -210,12 +210,12 @@ func TestContextCancelDelay(t *testing.T) {
)
cancelCtx, cancel := context.WithTimeout(context.Background(), 2*time.Millisecond)
defer cancel()
res, err := client.Customers.New(cancelCtx, orb.CustomerNewParams{
_, err := client.Customers.New(cancelCtx, orb.CustomerNewParams{
Email: orb.F("[email protected]"),
Name: orb.F("My Customer"),
})
if err == nil || res != nil {
t.Error("expected there to be a cancel error and for the response to be nil")
if err == nil {
t.Error("expected there to be a cancel error")
}
}

Expand All @@ -238,12 +238,12 @@ func TestContextDeadline(t *testing.T) {
},
}),
)
res, err := client.Customers.New(deadlineCtx, orb.CustomerNewParams{
_, err := client.Customers.New(deadlineCtx, orb.CustomerNewParams{
Email: orb.F("[email protected]"),
Name: orb.F("My Customer"),
})
if err == nil || res != nil {
t.Error("expected there to be a deadline error and for the response to be nil")
if err == nil {
t.Error("expected there to be a deadline error")
}
close(testDone)
}()
Expand Down
2 changes: 1 addition & 1 deletion internal/apijson/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (e *encoder) newPrimitiveTypeEncoder(t reflect.Type) encoderFunc {
// code more and this current code shouldn't cause any issues
case reflect.String:
return func(v reflect.Value) ([]byte, error) {
return []byte(fmt.Sprintf("%q", v.String())), nil
return json.Marshal(v.Interface())
}
case reflect.Bool:
return func(v reflect.Value) ([]byte, error) {
Expand Down
2 changes: 1 addition & 1 deletion internal/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

package internal

const PackageVersion = "0.90.0" // x-release-please-version
const PackageVersion = "0.90.1" // x-release-please-version