Skip to content

Commit

Permalink
rename generated protobuf ts file to have suffix .pb.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
lyonlai committed Oct 27, 2020
1 parent a096039 commit bba3a22
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#protoc-gen-grpc-gateway-ts

`protoc-gen-grpc-gateway-ts` is a Typescript client generator for the [grpc-gateway](https://github.com/grpc-ecosystem/grpc-gateway/) project. It generates idiomatic Typescript clients that connect the web frontend and golang backend fronted by grpc-gateway.


Features:
1. idiomatic Typescript clients and messages
2. Supports both One way and server side streaming gRPC calls
3. POJO request construction guarded by message type definitions, which is way easier compare to `grpc-web`
4. No need to use swagger/open api to generate client code for the web.

License
protoc-gen-grpc-gateway-ts is licensed under the MIT License. See LICENSE.txt for more details.
2 changes: 1 addition & 1 deletion data/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func GetTSFileName(fileName string) string {
baseName := filepath.Base(fileName)
ext := filepath.Ext(fileName)
name := baseName[0 : len(baseName)-len(ext)]
return path.Join(filepath.Dir(fileName), name+".ts")
return path.Join(filepath.Dir(fileName), name+".pb.ts")
}

// Type is an interface to get type out of field and method arguments
Expand Down

0 comments on commit bba3a22

Please sign in to comment.