nokia / Avro-Schema-Generator

Tool which generates Avro schemas and Java bindings from XML schemas.
Apache License 2.0
37 stars 26 forks source link

Unable to parse the following xsd without complex types #6

Open tikaa opened 8 years ago

tikaa commented 8 years ago

`<?xml version="1.0"?>

` In the case the XSD not having complex types, the java class is generated from JAXB, but the avro schema is not generated, If I add a complex type to this as follows, ` ` then, avro schema is generated only for the complex type parameters and the root level parameters such as ` ` are ignored...
UnquietCode commented 8 years ago

This behavior seems to be currently unsupported. If you look here you can see that only the classes and enums generated by JAXB are turned into an avro schema. At the moment I'm not sure how to do that, but it could probably be done by synthesizing some root class and manually placing the root elements on it. Either that or JAXB is already creating a root class but it's not in the usual classes list.