Convert XSDs to Protos
I have a set of services coupled with whole bunch of XSDs. Clients t开发者_如何学Gohat use my service use XML and in the future will use protobufs. Is there a tool out there that will convert my XSDs into proto files?
The plan here is to define the interface once using XSD and then autogenerate the protos so that both interfaces remain in sync.
This looks like it might fit the bill for you:
https://github.com/tranchis/xsd2thrift
I haven't used it myself, but the project description sounds like exactly what you're looking for.
Protomak is a tool dedicated to exactly this task.
- https://github.com/mtedone/protomak/ {source code}
- http://www.jemos.eu/projects/protomak/ {project website}
The lastest release supports:
- Xsd to Proto files with support for
- Anonymous types
- Complex types
- Inherited complex types
- Restrictions for enumerations
- Maven plugin
- Ant build task
Disclaimer: I worked on this project
精彩评论