You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there @jimblackler ! This is a really cool project. I was trying to generate java types around Jupyter's nbformat.v4.schema.json. While generation succeeded, it seems that none of the types inside of definitions were generated, and the cell type which contains any of raw_cell, markdown_cell, or code_cell instead generated as generic JSONObjects.
Any idea why this might be? I've attached the generated java from your online sample
The text was updated successfully, but these errors were encountered:
The reason I don't handle oneOf, anyOf and allOf is that these keywords cause a sudden huge leap in the complexity of translating from the validation spec to a formal language structure. They can describe potential data forms that don't have an obvious counterpart in languages like Java.
It's possible that something could be designed for case of a schema consisting of only oneOf. The problem is that a client would have to actually validate the object to understand which of the (in this case three) schemas defined the object.
I'll have a think about it, but I can't think of anything practical at the moment.
Hi Jim! Thanks for getting back to me. Your explanation makes sense. One compromise that still might make sense would be to not expand the oneOf but to still generate all the types inside of definitions. Then at least we could manually do checks and instantiate the types when we encounter a oneOf. What do you think?
Hi there @jimblackler ! This is a really cool project. I was trying to generate java types around Jupyter's nbformat.v4.schema.json. While generation succeeded, it seems that none of the types inside of
definitions
were generated, and thecell
type which contains any ofraw_cell
,markdown_cell
, orcode_cell
instead generated as generic JSONObjects.Any idea why this might be? I've attached the generated java from your online sample
The text was updated successfully, but these errors were encountered: