New to Loopback and am scratching my head on how to create a Model definition programmatically and have it generate its model.json file.
I have looked at Instance Instrospection , but I simply want to create a model from already having the definition and not having an instance yet.
I have this in my code:
var newModel = db.createModel(contentType.name, properties, { "base": "PersistedModel", "idInjection": true });
newModel.setup();
app.model(newModel);
Which creates the model and it shows up in API explorer and all, but it doesn't create the model.json file.