Skip to content

Commit babbcb4

Browse files
authored
Move examples to top-level (#2024)
Motivation: There are two examples directories: one at the top-level and one buried in Sources. The top-level directory contains examples which can't be built with SwiftPM and are more or less unmaintained. The harder-to-find examples within Sources are built by SwiftPM and are kept up-to-date. Examples should be easy to find, and the easy to find examples should be the maintained ones. Modifications: - Remove the top-level unmaintained examples - Move the examples from Sources to the top-level - Update docs and various links Results: - Only maintained examples are kept - Examples are easier to find
1 parent c47c975 commit babbcb4

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Sources/GRPCReflectionService/Documentation.docc/ReflectionServiceTutorial.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This tutorial goes through the steps of adding Reflection service to a
44
server, running it and testing it using gRPCurl.
55

66
The server used in this example is implemented at
7-
[Sources/Examples/v1/ReflectionService/ReflectionServer.swift][reflection-server]
7+
[Examples/v1/ReflectionService/ReflectionServer.swift][reflection-server]
88
and it supports the "Greeter", "Echo", and "Reflection" services.
99

1010

@@ -38,27 +38,27 @@ describing the services of the server and the version of the reflection service.
3838
The server from this example uses the `GreeterProvider` and the `EchoProvider`,
3939
besides the `ReflectionService`.
4040

41-
The associated proto files are located at `Sources/Examples/v1/HelloWorld/Model/helloworld.proto`, and
42-
`Sources/Examples/v1/Echo/Model/echo.proto` respectively.
41+
The associated proto files are located at `Examples/v1/HelloWorld/Model/helloworld.proto`, and
42+
`Examples/v1/Echo/Model/echo.proto` respectively.
4343

4444
In order to generate the reflection data for the `helloworld.proto`, you can run the following command:
4545

4646
```sh
47-
$ protoc Sources/Examples/v1/HelloWorld/Model/helloworld.proto \
48-
--proto_path=Sources/Examples/v1/HelloWorld/Model \
47+
$ protoc Examples/v1/HelloWorld/Model/helloworld.proto \
48+
--proto_path=Examples/v1/HelloWorld/Model \
4949
--grpc-swift_opt=Client=false,Server=false,ReflectionData=true \
50-
--grpc-swift_out=Sources/Examples/v1/ReflectionService/Generated
50+
--grpc-swift_out=Examples/v1/ReflectionService/Generated
5151
```
5252

5353
Let's break the command down:
5454
- The first argument passed to `protoc` is the path
5555
to the `.proto` file to generate reflection data
56-
for: [`Sources/Examples/v1/HelloWorld/Model/helloworld.proto`][helloworld-proto].
57-
- The `proto_path` flag is the path to search for imports: `Sources/Examples/v1/HelloWorld/Model`.
56+
for: [`Examples/v1/HelloWorld/Model/helloworld.proto`][helloworld-proto].
57+
- The `proto_path` flag is the path to search for imports: `Examples/v1/HelloWorld/Model`.
5858
- The 'grpc-swift_opt' flag allows us to list options for the Swift generator.
5959
To generate only the reflection data set: `Client=false,Server=false,ReflectionData=true`.
6060
- The `grpc-swift_out` flag is used to set the path of the directory
61-
where the generated file will be located: `Sources/Examples/v1/ReflectionService/Generated`.
61+
where the generated file will be located: `Examples/v1/ReflectionService/Generated`.
6262

6363
This command assumes that the `protoc-gen-grpc-swift` plugin is in your `$PATH` environment variable.
6464
You can learn how to get the plugin from this section of the `grpc-swift` README:

0 commit comments

Comments
 (0)