Just to inform anyone looking for an OpenAPI client code generator, that I just made a new one, for both Delphi and FPC.
It seems to be more advanced than Wagner's generator (e.g. it converts errors, enums and allOf/oneOf attributes), and is fully Open Source.
https://blog.synopse.info/?post/2024/09/06/Swagger/OpenAPI-Client-Generator-for-Delphi-and-FPC
Here are the top features of this OpenAPI client code generator for Delphi and FPC:
Use high-level pascal records and dynamic arrays for "object" DTOs
Use high-level pascal enumerations and sets for "enum" values
Translate HTTP status error codes into high-level pascal Exceptions
Recognize similar "properties" or "enum" to reuse the same pascal type
Support of nested "$ref" for objects, parameters or types
Support "allOf" attribute, with proper properties inheritance/overloading
Support "oneOf" attribute, for strings or alternate record types
Support of "in":"header" and "in":"cookie" parameter attributes
Fallback to variant pascal type for "oneOf" or "anyOf" JSON values
Each method execution is thread-safe and blocking, for safety
Generated source code units are very small and easy to use, read and debug
Can generate very detailed comment documentation in the unit source code
Tunable engine, with plenty of generation options (e.g. about verbosity)
Leverage the mORMot RTTI and JSON kernel for its internal plumbing
Compatible with FPC and oldest Delphi (7-2009)
Tested with several Swagger 2 and OpenAPI 3 reference content, but your input is welcome, because it is not fully compliant!
Hoping you may find it interesting.
The blog article has several example of the actual output of the generator, from several sources.
It is the kind of information I would have wanted to see with other libraries. Use the source, Luke!