question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] [OCaml] Generation of `unknown_base_type:UNKNOWN_BASE_TYPE` isn't valid

See original GitHub issue

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

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:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
wing328commented, May 20, 2022

tested with https://github.com/OpenAPITools/openapi-generator/pull/12369 and no longer be able to repeat the issue.

0reactions
davesnxcommented, May 20, 2022

Thanks @wing328

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found