Skip to content

Latest commit

 

History

History
49 lines (28 loc) · 1.9 KB

README.md

File metadata and controls

49 lines (28 loc) · 1.9 KB

schema2proto CircleCI

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

Artifacts are pushed to maven central: https://search.maven.org/search?q=schema2proto

Usage

Standalone (Only for converting XSD to PROTO)

See standalone tool

Maven (Both converting XSD to PROTO and for modifying PROTO files

See maven plugin

Maintaining backwards compatibility

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.

Contribution

See code style CODESTYLE.md

Licensing

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.