Why an API versioning strategy is important
We will begin by setting up two applications. We will pretend that these two applications are developed by different teams and they don't have access to shared gRPC dependencies. This setup will be done to demonstrate why API versioning is so important.
For convenience, while using an IDE, you may add these applications to the same solution. But this is not necessary, as these applications will not share any dependencies.
Creating a server application
We will start by executing the following command to create an ASP.NET Core application based on the gRPC Service
template:
dotnet new grpc -o GrpcServer
In the GrpcServer
project folder that has been created, we will remove the default greet.proto
file from the Protos
folder. Then, we will place the stats.proto
file in there with the following service definition:
syntax = "proto3"; package stats; service Status { rpc GetStatus (StatusRequest)...