Unless --just-types is specified, a handy Convert utility is created to cast raw JSON to well typed data models. However, these are only created for the top level types.
Support creating conversion routines for all types described in a schema.
This will support the common scenario where REST APIs return nested resources. As a fabricated example:
- The JSON schema
car.json describes the top level Car type and a nested CarManufacturer type.
- The API provides a top level
car/:carId resource. This maps to the quicktype Convert.toCar helper ✅
- The API provides a nested
car/:carId/manufacturer resource. While quicktype created the type for us, there is no matching converter ❌
Unless
--just-typesis specified, a handyConvertutility is created to cast raw JSON to well typed data models. However, these are only created for the top level types.Support creating conversion routines for all types described in a schema.
This will support the common scenario where REST APIs return nested resources. As a fabricated example:
car.jsondescribes the top levelCartype and a nestedCarManufacturertype.car/:carIdresource. This maps to the quicktypeConvert.toCarhelper ✅car/:carId/manufacturerresource. While quicktype created the type for us, there is no matching converter ❌