Two tools generate a Kotlin SDK from OpenAPI in 2026: OpenAPI Generator's kotlin template, and Fabrikt, a Kotlin-focused generator that also produces server-side controllers. Both are actively maintained as of this writing — Fabrikt shipped a release the same week this post was published. Neither is Sourced — Sourced doesn't generate a Kotlin SDK. Here's the practical version of both OSS paths; see "Where Sourced fits" below for what it does cover.
Kotlin SDK generators compared
| Tool | Maintained (Sept 2026) | Output | Best for |
|---|---|---|---|
OpenAPI Generator (kotlin) |
Yes — v7.25.0, released Aug 24 2026 | Client only; 8 library options (OkHttp, Ktor, Retrofit2, Spring WebClient/RestClient, multiplatform, Vert.x, Volley) | Teams wanting library choice, or consistency with other OpenAPI Generator languages |
| Fabrikt | Yes — v27.13.0, released Sept 21 2026 | Models, clients (OkHttp, OpenFeign, Ktor, Spring HTTP Interface), and server controllers (Spring MVC, Micronaut, Ktor) | Teams wanting client + server codegen from one tool, tightly integrated into Gradle/Maven builds |
Option 1: OpenAPI Generator
OpenAPI Generator's kotlin generator defaults to the jvm-okhttp4 library (OkHttp 4.x + Moshi for JSON), and offers seven other library targets including jvm-ktor, jvm-retrofit2, multiplatform (Kotlin Multiplatform + Ktor + kotlinx.serialization), and Spring-specific clients.
npx @openapitools/openapi-generator-cli generate \
-i ./openapi.yaml \
-g kotlin \
-o ./generated \
--additional-properties=library=jvm-okhttp4,serializationLibrary=moshi
Swap library=jvm-ktor for Ktor, or library=multiplatform if you need the SDK to run on non-JVM Kotlin targets (iOS via Kotlin Multiplatform, for example). Check the generator's option list before picking — the serialization library (Moshi, Gson, Jackson, or kotlinx.serialization) is tied to which client library you choose.
Option 2: Fabrikt
Fabrikt is narrower in scope than OpenAPI Generator but deeper on the Kotlin/JVM side: it generates Jackson- or kotlinx.serialization-annotated data classes, clients for OkHttp/OpenFeign/Ktor/Spring HTTP Interface, and — notably — server-side controllers for Spring MVC, Micronaut, and Ktor server. It's under active development; the cjbooms/fabrikt repo shipped v27.13.0 the same week this post was published.
Run it as a jar:
java -jar fabrikt.jar \
--output-directory './generated' \
--base-package 'com.example.api' \
--api-file './openapi.yaml' \
--targets 'client' \
--targets 'http_models'
Or run the latest version with no manual download via JBang:
jbang run io.fabrikt:fabrikt:RELEASE \
--output-directory './generated' \
--base-package 'com.example.api' \
--api-file './openapi.yaml' \
--targets 'client' \
--targets 'http_models'
Fabrikt also ships Gradle and Maven plugins and a Docker image for teams that want generation wired directly into the build rather than run as a separate CLI step — see the Gradle w/ plugin section of its README.
Which one should you use
If you only need a client and want maximum library choice (OkHttp vs Ktor vs Retrofit vs Spring), OpenAPI Generator's kotlin generator is the broader-tested default, especially if you're already generating SDKs for other languages from the same OpenAPI Generator pipeline.
If you're building a Kotlin/JVM service that both consumes and implements OpenAPI-described APIs — client for calling out, server controllers for the API you expose — Fabrikt does both from one tool and one config, and its Spring MVC / Micronaut / Ktor server output is worth checking if you're not already committed to hand-written controllers.
Either way: fix the spec before you generate. Every operation needs an operationId (Fabrikt and OpenAPI Generator both use it for method naming), schemas belong in components/schemas, and security schemes need to be defined — see OpenAPI best practices for SDK-friendly specs, or catch spec issues automatically with Sourced's OpenAPI validator first.
Where Sourced fits (and doesn't)
Plainly: Sourced's generated SDKs focus on TypeScript and Python today — the two ecosystems where teams publish first. If Kotlin is your target, generate it with OpenAPI Generator or Fabrikt above, and bring Sourced in for the part of the workflow it does own: docs, llms.txt, and validation on the same spec.
What's language-independent and works from the same spec regardless of which SDK language you generate:
- Hosted docs, generated from your OpenAPI spec, free to try with a private preview URL.
llms.txtgeneration — llms-txt generator — so LLM agents can read your API without scraping your docs site.- MCP server generation from the same spec — mcp-from-openapi — useful if your Kotlin API also needs an agent-facing tool surface.
- OpenAPI validation that catches spec problems before Fabrikt or OpenAPI Generator produces bad Kotlin output — openapi-validator.
Generate your Kotlin SDK with Fabrikt or OpenAPI Generator; give the same spec to Sourced for free hosted docs, llms.txt, and validation in one pass. Create hosted docs from your repo or start free — unlimited previews, up to 2 hosted noindex docs review sites and one hosted MCP server, no credit card.
Generating SDKs in other languages
Same spec, different target language — see TypeScript, Python, PHP, Rust, Swift, Go, Java, C#, and Ruby.
FAQ
Does Sourced generate Kotlin SDKs?
No — see "Where Sourced fits" above for what Sourced covers instead. For Kotlin, use OpenAPI Generator's kotlin generator or Fabrikt, both covered above.
Which Kotlin HTTP client library should I pick?
jvm-okhttp4 is OpenAPI Generator's default and a safe general choice on the JVM. Pick jvm-ktor if your project already uses Ktor, multiplatform if you need the SDK to run on Kotlin Multiplatform targets like iOS, or a Spring-specific option if you're in a Spring Boot service.
Can Fabrikt generate server code, not just a client?
Yes — Fabrikt generates server-side controller interfaces for Spring MVC, Micronaut, and Ktor server, in addition to client and model code. This is the main functional difference from OpenAPI Generator's Kotlin support, which is client-only.
Does Fabrikt support kotlinx.serialization, or only Jackson?
Both. Fabrikt generates Jackson-annotated data classes by default and also supports kotlinx.serialization-annotated models — check the --targets and model options in its README for the exact flags.
How current are these tools as of September 2026?
Both are actively maintained. OpenAPI Generator released v7.25.0 on August 24, 2026. Fabrikt released v27.13.0 the same week this post was published, with commits landing the same day — it's one of the more actively released tools in this space.
Can I use Sourced for Kotlin API docs even though Sourced's SDK generation stops at TypeScript and Python?
Yes. Point Sourced at the same OpenAPI spec you're feeding to Fabrikt or OpenAPI Generator, and it generates hosted docs, llms.txt, and spec validation independent of the SDK language.