开发者

Convert XSDs to Protos

开发者 https://www.devze.com 2023-03-14 13:38 出处:网络
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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号