Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
4 of 6 tasks
davesnx opened this issue Jan 10, 2021 · 6 comments
Closed
4 of 6 tasks

Comments

@davesnx
Copy link

davesnx commented Jan 10, 2021

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.

@davesnx davesnx changed the title [BUG][OCaml] Generation of unknown_base_type:UNKNOWN_BASE_TYPE isn't valid [BUG] [OCaml] Generation of unknown_base_type:UNKNOWN_BASE_TYPE isn't valid Jan 15, 2021
@davesnx
Copy link
Author

davesnx commented Jan 15, 2021

I'm not familiar with the project, but I might be able to give it a try. Is there anything you could guide me here? @cgensoul

I opened 2 issues regarding code-gen and both seem straight forward, but I can't be sure, seems the templating needs to change the formating to lower case?

@cgensoul
Copy link
Contributor

cgensoul commented Jan 15, 2021 via email

@davesnx
Copy link
Author

davesnx commented Jan 15, 2021

Hey @cgensoul, no worries and enjoy your vacations!

I will give it a shot and try to post any question that I might here.

Thanks for the fast response

@wing328
Copy link
Member

wing328 commented Jan 21, 2021

@davesnx thanks for reporting the issue. This issue seems related: #7922.

@wing328
Copy link
Member

wing328 commented May 20, 2022

tested with #12369 and no longer be able to repeat the issue.

@wing328 wing328 closed this as completed May 20, 2022
@davesnx
Copy link
Author

davesnx commented May 20, 2022

Thanks @wing328

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants