OpenAPI client/server tooling for Delphi — comparison guide

A neutral, source-cited survey of the OpenAPI client and code-generation options available to Delphi and C++ Builder developers in 2026: sgcOpenAPI, OpenAPI Generator, Swagger Codegen, mORMot 2, TMS XData with its companion OpenAPI Delphi Generator, and the hand-coded REST-client path. Every feature claim links to the project's own documentation.

Six paths from an OpenAPI spec to working Delphi code

A one-paragraph summary of each option, with a link to the official documentation or repository. Detailed comparison is in the matrix below.

OpenAPI Generator

OpenAPI Tools community · Apache 2.0 (open source)

Open-source Java tool, originally forked from Swagger Codegen, providing 60+ client generators and 40+ server stub generators. Generates clients and / or servers for C, C#, C++ (cpp-restsdk, Qt5, Oat++, Tizen, Unreal Engine 4), Go, Java, Kotlin, PHP, Python, Rust, TypeScript, and many more. The official generator list does not include a Delphi / Object Pascal / Free Pascal target.

Official page

Swagger Codegen

SmartBear / community · Apache 2.0 (open source)

The original Java code-generator project from SmartBear, from which OpenAPI Generator was forked in 2018. Supports ActionScript, Ada, Apex, Bash, C#, C++, Clojure, Dart, Elixir, Erlang, Go, Groovy, Haskell, Java, Kotlin, Lua, Node.js, Objective-C, Perl, PHP, PowerShell, Python, R, Ruby, Rust, Scala, Swift, and TypeScript. The 3.x line supports OpenAPI 3.0; the 2.x line supports OpenAPI 2.0 (Swagger) only. There is no Delphi or Object Pascal generator in either line.

Official page

mORMot 2 OpenAPI client generator

Arnaud Bouchez / Synopse · MPL / GPL / LGPL (open source)

mORMot 2 ships mormot.net.openapi.pas, which reads an OpenAPI 3.x or Swagger 2.0 document (file or URL) and emits FPC / Delphi Pascal client units — high-level records and dynamic arrays as DTOs, Pascal enumerations for enum values, and translation of HTTP status codes into exceptions. The unit targets FPC and Delphi 7 / 2009 and later, and runs as part of the wider mORMot SOA / ORM framework.

Official page

TMS XData & OpenAPI Delphi Generator

TMS Software / Landgraf Software · Commercial (XData) / Apache 2.0 + Commons Clause (generator)

TMS XData is a commercial Delphi REST / JSON / ORM remoting framework. An XData server can publish an OpenAPI (formerly Swagger) document at /openapi/swagger.json for its own endpoints, and pairs with SwaggerUI / Redoc. The companion OpenAPI Delphi Generator (originally bundled in XData, now a separate open-source project at landgraf-dev/openapi-delphi-generator) consumes Swagger 2.0 / OpenAPI 3.0 documents and emits Delphi interfaces plus DTO classes for use with TXDataClient.

Official page

Hand-coded REST clients (Indy / THTTPClient)

Indy Project / Embarcadero · BSD / MPL (Indy) · RAD Studio EULA (THTTPClient)

A common reality: developers write the REST client by hand using TIdHTTP (Indy) or System.Net.HttpClient.THTTPClient (bundled with Delphi). No code generation, no schema; manual JSON marshalling with the RTL JSON units (or TJSONObject). Authentication, retry logic, and pagination are also hand-rolled.

Official page

Side-by-side feature comparison

A check () means the project documents native support. A dash () means the project does not provide it natively. A tilde (~) means partial / via add-on / not explicitly documented — see the Sources section for what we could verify.

Generators, runtime, licensing

12 rows
Feature sgcOpenAPI OpenAPI Generator Swagger Codegen mORMot 2 OpenAPI client generator TMS XData & OpenAPI Delphi Generator Hand-coded REST clients (Indy / THTTPClient)
Generates Delphi client Native Object Pascal client from OpenAPI 3.x
Generates C++ Builder code C++ Builder VCL / FMX targets (BCC32 / BCC64) ~ ~ ~ ~
Generates server stubs Server-side scaffolding from an OpenAPI spec
HTTP/2 client Native HTTP/2 transport in the generated client ~ ~ ~ ~
Typed JSON DTOs Strongly-typed classes / records / enums ~
OAuth2 / JWT helpers Built-in OAuth2 flows and JWT helpers ~
Async / sync helpers Both asynchronous and synchronous call patterns ~
Multi-platform runtime Win / macOS / Linux / iOS / Android
Bundled vendor SDKs AWS / Azure / GCP / Microsoft Graph pre-built
Commercial use allowed Licence permits closed-source commercial use
Active maintenance Release or tagged activity in last 12–18 months ~
Licence model Licence type Commercial Apache 2.0 (open source) Apache 2.0 (open source) MPL / GPL / LGPL Commercial (XData) + Apache 2.0 + CC (generator) BSD / MPL (Indy) · RAD Studio EULA (THTTPClient)
Documented native support Not provided natively ~ Partial / via add-on / unverified

Honest fit for each option

Every option here has a real audience. The right pick depends on whether you need server stubs alongside clients, which Pascal toolchains you support, your licence preference, and whether bundled vendor SDKs save time.

Choose sgcOpenAPI

Pick sgcOpenAPI when you want a single commercial tool that generates Delphi 7–13 and C++ Builder client code from any OpenAPI 3.x or Swagger 2.x spec, when you want pre-built Pascal SDKs for AWS, Azure, Google Cloud, or Microsoft Graph already bundled, when you target VCL plus FireMonkey for macOS / Linux / iOS / Android, and when you need zero external runtime dependencies beyond the sgcOpenAPI units.

Choose OpenAPI Generator

Pick OpenAPI Generator when your team builds clients or server stubs in languages other than Delphi — C#, Java, Go, TypeScript, Rust, Python — from the same OpenAPI spec, when you need both clients and server stubs from one tool, or when Apache-2.0 licensing and a large community of template contributors matter to you.

Choose Swagger Codegen

Pick Swagger Codegen when you already use the SmartBear / Swagger ecosystem (SwaggerHub, Swagger Editor) end-to-end, when you want the closest officially-maintained successor to the historical Swagger 2.0 code generator, and when your targets are mainstream JVM / .NET / scripting languages rather than Delphi.

Choose mORMot 2 OpenAPI client generator

Pick the mORMot 2 OpenAPI generator when your project already uses mORMot for ORM, SOA, or hosting, when you want an open-source Pascal-native code generator under MPL / GPL / LGPL, or when you target FPC on Linux / BSD / macOS for both the client generator and the resulting code.

Choose TMS XData & OpenAPI Delphi Generator

Pick TMS XData when you build the server in Delphi too and want server + client + ORM remoting from one vendor, when SwaggerUI / Redoc browsing of your own service contracts is a requirement, or when you already license TMS Business / All-Access. Pick the stand-alone OpenAPI Delphi Generator when you only need client-side code generation and prefer Apache 2.0 + Commons Clause licensing.

Choose Hand-coded REST clients (Indy / THTTPClient)

Pick a hand-coded REST client when the API surface is tiny (a handful of endpoints), when you cannot ship third-party components for licensing or compliance reasons, or when the API has no published OpenAPI spec and a generator would buy you nothing. Indy and THTTPClient both ship with RAD Studio, so there is no extra dependency.

Moving to sgcOpenAPI — what differs

Short notes on the differences if you are switching from one of the options above. Not adversarial — just the practical mapping.

Moving from OpenAPI Generator

OpenAPI Generator does not target Delphi, so "migration" here means generating C# / Java / TS clients alongside the sgcOpenAPI Delphi client from the same spec. If your previous setup was an OpenAPI-Generator-built C# wrapper consumed from Delphi via COM or REST, sgcOpenAPI removes that layer by producing the Delphi client directly.

Moving from Swagger Codegen

Swagger Codegen does not target Delphi. If your previous workflow exported a generic C# or Java client and wrapped it for Delphi, sgcOpenAPI lets you generate the Delphi client directly from the same spec and removes the wrapper layer.

Moving from mORMot 2 OpenAPI client generator

mORMot's OpenAPI client generator lives inside the wider framework. If your application uses only the generator and not the SOA / ORM / WebSocket layers, sgcOpenAPI gives you a standalone, drop-in component set without the extra units. Conversely, if you also use mORMot's SOA contracts and ORM, switching purely for the OpenAPI generator means re-implementing those pieces, which sgcOpenAPI does not provide.

Moving from TMS XData & OpenAPI Delphi Generator

If you currently use XData's built-in importer to generate clients from third-party Swagger specs, note that the importer was split out into the open-source landgraf-dev/openapi-delphi-generator project — the in-XData classes are documented as deprecated. sgcOpenAPI is a different, commercially-supported generator that natively reads OpenAPI 3.x, bundles SDKs for the major cloud platforms, and targets Delphi 7–13 plus C++ Builder.

Moving from Hand-coded REST clients (Indy / THTTPClient)

Hand-coded clients age badly when the API surface grows or when the upstream service publishes new endpoints. sgcOpenAPI can generate the same DTOs and method signatures from the published spec in seconds, freeing the hand-coded logic for the parts that genuinely need it (custom retries, telemetry, business glue). The generated code uses similar HTTP transport, so the developer mental model stays close.

Every claim, linked

Each cell in the matrix above traces to one of these official documentation pages, repositories, or release notes. All URLs were HEAD-checked at the time of writing.

SourceURL
sgcOpenAPI — product pagehttps://www.esegece.com/products/openapi/
sgcOpenAPI — featureshttps://www.esegece.com/products/openapi/features/
sgcOpenAPI — parserhttps://www.esegece.com/products/openapi/parser/
sgcOpenAPI — pre-built SDKshttps://www.esegece.com/products/openapi/apis/
OpenAPI Generator — project homehttps://openapi-generator.tech/
OpenAPI Generator — GitHub repositoryhttps://github.com/OpenAPITools/openapi-generator
OpenAPI Generator — supported generators listhttps://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators.md
OpenAPI Generator — releaseshttps://github.com/OpenAPITools/openapi-generator/releases
Swagger Codegen — product page (swagger.io)https://swagger.io/tools/swagger-codegen/
Swagger Codegen — GitHub repositoryhttps://github.com/swagger-api/swagger-codegen
Swagger Codegen Generators (3.x templates)https://github.com/swagger-api/swagger-codegen-generators
mORMot 2 — GitHub repository (synopse/mORMot2)https://github.com/synopse/mORMot2
mORMot 2 — README (network & OpenAPI mention)https://github.com/synopse/mORMot2/blob/master/README.md
mORMot 2 — releaseshttps://github.com/synopse/mORMot2/releases
Synopse forum (Object Pascal SOA / ORM / OpenAPI)https://synopse.info/
TMS XData — product pagehttps://www.tmssoftware.com/site/xdata.asp
TMS XData — documentation indexhttps://doc.tmssoftware.com/biz/xdata/guide/index.html
TMS XData — OpenAPI support guidehttps://doc.tmssoftware.com/biz/xdata/guide/openapi.html
OpenAPI Delphi Generator (formerly XData importer)https://github.com/landgraf-dev/openapi-delphi-generator
Indy — project homepagehttps://www.indyproject.org/
Indy — GitHub repository (IndySockets/Indy)https://github.com/IndySockets/Indy
Indy — releases (latest tagged 10.6.3.14)https://github.com/IndySockets/Indy/releases
Embarcadero docs — System.Net.HttpClient.THTTPClienthttps://docwiki.embarcadero.com/Libraries/Sydney/en/System.Net.HttpClient.THTTPClient
OpenAPI Initiative — specification repositoryhttps://github.com/OAI/OpenAPI-Specification
OpenAPI Specification — authoritative HTML renderingshttps://spec.openapis.org/

Try sgcOpenAPI

Download the free Trial edition and generate your first Pascal SDK from an OpenAPI 3.x specification in minutes.