Julien Debon 9c11fcf6bc
[Fix][OCaml] Incorrect encoding/decoding for required free-form objects; Odoc for record fields (#21819)
* [OCaml] Fix inconsistent oneOf primitive sample name

* [OCaml] Fix encoding/decoding for free-form required fields

* [OCaml] Change field comment to Odoc, move it after the field

As per Odoc documentation, record field documentation should be *after* the
field, not before.
See https://ocaml.github.io/odoc/odoc/odoc_for_authors.html#special_comments
type `my_record`

* [OCaml] Cleanup non-generated files for ocaml sample
2025-08-26 18:59:11 +08:00
..
2025-08-22 19:17:23 +08:00

This is a sample server Petstore server. For this sample, you can use the api key special-key to test the authorization filters.

This OCaml package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Generator version: 7.16.0-SNAPSHOT
  • Build package: org.openapitools.codegen.languages.OCamlClientCodegen

Requirements.

OCaml 5.x

Installation

Please run the following commands to build the package petstore_client:

opam install . --deps-only --with-test
eval $(opam env)
dune build

Getting Started

The generated directory structure is:

  • src/apis: contains several modules, each with several functions. Each function is an API endpoint.
  • src/models: contains several modules. Each module contains:
    • a type t representing an input and/or output schema of the OpenAPI spec
    • a smart constructor create for this type
  • src/support: various modules used by the generated APIs and Models