ion-cli icon indicating copy to clipboard operation
ion-cli copied to clipboard

Modify generator to store determined data model with proper errors for conflicting types

Open desaikd opened this issue 2 years ago • 0 comments

Related conversations:

There's a point in the code gen method where we should go from Option<DataModel> to DataModel. This error should happen there, and all methods downstream of that point (including this one) should operate on DataModel instead of Option<DataModel>.

If constaints cannot be empty, it would be good to note that in a comment. If it can be empty, then code_gen_context can contain a None, which is possibly a problem?

We should be able to get a non-Option data type from this point on, I think. Do we still need the CodeGenContext now that it's just this field? If you have a future use for it in mind, cool. Otherwise, the Option<DataModel> could just be a local variable in the code gen method.

desaikd avatar Dec 07 '23 18:12 desaikd