Complete OpenAPI generator with typed responses and nullable fields
Major enhancements to the OpenAPI code generator:
1. allOf composition support:
- Added resolve_schema_ref to look up referenced schemas
- Added flatten_all_of to recursively merge properties from composed schemas
- Added expand_schema to resolve allOf before generating types
- VideoDetails now contains all 50+ fields from Video merged in
2. Property type reference resolution:
- Updated type_of_json_schema to handle allOf with $ref in properties
- Properties like "id: allOf: [$ref: '#/components/schemas/id']" now
resolve to the correct type
3. Nullable field handling:
- Added is_nullable tracking to field_info
- Added nullable combinators to runtime (nullable_any, nullable_string,
nullable_ptime, nullable_int, nullable_float, nullable_bool)
- Fields marked "nullable: true" use these combinators to handle both
absent and explicit JSON null values
4. public_name in generated dune files:
- Libraries are now public by default for proper dependency management
The peertube library now generates fully typed records with proper
accessors for all schemas, including composed types like VideoDetails.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>