mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-09 13:29:00 +00:00
* [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