-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Closed
Labels
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Sponsorship to speed up the bug fix or feature request (example)
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-jsonSteps to reproduce
$ openapi-generator-cli generate \
--generator-name ocaml \
--input-spec docs-jsonRelated 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
Reactions are currently unavailable