Skip to content

Commit

Permalink
Merge pull request #269 from twitchtv/protocol_routes_naming
Browse files Browse the repository at this point in the history
Mention Protobuf Style Guides on the v7 protocol
  • Loading branch information
marioizquierdo authored Sep 25, 2020
2 parents 1773817 + 07d35cf commit 282c5d0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions docs/routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ More details on the [protocol specification](spec_v7.md).

#### Naming Style

Please follow the [Protocol Buffers Style Guide](https://developers.google.com/protocol-buffers/docs/style#services). In particular, the `<Service>` and `<Method>` names should be CamelCased (with an initial capital).

The [official Go implementation](https://github.com/twitchtv/twirp) differs in behavior from what is described in the [protocol specification](spec_v7.md). The routes are modified to be CamelCase instead of using the exact from the proto file definition, so URL paths generated by Go clients may differ from paths generated by other languages. This issue is discussed in [#244](https://github.com/twitchtv/twirp/issues/244), and is easily avoided by following the Protocol Buffers Style Guide on your proto files.
For maximum compatibility, please follow the [Protocol Buffers Style Guide](https://developers.google.com/protocol-buffers/docs/style#services). In particular, the `<Service>` and `<Method>` names should be CamelCased (with an initial capital). This will ensure cross-language compatibility and prevent name collisions (e.g. `myMethod` and `my_method` would both map to `MyMethod`, causing a compile time error in some languages like Go).

### Content-Type Header (json or protobuf)

Expand Down

0 comments on commit 282c5d0

Please sign in to comment.