[BUG] [OCaml] Generation of `unknown_base_type:UNKNOWN_BASE_TYPE` isn't valid
See original GitHub issueBug 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
The issue happens when I tried with stripe and github apis, which It could happen to any spec as well.
openapi-generator version
v5.0.0
OpenAPI declaration file content or url
https://github.com/stripe/openapi/blob/master/openapi/spec3.yaml
Generation Details
openapi-generator-cli generate -i stripe.yaml -g ocaml -o stripe --enable-post-process-file
Steps to reproduce
Run dune build
inside the root project
Suggest a fix
The main issue happens to use a capital letter for a record type since OCaml reserves capital letters for variants. If it’s as easy as renaming it, I would suggest using lower-case for the unknown-types.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Gagallium : How I found a bug in Intel Skylake processors - Inria
I completely failed to see what kind of memory management bug in OCaml could cause random crashes! The number of failures given above...
Read more >OCaml - Wikipedia
OCaml is a general-purpose, multi-paradigm programming language which extends the Caml dialect of ML with object-oriented features. OCaml was created in ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
tested with https://github.com/OpenAPITools/openapi-generator/pull/12369 and no longer be able to repeat the issue.
Thanks @wing328