Add ocaml-openapi: OpenAPI code generator for OCaml
A code generator that produces type-safe OCaml API clients from
OpenAPI 3.x specifications, using:
- jsont for JSON encoding/decoding
- requests for HTTP client (Eio-based)
- ptime for date-time handling
Features:
- Generates typed request bodies and responses
- Produces .mli interface files
- Creates wrapped module structure (e.g., Api.Types, Api.Client)
- Optional dune.inc regeneration rules (--regen flag)
- OCamldoc comments from OpenAPI descriptions
- Topological sorting of schema dependencies
Generated code structure:
- types.ml/mli: Type definitions with jsont codecs
- client.ml/mli: API client functions
- <pkg>.ml/mli: Wrapped main module
- dune/dune.inc: Build configuration
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>