Skip to content

Commit 7fd5e2e

Browse files
committed
Fix some incorrect docs on protoc options
Motivation: In #70 the protoc plugin got renamed, some of the docs weren't updated appropriately. Modifications: - Update the docs Result: More accurate docs
1 parent df605cd commit 7fd5e2e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Sources/GRPCProtobuf/Documentation.docc/Articles/Generating-stubs.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,37 +98,37 @@ lower in the file hierarchy supersedes one above it.
9898
The [`grpc-swift-protobuf`](https://github.com/grpc/grpc-swift-protobuf) package provides
9999
`protoc-gen-grpc-swift-2`, a program which is a plugin for the Protocol Buffers compiler, `protoc`.
100100
To generate gRPC stubs for your `.proto` files directly you must run the `protoc` command with
101-
the `--grpc-swift_out=<DIRECTORY>` option:
101+
the `--grpc-swift-2_out=<DIRECTORY>` option:
102102

103103
```console
104-
protoc --grpc-swift_out=. my-service.proto
104+
protoc --grpc-swift-2_out=. my-service.proto
105105
```
106106

107107
> `protoc-gen-grpc-swift-2` only generates gRPC stubs, it doesn't generate messages. You must use
108108
> `protoc-gen-swift` to generate messages in addition to gRPC Stubs.
109109
110-
The presence of `--grpc-swift_out` tells `protoc` to use the `protoc-gen-grpc-swift-2` plugin. By
110+
The presence of `--grpc-swift-2_out` tells `protoc` to use the `protoc-gen-grpc-swift-2` plugin. By
111111
default it'll look for the plugin in your `PATH`. You can also specify the path to the plugin
112112
explicitly:
113113

114114
```console
115-
protoc --plugin=/path/to/protoc-gen-grpc-swift-2 --grpc-swift_out=. my-service.proto
115+
protoc --plugin=/path/to/protoc-gen-grpc-swift-2 --grpc-swift-2_out=. my-service.proto
116116
```
117117

118118
You can also specify various option the `protoc-gen-grpc-swift-2` via `protoc` using
119-
the `--grpc-swift_opt` argument:
119+
the `--grpc-swift-2_opt` argument:
120120

121121
```console
122-
protoc --grpc-swift_opt=<OPTION_NAME>=<OPTION_VALUE> --grpc-swift_out=.
122+
protoc --grpc-swift-2_opt=<OPTION_NAME>=<OPTION_VALUE> --grpc-swift-2_out=.
123123
```
124124

125-
You can specify multiple options by passing the `--grpc-swift_opt` argument multiple times:
125+
You can specify multiple options by passing the `--grpc-swift-2_opt` argument multiple times:
126126

127127
```console
128128
protoc \
129-
--grpc-swift_opt=<OPTION_NAME1>=<OPTION_VALUE1> \
130-
--grpc-swift_opt=<OPTION_NAME2>=<OPTION_VALUE2> \
131-
--grpc-swift_out=.
129+
--grpc-swift-2_opt=<OPTION_NAME1>=<OPTION_VALUE1> \
130+
--grpc-swift-2_opt=<OPTION_NAME2>=<OPTION_VALUE2> \
131+
--grpc-swift-2_out=.
132132
```
133133

134134
#### Generator options

0 commit comments

Comments
 (0)