nytimes / openapi2proto

A tool for generating Protobuf v3 schemas and gRPC service definitions from OpenAPI specifications
Apache License 2.0
964 stars 98 forks source link

Support x-proto-tag specified as string #115

Closed cesarblum closed 5 years ago

cesarblum commented 5 years ago

Support both

x-proto-tag: 1

And

x-proto-tag: "1"

I use Springfox (http://springfox.github.io/springfox/) to generate Swagger specs from Java code. I wrote a Springfox plugin to add the x-proto-tag extension to my specs, but Springfox only supports adding string-valued vendor extensions. Hence I made this change to openapi2proto. I think it's useful for other people running into the same sort of limitation.