nytimes/openapi2proto

GRPC Package Name

forwardmeasure opened this issue · 2 comments

Hello all.
First of all, thank you for your wonderful work on this project!

I have a quick question regarding the package name of the generated protobuf specifications. I am running openapi2proto on the command line, and it appears that the package name is being generated from the 'title' under the 'info' message.

From the tests, it appears that one can configure this with fixtures programmatically. But, is there a way I can configure this via the command line?

Many thanks,
Prashanth

Howdy @forwardmeasure!

At this point in time, the tool is only set to use the title of the spec or, if provided, an x-global-option can be added to declare the package names for specific languages. An example is in the README: https://github.com/NYTimes/openapi2proto#global-options

Hey mate,
Thank you much for your prompt response. I actually took a different approach - I ended up writing a Swagger Code generator as an extension of the swagger-codegen project. As of now, I'm able to get a fairly complex OpeanAPI spec to produce a nice-looking (semantically correct :-) set of .protos and GRPC service definitions. But, it wouldn't have been possible if you hadn't put this project together, so thank you!

I shall be cleaning the code up and submitting a PR to the swagger repo soon!

Cheers,
Prashanth