ahrefs / atd

Static types for JSON APIs
Other
308 stars 53 forks source link

atdd: recursive variants and records #397

Open elrandar opened 6 months ago

elrandar commented 6 months ago

type recursive_variant = [ | Int of int | Record of record_that_uses_recursive_variant ]

- Add support for recursive records :
```ocaml
type recursive_class <dlang shape="recursive"> = {
  id: int;
  flag: bool;
  children: recursive_class nullable;
}
elrandar commented 6 months ago

After using it for internal projects, I am not happy with the generated code in some cases, so would like to leave it open until I find the time to have an implementation I'm happy with

mjambon commented 2 months ago

Marking this PR as "draft" to avoid accidental merging.