<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/improving-the-svix-sdks-with-a-new-code-generator-ctvrcml9l" -->

---
title: Improving the Svix SDKs With a New Code Generator
description: Svix rebuilt the internal codegen behind its API client SDKs, replacing OpenAPI generator with a custom tool called openapi-codegen built on the MiniJinja...
canonical: https://daily.dev/posts/improving-the-svix-sdks-with-a-new-code-generator-ctvrcml9l
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Improving the Svix SDKs With a New Code Generator | daily.dev
og:description: Svix rebuilt the internal codegen behind its API client SDKs, replacing OpenAPI generator with a custom tool called openapi-codegen built on the MiniJinja...
og:url: https://daily.dev/posts/improving-the-svix-sdks-with-a-new-code-generator-ctvrcml9l
og:image: https://api.daily.dev/og/posts/CTvrcMl9l.png
og:image:alt: Improving the Svix SDKs With a New Code Generator
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Improving the Svix SDKs With a New Code Generator

**[Svix Blog](https://daily.dev/sources/svix)** · 10 min read · 0 upvotes · 0 comments

## Summary

Svix rebuilt the internal codegen behind its API client SDKs, replacing OpenAPI generator with a custom tool called openapi-codegen built on the MiniJinja templating engine. The switch removed manual work needed to add new endpoints across SDKs, fixed inconsistencies from oneOf schema handling, and let Svix generate high-level SDK APIs directly rather than hand-writing them. Side benefits included an 80% reduction in JS bundle size for their SDK and reuse of the same generator to rewrite their CLI from Go to Rust. The tool is open source under MIT on GitHub, and SDK users are advised to check the changelog before upgrading due to some minor breaking changes.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.svix.com/blog/openapi-codegen>

## Questions this post answers

### Why did Svix replace OpenAPI generator with their own code generation tool?

OpenAPI generator handled oneOf schemas awkwardly, upgrades routinely introduced breaking changes to generated code because Svix used its bundled templates, and adding new API endpoints required manually rewriting the public-facing API across all 8 SDKs. Svix built openapi-codegen using the MiniJinja templating engine (a Rust implementation of Jinja2) to generate high-level SDK APIs directly while keeping full control over each SDK's public interface.

_daily.dev surfaces engineering writeups like this for teams weighing custom codegen against off-the-shelf OpenAPI tooling._

### How much did switching SDK code generators reduce Svix's JS bundle size?

Moving to the new openapi-codegen tool cut the SDK's share of Svix's application portal JS bundle from 750KB to 150KB, an 80% reduction, which also amounted to about 30% of the entire bundle. This came as a side effect of generating simpler, more straightforward HTTP request code compared to what OpenAPI generator previously produced.

_Developers tracking SDK bundle size wins can follow tooling changes like this on daily.dev._

### Should I use OpenAPI generator, Stainless, Speakeasy, or fern for building an API SDK?

Services like Stainless, Speakeasy, and fern are good choices when quickly propping up new SDKs without needing tight control over implementation and API design. They were not a fit for Svix because switching would have meant dropping existing SDKs and breaking their established public APIs, so building a dedicated in-house generator was chosen instead to preserve backward compatibility while automating endpoint generation.

_daily.dev helps developers compare SDK codegen tools before committing to one for their API._

## Similar posts on daily.dev

- [Svix SDKs and CLI v2 released](https://daily.dev/posts/svix-sdks-and-cli-v2-released-vmkfe9obm) · Svix Blog · 5 upvotes · 0 comments
- [Introducing Forge: the open source pipeline for generating SDKs, CLIs, docs, and more](https://daily.dev/posts/introducing-forge-the-open-source-pipeline-for-generating-sdks-clis-docs-and-more-y73pwitku) · Cloudflare · 1 upvotes · 0 comments
- [Svix Changelog September 2026](https://daily.dev/posts/svix-changelog-september-2026-zrvha2knm) · Svix Blog · 1 upvotes · 0 comments
- [OpenAPI, ORM, SVG and Lottie](https://daily.dev/posts/openapi-orm-svg-and-lottie-zcixwcof1) · Foojay.io · 12 upvotes · 0 comments
- [Swagger In A Box: NPM, APIs, and Swagger Codegen](https://daily.dev/posts/swagger-in-a-box-npm-apis-and-swagger-codegen-ks4ldkveh) · Atomic Spin · 6 upvotes · 0 comments

---

Tags: [#rust](https://daily.dev/tags/rust), [#openapi](https://daily.dev/tags/openapi)

[View this post on daily.dev](https://daily.dev/posts/improving-the-svix-sdks-with-a-new-code-generator-ctvrcml9l)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Improving the Svix SDKs With a New Code Generator","url":"https://daily.dev/posts/improving-the-svix-sdks-with-a-new-code-generator-ctvrcml9l","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/improving-the-svix-sdks-with-a-new-code-generator-ctvrcml9l"},"datePublished":"2026-08-23T07:21:25.806Z","dateModified":"2026-08-23T07:26:15.833Z","description":"Svix rebuilt the internal codegen behind its API client SDKs, replacing OpenAPI generator with a custom tool called openapi-codegen built on the MiniJinja...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9403cf30bc9c56d68d6dceca3b937ec7?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9403cf30bc9c56d68d6dceca3b937ec7?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Svix Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Svix Blog","logo":"https://media.daily.dev/image/upload/s--Shf9MlOr--/f_auto,q_auto/v1787469609/logos/svix?_a=BAMAMicg0","url":"https://daily.dev/sources/svix"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/improving-the-svix-sdks-with-a-new-code-generator-ctvrcml9l","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"rust,openapi","timeRequired":"PT10M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Svix Blog","item":"https://daily.dev/sources/svix"},{"@type":"ListItem","position":3,"name":"Improving the Svix SDKs With a New Code Generator"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/improving-the-svix-sdks-with-a-new-code-generator-ctvrcml9l#faq","mainEntity":[{"@type":"Question","name":"Why did Svix replace OpenAPI generator with their own code generation tool?","acceptedAnswer":{"@type":"Answer","text":"OpenAPI generator handled oneOf schemas awkwardly, upgrades routinely introduced breaking changes to generated code because Svix used its bundled templates, and adding new API endpoints required manually rewriting the public-facing API across all 8 SDKs. Svix built openapi-codegen using the MiniJinja templating engine (a Rust implementation of Jinja2) to generate high-level SDK APIs directly while keeping full control over each SDK's public interface. daily.dev surfaces engineering writeups like this for teams weighing custom codegen against off-the-shelf OpenAPI tooling."}},{"@type":"Question","name":"How much did switching SDK code generators reduce Svix's JS bundle size?","acceptedAnswer":{"@type":"Answer","text":"Moving to the new openapi-codegen tool cut the SDK's share of Svix's application portal JS bundle from 750KB to 150KB, an 80% reduction, which also amounted to about 30% of the entire bundle. This came as a side effect of generating simpler, more straightforward HTTP request code compared to what OpenAPI generator previously produced. Developers tracking SDK bundle size wins can follow tooling changes like this on daily.dev."}},{"@type":"Question","name":"Should I use OpenAPI generator, Stainless, Speakeasy, or fern for building an API SDK?","acceptedAnswer":{"@type":"Answer","text":"Services like Stainless, Speakeasy, and fern are good choices when quickly propping up new SDKs without needing tight control over implementation and API design. They were not a fit for Svix because switching would have meant dropping existing SDKs and breaking their established public APIs, so building a dedicated in-house generator was chosen instead to preserve backward compatibility while automating endpoint generation. daily.dev helps developers compare SDK codegen tools before committing to one for their API."}}]}
```

