You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to provide a --prefix , such that a Template structure in thrift could be named CG_Alpha_Template. In that example, --prefix "CG_Alpha_" helps label it as "CG" as code-gen and "Alpha" as the service name.
Historically, all fields in our back-end service thrift files are optional and the front-end defines a new flow type for just the necessary fields. On top of that, two thrift files may have identical type names. Therefore, Template type can actually be the name of four unique types (4) in a particular project.
Instead, it would be nice if the four unique types had four different names so they are easily searchable by "_Template" or "Alpha_Template", but actually named:
CG_Alpha_Template vs CG_Zeta_Template in flow type code-gen
Alpha_Template vs Zeta_Template in our own types that are a subset of code-gen
The renaming could also be done as part of post-processing in the code-gen CLI that uses this thrift2flow library. The code-gen CLI would need some changes whether it passes a --prefix or does post-processing, so I'm also opening an issue there.
Please let me know what you think! Thank you.
The text was updated successfully, but these errors were encountered:
vlad
changed the title
Allow --prefix option
Allow --prefix option or replacement regex option
May 18, 2019
Would love this as well.
Say I have Foo and Bar service.
I would like everything from foo.thrift to be prepended with Foo.
Like: FooUUID, FooSomeType, FooResponseType.
Same goes for Bar.
I'd like to provide a --prefix , such that a
Template
structure in thrift could be namedCG_Alpha_Template
. In that example, --prefix "CG_Alpha_" helps label it as "CG" as code-gen and "Alpha" as the service name.Historically, all fields in our back-end service thrift files are optional and the front-end defines a new flow type for just the necessary fields. On top of that, two thrift files may have identical type names. Therefore,
Template
type can actually be the name of four unique types (4) in a particular project.Instead, it would be nice if the four unique types had four different names so they are easily searchable by "_Template" or "Alpha_Template", but actually named:
The renaming could also be done as part of post-processing in the code-gen CLI that uses this thrift2flow library. The code-gen CLI would need some changes whether it passes a --prefix or does post-processing, so I'm also opening an issue there.
Please let me know what you think! Thank you.
The text was updated successfully, but these errors were encountered: