andrenth / ocaml-swagger

Swagger 2.0 code generator for OCaml
37 stars 10 forks source link

Treat missing additional_properties as the unit type #12

Closed carlosdagos closed 5 years ago

carlosdagos commented 5 years ago

This addresses #11

As specified in http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.5.6 when this property is empty, we should treat it as an empty schema.

Thanks!

carlosdagos commented 5 years ago

Actually, it seems like this won't be enough.

Though this fixes the failwith, it generates

type t = unit [@@deriving yojson]

I would expect it to use the properties found in properties.

Will try again 😄