This tool does 2 things:
- Converts XML Schema files (.xsd) to Protocol Buffers (.proto).
- Modifies existing proto files by adding, modifying and removing fields, messages etc. Also support for merging proto files using the same package
Artifacts are pushed to maven central: https://search.maven.org/search?q=schema2proto
See standalone tool
See maven plugin
If your use case is to maintain a proto descriptor based on a "living" xsd, you will need to detect and possibly resolve any backwards incompatibility issues that may arise from modifying the xsd.
You can use the tool protolock to verify that i.e. fields have not changed name or id.
If you are using the Maven there is a plugin as well: https://github.com/salesforce/proto-backwards-compat-maven-plugin
Only automatic resolving of field name/id conflicts have been implemented so far.
See code style CODESTYLE.md
EUPL, see LICENSE and https://en.wikipedia.org/wiki/European_Union_Public_Licence
The schema2proto-wire module is a modified copy from https://github.com/square/wire/tree/master/wire-schema that seems to have become https://github.com/square/wire/tree/master/wire-library/wire-schema now.
The schema2proto-xsom module is a modified copy from https://github.com/eclipse-ee4j/jaxb-ri/tree/master/jaxb-ri/xsom, see original LICENSE
The codebase was once based on https://github.com/tranchis/xsd2thrift but has been completely rewritten.