chargebee / chargebee-typescript

Typescript library for the Chargebee API.
https://apidocs.chargebee.com/docs/api?lang=typescript
MIT License
22 stars 16 forks source link

Suggest to try Stainless-API #52

Open johnpyp opened 4 months ago

johnpyp commented 4 months ago

I see the chargebee SDK is clearly autogenerated. I'm just a Chargebee customer, but a lot of big companies have been picking up https://www.stainlessapi.com/ as their SDK generator of choice. It generates really high quality APIs, which can help modernize a lot of the code. I see a lot of patterns that could use some help in the various chargebee SDKs.

cb-sriramthiagarajan commented 4 months ago

Hey @johnpyp, Sriram here from the DX team at Chargebee. Thanks for your suggestion. Appreciate you taking the time to share this.

While I can't comment on using Stainless or any 3rd party SDK generators at this time, I'd love to understand what you think could be improved in our SDKs and the patterns that you're referring to above. Please share here or feel free to send me an email (address in my profile). Thanks!

johnpyp commented 4 months ago

Yeah, just to name a couple:


Now, I see Chargebee has actually relatively recently started publishing an OpenAPI spec - https://github.com/chargebee/openapi

It seems to me that this spec has everything needed to generate a great api with all the modern conventions, comments, etc.

The reason I suggest stainless is because they basically take care of everything for you, and they're trusted by some of the largest new tech companies like OpenAI, Cloudflare, Anthropic, etc. - I imagine for a company like chargebee it'd be a small cost to pilot to see if it's helpful for customers.

Of course, it would be a massive breaking change, so it'd have to be new libraries, which is probably the biggest downside I suppose. However, at least the JS SDKs seem to need significant modernization anyways, if I'm being honest.

cb-sriramthiagarajan commented 4 months ago

Thanks a lot for the detailed note, @johnpyp. Agree that these need to be fixed.

You're right, our OpenAPI spec has everything needed for the SDK and we're in the process of using it as the base without changing much in the SDK itself. We'll work on how these things can be improved without a lot of breaking changes. I'll get back with an update soon.

cb-sriramthiagarajan commented 2 weeks ago

Hi @johnpyp, we have released a new beta version which addresses the issues you have mentioned. It'd be great if you could try it and share your feedback.

You can install this using npm install chargebee@beta

Edit: We have a Migration guide for v3. README in the next branch also has more info on the usage.