ahrefs / atd

Static types for JSON APIs
Other
315 stars 52 forks source link

atdgen: allow empty records #400

Open kopecs opened 9 months ago

kopecs commented 9 months ago

It would be useful if empty records, as in

type t = {}

were accepted by atdgen and represented in OCaml as unit. One use case for this is when the record will, in the future, have fields added, but no fields are yet present. Given this is accepted by, e.g., atdpy, it would be useful if it were also accepted by other targets for uniformity.