ModelBoiler
ModelBoiler copied to clipboard
Support for nested models
Right now, it's not possible to generate code for this selection:
struct OuterModel {
var name = ""
var id = 0
struct InnerModel {
var someProperty = ""
}
}
This will throw an exception in model-generator when generating the code and Model Boiler will present a failure notification.
Expected behaviour: Models should be split up by Model Boiler and then passed one by one into model-generator, while keeping the module name (= outer struct/class name).
All the generated code would then be merged into one string and that will be put back into clipboard and the resulting code would look like this:
extension OuterModel: Serializable {
// boilerplate code here
}
extension OuterModel.InnerModel: Serializable {
// boilerplate code here
}