You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add key to each model field
Add a `[@key "someField"]` annotation to each model field, to avoid mismatches when the JSON field is not in snake_case.
Closes#20765
* update ocaml samples
---------
Co-authored-by: William Cheng <[email protected]>
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.0
OpenAPI 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_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
The text was updated successfully, but these errors were encountered: