Bug Report Checklist
Description
When JSON fields are not in snake_case (e.g., someField), parsing fails because the field is expected to be named some_field).
openapi-generator version
7.10.0
OpenAPI declaration file content or url
https://api.integration.app/docs-json
Generation Details
$ openapi-generator-cli generate \
--generator-name ocaml \
--input-spec docs-json
Steps to reproduce
$ openapi-generator-cli generate \
--generator-name ocaml \
--input-spec docs-json
Related issues/PRs
N/A.
Suggest a fix
The generator uses ppx_deriving_yojson which supports an annotation [@key "someField"].
See https://github.com/ocaml-ppx/ppx_deriving_yojson?tab=readme-ov-file#key
I think a simple solution is to add this annotation on every single field
Bug Report Checklist
Description
When JSON fields are not in snake_case (e.g.,
someField), parsing fails because the field is expected to be namedsome_field).openapi-generator version
7.10.0OpenAPI declaration file content or url
https://api.integration.app/docs-json
Generation Details
Steps to reproduce
Related issues/PRs
N/A.
Suggest a fix
The generator uses
ppx_deriving_yojsonwhich supports an annotation[@key "someField"].See https://github.com/ocaml-ppx/ppx_deriving_yojson?tab=readme-ov-file#key
I think a simple solution is to add this annotation on every single field