Open ghilainm opened 5 years ago
MyMessageType is added to the the definitions section so it can be used by both MyMessage and by other messages from other files using the well known "definitions" convention.
Just wondering why wouldn't you want MyMessageType to be added to the definitions section?
Here I was just following the JAXB way. They don't generate a MyMessageType, they only generate MyMessage.
MyMessage and MyMessageType define the same type, MyMessage is just an alias (at least in the json schema), so that's why it was weird for me.
It seems like the handling of the root element is not correct.
Here is the xsd
Here is the generated json
Here is the expected generated json