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
..
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2024-02-13 16:18:05 +08:00
2025-08-12 11:13:16 +08:00
2025-08-12 11:13:16 +08:00
2024-09-19 09:34:51 +08:00
2023-12-13 15:07:18 +08:00
2024-10-09 01:38:12 +08:00
2023-12-13 15:07:18 +08:00
2026-02-12 19:41:05 +08:00
2025-08-07 10:01:55 +08:00
2025-07-16 15:32:28 +08:00
2024-05-15 14:51:59 +08:00
2024-09-24 01:05:07 +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-06-07 12:24:39 +08:00
2024-02-23 16:27:26 +08:00
2023-12-13 15:07:18 +08:00
2024-02-23 16:27:26 +08:00
2026-01-13 23:40:20 +08:00
2025-08-12 11:13:16 +08:00
2025-12-22 16:09:33 +08:00
2024-02-13 16:18:05 +08:00
2025-08-27 13:51:46 +08:00
2024-04-28 22:09:10 +08:00
2024-02-13 16:18:05 +08:00
2023-12-13 15:07:18 +08:00
2025-04-25 16:17:32 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2024-09-07 17:18:06 +08:00
2024-09-07 16:45:42 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2024-11-17 10:48:19 +08:00
2023-12-13 15:07:18 +08:00
2024-02-20 15:37:44 +08:00
2023-12-13 15:07:18 +08:00
2024-07-30 18:32:54 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2026-02-02 00:27:01 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2024-02-13 16:18:05 +08:00
2024-02-13 16:18:05 +08:00
2026-02-15 14:26:29 +08:00
2026-02-02 00:27:01 +08:00
2026-02-02 00:27:01 +08:00
2026-02-02 00:27:01 +08:00
2026-02-02 00:27:01 +08:00
2026-02-02 00:27:01 +08:00
2026-02-02 00:27:01 +08:00
2026-02-02 00:27:01 +08:00
2026-02-02 00:27:01 +08:00
2026-02-02 00:27:01 +08:00
2026-02-02 00:27:01 +08:00
2026-02-02 00:27:01 +08:00
2026-02-02 00:27:01 +08:00
2026-02-02 00:27:01 +08:00
2026-02-02 00:27:01 +08:00
2026-02-02 00:27:01 +08:00
2023-12-13 15:07:18 +08:00
2023-05-17 00:48:58 +08:00
2024-06-05 10:57:22 +08:00
2024-10-17 15:48:38 +02:00
2024-12-22 23:11:54 +08:00
2026-02-02 00:27:01 +08:00
2026-02-02 00:27:01 +08:00
2026-02-02 00:27:01 +08:00
2026-02-02 00:27:01 +08:00
2026-02-02 00:27:01 +08:00
2026-02-02 00:27:01 +08:00
2026-02-02 00:27:01 +08:00
2026-02-02 00:27:01 +08:00
2024-03-09 16:56:26 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2023-05-17 00:48:58 +08:00
2023-12-13 15:07:18 +08:00
2025-05-16 14:37:49 +08:00
2026-02-04 17:02:02 +08:00
2026-02-14 00:17:00 +08:00
2024-03-09 17:42:33 +08:00
2024-05-21 13:53:44 +08:00
2025-12-09 15:27:21 +08:00
2024-03-09 17:42:33 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2025-11-23 17:19:16 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2026-02-23 21:52:19 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2025-06-09 19:26:53 +08:00
2025-06-09 19:26:53 +08:00
2025-06-09 19:26:53 +08:00
2025-06-09 19:26:53 +08:00
2025-06-09 19:26:53 +08:00
2025-06-09 19:26:53 +08:00
2025-06-09 19:26:53 +08:00
2025-06-09 19:26:53 +08:00
2025-06-09 19:26:53 +08:00
2023-12-13 15:07:18 +08:00
2025-01-11 15:44:42 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2026-01-30 16:42:00 +08:00
2025-11-08 22:29:12 +08:00
2025-11-08 22:29:12 +08:00
2026-01-27 14:15:25 +08:00
2025-11-08 22:29:12 +08:00
2023-12-13 16:13:31 +08:00
2025-11-08 22:29:12 +08:00
2023-12-13 15:07:18 +08:00
2026-02-12 19:41:05 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2025-09-27 16:01:37 +08:00
2025-07-03 01:55:33 +08:00
2023-12-13 15:07:18 +08:00
2025-11-16 22:13:55 +08:00
2025-04-30 01:46:49 +08:00
2023-12-13 15:07:18 +08:00
2024-04-24 23:50:14 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2024-01-10 11:50:48 +08:00
2024-10-05 17:08:14 +08:00
2025-09-16 13:59:00 +08:00
2023-12-22 10:58:27 +08:00
2023-12-13 15:07:18 +08:00
2025-09-06 13:36:44 +08:00
2023-12-13 15:07:18 +08:00
2025-04-09 16:02:34 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2026-02-15 14:26:29 +08:00
2026-01-23 15:50:46 +00:00
2025-08-31 10:08:17 +08:00
2023-12-13 15:07:18 +08:00
2026-02-14 15:02:42 +08:00
2023-05-17 00:48:58 +08:00
2026-01-13 01:10:57 +08:00
2025-06-29 13:04:22 +02:00
2026-02-10 18:30:52 +08:00
2025-06-29 13:04:22 +02:00
2025-06-29 13:04:22 +02:00
2025-06-29 13:04:22 +02:00
2025-07-31 14:37:44 +02:00
2025-06-29 13:04:22 +02:00
2025-06-29 13:04:22 +02:00
2025-06-29 13:04:22 +02:00
2025-06-29 13:04:22 +02:00
2026-02-04 19:01:22 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00
2023-12-13 15:07:18 +08:00