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
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
Proto parsing and schema handling use Square Wire (com.squareup.wire:wire-schema-jvm,
Apache License 2.0) as a regular dependency. Earlier versions shipped a modified copy of it as the schema2proto-wire
module, which has been removed.
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.