Skip to content
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

Mention Protobuf Style Guides on the v7 protocol #269

Merged
merged 3 commits into from
Sep 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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