storyicon / powerproto

🎉 An awesome version control tool for protoc and its related plugins.
Apache License 2.0
182 stars 19 forks source link

Variables support in the "options" section #5

Open strobil opened 3 years ago

strobil commented 3 years ago

Hello! I have a separate config file for grpc-gw config, so a directory structure looks like this:

.
├── powerproto.yaml
├── service_1
│   ├── service_1.proto
│   └── service_1.yaml
└── service_2
    ├── service_2.proto
    └── service_2.yaml

I need to pass --grpc-gateway_opt=grpc_api_configuration=service_1/service_1.yaml option, but looks like an option array does not have variable parsing support.

So i can't specify options like this: --grpc-gateway_opt=grpc_api_configuration=$SOURCE_RELATIVE/grpc_api_config.yaml

It would be great if powerproto will have support of variables inside of options array. Thanks!

storyicon commented 3 years ago

Sorry I'm late, I was delayed by some things some time ago, I have supported this feature via https://github.com/storyicon/powerproto/pull/6: You should now be able to use the variables in the options field of the config file, like in importPaths. Thanks for your suggestion. If this PR doesn't meet your expectations, please feel free to contact me.