ion-cli
ion-cli copied to clipboard
Modify generator to store determined data model with proper errors for conflicting types
Related conversations:
There's a point in the code gen method where we should go from
Option<DataModel>toDataModel. This error should happen there, and all methods downstream of that point (including this one) should operate onDataModelinstead ofOption<DataModel>.
If
constaintscannot be empty, it would be good to note that in a comment. If it can be empty, thencode_gen_contextcan contain aNone, which is possibly a problem?
We should be able to get a non-
Optiondata type from this point on, I think. Do we still need theCodeGenContextnow that it's just this field? If you have a future use for it in mind, cool. Otherwise, theOption<DataModel>could just be a local variable in the code gen method.