-1
日增长
297
stars
88
forks
5
watchers
590
prs
273
issues
172
releases
README
Fabrikt /ˈfa-brikt/ - Kotlin code from OpenAPI 3 Introduction Features Examples Usage Instructions Command Line Generating from a JSON Schema document Gradle w/ custom task Gradle w/ plugin Maven Docker Getting the Most from Fabrikt Client authentication Configuration Options Migration Guide Original Motivation Building Locally Publishing Specific Features Introduction This library was built to take advantage of the complex modeling features available in OpenAPI 3. It generates Kotlin data classes with advanced support for features such as: - Null Safety - Inlined schema definitions - Enumerations - Sealed Classes - Polymorphism (@JsonSubTypes) - Maps of Maps of Maps - GraalVM Native Reflection Registration - Json Merge Patch (via JsonNullable) (add x-json-merge-patch: true to schemas) - Override Jackson Include NonNull (via JsonInclude) (add x-jackson-include-non-null: true to schemas) - Jackson's polymorphic subtype deduction (add x-jackson-subtype-deduction: true to the oneOf schema) to gain Sealed Interface polymorphism, without needing to declare a discriminator property. Requires subtypes to have distinguishing required fields. as well as HTTP clients and controllers for a number of popular frameworks (see Features). Fabrikt also generates models directly from a plain JSON Schema document — draft-04 through 2020-12, optionally nested inside a larger resource such as a Nakadi EventType manifest — with no OpenAPI spec required. See Generating from a JSON Schema document. More than just bootstrapping, this library can be permanently integrated into your build tool and will ensure contract and code always match, even as APIs evolve in complexity. Try Fabrikt Online Try Fabrikt with your own API spec in the Fabrikt Playground and see how it can help you generate code for your API clients and servers. Coordinates xml io.fabrikt fabrikt Features The library currently has support for generating: Models Jackson annotated data classes Kotlinx.serialization annotated data classes Clients OkHttp Client (w/ Jackson Models) OpenFeign annotated client interfaces Ktor Client (w/ Jackson & Kotlin Serialization models) Spring HTTP Interface annotated client interfaces Controllers Spring MVC annotated controller interfaces Micronaut HTTP annotated controller interfaces Ktor server routes and controller interfaces Client generators can emit an opt-in security declaration through --http-client-opts OPENAPI_SECURITY: a scheme dictionary, the effective requirement of every operation, and a pure header resolver. See Client authentication. OpenAPI 3.2 query operations are supported by all client targets and by Ktor and Micronaut controllers, including JSON request bodies. OpenFeign requires 13.14 or later and a transport that supports QUERY, such as feign-okhttp; its default HttpURLConnection transport does not. Spring HTTP Interface clients likewise require a suitab
Top issues
#656RFC: A version-independent foundation for complete OpenAPI 3.1 and 3.2 support6 comments · 2026-08-26#513Add support for Query operation available in 3.25 comments · 2026-01-28#198Support generating routes for Javax WS RS API4 comments · 2023-04-18#648Implement agentic issue triage via GitHub Actions + requesty.ai2 comments · 2026-08-22#639Selectively override types based on vendor extension fields1 comments · 2026-08-06#514Add support for Additional Operations section in OpenApi 3.21 comments · 2026-01-28#431Support Schema format time1 comments · 2025-07-10#347Support for http4k controllers1 comments · 2025-01-02
Discussions
#862New Fabrikt release2 comments · 2026-11-16#754Changing defaults in Next Major Version v288 comments · 2026-10-08#511Docker Image not public?1 comments · 2026-01-22#465Republishing under fabrikt.io2 comments · 2025-10-20#441Support remote OpenAPI Specifications1 comments · 2025-08-19#438How can I configure `fabrikt` grouping/naming `ApiClient` classes2 comments · 2025-08-06#399default parameters1 comments · 2025-04-22#344Interactive Playground2 comments · 2024-12-20
Latest release
29.2.0 29.2.0 2026-11-22What's Changed Add --additional-properties flag to control handling of undeclared object properties by @cjbooms in https://github.com/fabrikt-io/fabrikt/pull/863 Share one additional properties map across discriminated allOf hierarchies by @mrhoeve in https://github.com/fabrikt-io/fabrikt/pull/861 Fix inherited fields from nested discriminator parents by @mrhoeve in https://github.com/fabrikt-io/fabrikt/pull/871 Fix allOf object classification with additional properties by @mrhoeve in https://github.com/fabrikt-io/fabrikt/pull/870 Validate string constraints on array elements by @mrh