arlyon / async-stripe

Async (and blocking!) Rust bindings for the Stripe API
https://payments.rs
Apache License 2.0
436 stars 127 forks source link

fix: Make subscription_details.metadata optional #443

Closed benbrandt closed 11 months ago

benbrandt commented 11 months ago

Summary

Looking at the OpenAPI spec, this field is nullable, and therefore should be an Option. All of our invoice webhook events are failing because the webhook events has

{ metadata: null }

On both the latest and last API version of stripe.

Checklist

timsueberkrueb commented 11 months ago

@arlyon can we get this merged timely and can we have a release containing this fix on crates.io? Thanks!

arlyon commented 11 months ago

CI running now I'll check back in 30 mins

benbrandt commented 11 months ago

@arlyon it seems this will fail because the generated code doesn't match. I assumed this might be the case, but I'm not sure where the code would be to make this generate an Option based on the nullable field

arlyon commented 11 months ago

I am going to sort this out in the codegen for you I have a free 30 mins now

arlyon commented 11 months ago

Closing for https://github.com/arlyon/async-stripe/pull/444

arlyon commented 11 months ago

Released as 0.25.1

Technically a breaking change but this library has pretty lax opinions on breaking changes that come as a result of openapi changes, since a breaking change in stripe is a breaking change for code that relies on stripe.

Now to investigate why releases / changelogs are broken ... always something broken :joy:

timsueberkrueb commented 11 months ago

Thanks a lot for the timely fix!