At a glance
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.
sgcOpenAPI
eSeGeCe · Commercial
Commercial Delphi / C++ Builder component suite. Parses OpenAPI 3.x JSON / YAML and Swagger 1.x / 2.x specifications, then generates native Object Pascal interfaces, records, and enumerations that compile cleanly under VCL and FireMonkey across Delphi 7 through RAD Studio 13. Ships 1,195+ pre-built Pascal SDKs for Amazon AWS (280+), Google Cloud (250+), Microsoft Azure (650+), and Microsoft Graph (15+). Generated code has no external dependencies beyond the sgcOpenAPI runtime.
Official page
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