OpenAPITools / OpenAPITools/openapi-generator

[BUG][OCaml] Generation of `Any_of` and `One_of` is missing, fails at compilation

Open
#8,397 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

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

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

It seems like the type doesn't exist, but I'm unsure since the error output triggers a lot of them.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by generating the OCaml client from stripe.yaml with the provided openapi-generator-cli command, then run dune build in the generated project to capture the compilation errors. Trace the missing Any_of and One_of types in the generated output and confirm the fix by getting the generated project to compile.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.