Custom codegen for SDKs episode artwork

EPISODE · Feb 20, 2023 · 41 MIN

Custom codegen for SDKs

from Build and Learn · host CJ Avilla, Colin Loretz

In this episode of Build and Learn, we discuss code generation (codegen) and how Stripe uses it to generate SDKs for its APIs automatically. We talk about how a declarative shape of an API (such as Open API spec or GraphQL schema) can be fed into a tool to generate an SDK in a specific programming language. This process helps ensure that the SDKs are always in sync with the API and that any changes to the API are automatically reflected in the SDKs. Most SDKs today are still hand-written, but automatic generation is becoming more popular. We'll touch on the tradeoff between readable code and automatically generated code, which can be quite long and complex.  You'll also hear how the Ruby clients for Orbit were likely written by hand and may not be up-to-date.Resources:Richard Marmorstein's Strangeloop talk about codegen: https://www.youtube.com/watch?v=mgRreyw-NlgCJ's RubyConf 2022 talk about codegen: https://www.youtube.com/watch?v=sm0fgIqfsO8Stainless API company: https://stainlessapi.com/Open API Spec: https://swagger.io/specification/ Stripe API Spec: https://github.com/stripe/openapiSwagger codegen: https://swagger.io/tools/swagger-codegen/ Orbit Ruby Activities gem: https://github.com/orbit-love/ruby-orbit-activities

In this episode of Build and Learn, we discuss code generation (codegen) and how Stripe uses it to generate SDKs for its APIs automatically. We talk about how a declarative shape of an API (such as Open API spec or GraphQL schema) can be fed into a tool to generate an SDK in a specific programming language. This process helps ensure that the SDKs are always in sync with the API and that any changes to the API are automatically reflected in the SDKs. Most SDKs today are still hand-written, but automatic generation is becoming more popular. We'll touch on the tradeoff between readable code and automatically generated code, which can be quite long and complex.  You'll also hear how the Ruby clients for Orbit were likely written by hand and may not be up-to-date.Resources:Richard Marmorstein's Strangeloop talk about codegen: https://www.youtube.com/watch?v=mgRreyw-NlgCJ's RubyConf 2022 talk about codegen: https://www.youtube.com/watch?v=sm0fgIqfsO8Stainless API company: https://stainlessapi.com/Open API Spec: https://swagger.io/specification/ Stripe API Spec: https://github.com/stripe/openapiSwagger codegen: https://swagger.io/tools/swagger-codegen/ Orbit Ruby Activities gem: https://github.com/orbit-love/ruby-orbit-activities

NOW PLAYING

Custom codegen for SDKs

0:00 41:31

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

MG Show MG Show The MG Show, hosted by Jeffrey Pedersen and Shannon Townsend, is a leading alternative media platform dedicated to uncovering the truth behind today’s most pressing political issues. Launched in 2019, the show has grown exponentially, offering unfiltered insights, comprehensive research, and real-time analysis. With a commitment to independent journalism and factual integrity, the MG Show empowers its audience with knowledge and encourages active participation in the political discourse. Breaking News Show | eTurboNews Juergen Thomas Steinmetz News is relevant to the global travel and tourism industry, human rights and global issues.Breaking news when it happens and only from the source. Eat to Live Jenna Fuhrman, Dr. Fuhrman Our health is our most precious gift and smart nutrition can change your life. Each month, join Dr. Fuhrman and his daughter, Jenna Fuhrman as they discuss important topics in the world of nutrition. Eat to Live will change the way you eat and think about food. French Your Way Jessica: Native French teacher founder of French Your Way Boost your French listening skills and test your comprehension with this one of a kind series of podcasts. Get the chance to listen to a real conversation between native speakers talking at normal speed AND customise your learning experience through carefully designed sets of questions (2 levels of difficulty) available for download at www.frenchvoicespodcast.com. All interviews also come with the transcript. French teacher Jessica interviews native speakers of French from around the world who share a bit of their life and passion. Where else would you meet in one same place a French yoga teacher based in Melbourne, a soap manufacturer from Provence, or a couple cycling around the world?

Frequently Asked Questions

How long is this episode of Build and Learn?

This episode is 41 minutes long.

When was this Build and Learn episode published?

This episode was published on February 20, 2023.

What is this episode about?

In this episode of Build and Learn, we discuss code generation (codegen) and how Stripe uses it to generate SDKs for its APIs automatically. We talk about how a declarative shape of an API (such as Open API spec or GraphQL schema) can be fed into a...

Is there a transcript available for this episode?

Yes, a full transcript is available for this episode. You can read the complete transcript on the episode page.

Can I download this Build and Learn episode?

Yes, you can download this episode by clicking the download button on the episode player, or subscribe to the podcast in your preferred podcast app for automatic downloads.
URL copied to clipboard!