Files
openapi-generator-original/docs/generators
Julien Debon 4f00a34df6 [OCaml][Fix] Unreferenced enum + Direct recursive types (#23005)
* [OCaml] Fix bugs around enum parsing

Problem: The OCaml client generator threw IllegalArgumentException: Unreferenced enum when encountering enums inside composed schemas
  (anyOf/allOf/oneOf).

Root Causes:
1. The enum collection logic didn't traverse into composed schemas
2. The enum hashing used order-dependent string concatenation, causing lookups to fail when enum values appeared in different orders
3. Enums directly within composed schema branches (not in properties) weren't collected

Solution:

1. Added composed schema support:
  - New `collectEnumSchemasFromComposed()` method handles `anyOf/allOf/oneOf`
  - New `collectEnumSchemasFromList()` method recursively processes composed schema branches
  - Enums directly in composed schemas (not just in properties) are now collected
2. Refactored enum hashing to use Set:
  - Changed from comma-joined strings to `TreeSet<String>` for order-independent, collision-free hashing
  - Handles edge cases like empty string enums `""`
3. Added test case:
  - Tests enums in nested composed schemas
  - Tests enum with empty string value in anyOf

* OCaml: Add support for direct recursive types

* OCaml: Fix enums in anyOf

* OCaml: fix recursive types

* Fix recursion tests

* Fix recursive types, improve tests

* [OCaml] Improve title of generated README.md
2026-02-23 21:52:19 +08:00
..
2024-02-23 16:27:26 +08:00
2024-02-23 16:27:26 +08:00
2024-02-23 16:27:26 +08:00
2024-02-23 16:27:26 +08:00
2024-02-23 16:27:26 +08:00
2025-12-22 16:09:33 +08:00
2025-11-23 17:19:16 +08:00
2025-01-11 15:44:42 +08:00
2023-12-13 16:13:31 +08:00
2024-04-24 23:50:14 +08:00
2024-01-10 11:50:48 +08:00
2024-10-05 17:08:14 +08:00

The following generators are available:

CLIENT generators

SERVER generators

DOCUMENTATION generators

SCHEMA generators

CONFIG generators