Skip to content
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

Updating to OpenAPI Version 3 - Stripe Version: 2020-08-27 #630

Closed
PJUllrich opened this issue Nov 1, 2020 · 11 comments
Closed

Updating to OpenAPI Version 3 - Stripe Version: 2020-08-27 #630

PJUllrich opened this issue Nov 1, 2020 · 11 comments

Comments

@PJUllrich
Copy link
Contributor

Dear maintainers,

I was wondering whether you are planning on upgrading this library to the latest Stripe API version, which currently is 2020-08-27. This would include upgrading to the Stripe OpenAPI v3 which is already supported by stripe-mock. There are 2 major updates, 2019-12-03 and 2020-03-02.

I'm unsure how to go about this. However, if you could provide me with some general steps of how to migrate to the latest OpenAPI version, then I'd be happy to migrate this library and create a PR for the changes.

I deem this migration to be rather important in order to stay consistent with the "How to get started"-tutorials provided by Stripe. For example, the library currently does not match the Fulfill your orders tutorial, since it does not support the latest Checkout.Session version and its payment_status field, which is necessary in order to handle async_payment_succeeded events.

I'm happy to help you with the migration, if you could just give me some general pointers about how to identify and test the differences between v2 and v3.

Thank you very much in advance 👋

@JoeWoodward
Copy link

I just ran into this exact situation. Was trying to figure out why payment_status was never returned which is simply because the field is not defined in Stripe.Session.

@btkostner
Copy link
Member

I would also be happy to contribute and making this update happen. We just need some pointers for what needs to be done.

@marciol
Copy link

marciol commented Apr 17, 2021

Interesting that the official Ruby version of Stripe makes liberal use of code generation in order to cope with the fast addition of features. It'd be nice if we can change slightly the way this client is developed to improve the development process of this library.

@kidbombay
Copy link

Any updates on this?

@snewcomer
Copy link
Collaborator

I will start working on v3 this week and will try to work out the code gen idea!

@snewcomer
Copy link
Collaborator

@marciol Do you happen to know where/how they codegen the file based on the OpenAPI spec? I see a few tools but not sure how to put it together yet. It seems Stripe's official libraries have an OPENAPI_VERSION file in them. They all have some comment like 👇 but still unsure what cli step takes care of this.

File generated from our OpenAPI spec

https://github.com/stripe/openapi
https://github.com/OpenAPITools/openapi-generator
https://github.com/stripe/stripe-ruby

@snewcomer
Copy link
Collaborator

Basically I'm wondering if Stripe has their own code generator that is not open source that generates those files in each of their packages.

@rhcarvalho
Copy link

Basically I'm wondering if Stripe has their own code generator that is not open source that generates those files in each of their packages.

I ran into https://blog.postman.com/how-stripe-builds-apis/ today, which suggests Stripe does have some internal tooling to generate code based on their OpenAPI v3 spec, instead of relying on upstream codegens.

Considering the pace of API changes, I imagine it is really hard for a community supported library to keep up without doing codegen. Hoping one day they publish their tools 🤞

@aj-foster
Copy link
Contributor

See #748 and release 2.17.1.

@snewcomer
Copy link
Collaborator

Thanks @aj-foster for the update!

Next up should be 2022-08-01

https://stripe.com/docs/upgrades#2022-08-01

@snewcomer
Copy link
Collaborator

Starting on the codegen. Going to make a goal for myself to finish by the holidays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants