-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid module name for proto files with dashes or dots in name #42
Open
anatolym opened this issue
Dec 11, 2022
· 0 comments
· Fixed by dpup/protoc-gen-grpc-gateway-ts#20 · May be fixed by #43
Open
Invalid module name for proto files with dashes or dots in name #42
anatolym opened this issue
Dec 11, 2022
· 0 comments
· Fixed by dpup/protoc-gen-grpc-gateway-ts#20 · May be fixed by #43
Comments
anatolym
added a commit
to anatolym/protoc-gen-grpc-gateway-ts
that referenced
this issue
Dec 11, 2022
Fixes grpc-ecosystem#42 The fix patches `data.GetModuleName` func to return a camel cased string to be used as a unique module name in TS artifacts. Here we replace manual conversion of a package name and base file name with `ToCamel` func of the `github.com/iancoleman/strcase` package. This helper package has already been included in go.mod. `ToCamel` removes `.`, `-`, `_` or whitespace chars from the input string and uses those as a mark to capitalize the next letter.
anatolym
added a commit
to anatolym/protoc-gen-grpc-gateway-ts
that referenced
this issue
Dec 11, 2022
Fixes grpc-ecosystem#42 The fix patches `data.GetModuleName` func to return a camel cased string to be used as a unique module name in TS artifacts. Here we replace manual conversion of a package name and base file name with `ToCamel` func of the `github.com/iancoleman/strcase` package. This helper package has already been included in go.mod. `ToCamel` removes `.`, `-`, `_` or whitespace chars from the input string and uses those as a mark to capitalize the next letter.
dpup
pushed a commit
to dpup/protoc-gen-grpc-gateway-ts
that referenced
this issue
May 12, 2024
Fixes grpc-ecosystem#42 The fix patches `data.GetModuleName` func to return a camel cased string to be used as a unique module name in TS artifacts. Here we replace manual conversion of a package name and base file name with `ToCamel` func of the `github.com/iancoleman/strcase` package. This helper package has already been included in go.mod. `ToCamel` removes `.`, `-`, `_` or whitespace chars from the input string and uses those as a mark to capitalize the next letter.
dpup
pushed a commit
to dpup/protoc-gen-grpc-gateway-ts
that referenced
this issue
May 12, 2024
Fixes grpc-ecosystem#42 The fix patches `data.GetModuleName` func to return a camel cased string to be used as a unique module name in TS artifacts. Here we replace manual conversion of a package name and base file name with `ToCamel` func of the `github.com/iancoleman/strcase` package. This helper package has already been included in go.mod. `ToCamel` removes `.`, `-`, `_` or whitespace chars from the input string and uses those as a mark to capitalize the next letter.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
When a protobuf service consists of several files, and some files have special chars in their names like
.
or-
, the generated TS code has invalid import instructions.Affected version
https://github.com/grpc-ecosystem/protoc-gen-grpc-gateway-ts/releases/tag/v1.1.2
Reproduce steps
service.proto
andproduct-models.proto
.MyserviceProduct-models
intmp/generated/service.pb.ts
:The text was updated successfully, but these errors were encountered: