From 78940fd41426a1be09fd6dbe7b9261d93aae372e Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Tue, 18 May 2021 09:29:45 +1200 Subject: [PATCH] gRPC versioning and nested messages (#22324) Co-authored-by: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> --- aspnetcore/grpc/versioning.md | 1 + 1 file changed, 1 insertion(+) diff --git a/aspnetcore/grpc/versioning.md b/aspnetcore/grpc/versioning.md index 7a56216543..89638ce912 100644 --- a/aspnetcore/grpc/versioning.md +++ b/aspnetcore/grpc/versioning.md @@ -43,6 +43,7 @@ The following changes are non-breaking at a gRPC protocol level, but the client * **Removing a field** - Values from a removed field are deserialized to a message's [unknown fields](https://developers.google.com/protocol-buffers/docs/proto3#unknowns). This isn't a gRPC protocol breaking change, but the client needs to be updated if it upgrades to the latest contract. It's important that a removed field number isn't accidentally reused in the future. To ensure this doesn't happen, specify deleted field numbers and names on the message using Protobuf's [reserved](https://developers.google.com/protocol-buffers/docs/proto3#reserved) keyword. * **Renaming a message** - Message names aren't typically sent on the network, so this isn't a gRPC protocol breaking change. The client will need to be updated if it upgrades to the latest contract. One situation where message names **are** sent on the network is with [Any](https://developers.google.com/protocol-buffers/docs/proto3#any) fields, when the message name is used to identify the message type. +* **Nesting or unnesting a message** - Message types can be [nested](https://developers.google.com/protocol-buffers/docs/proto3#nested). Nesting or unnesting a message changes its message name. Changing how a message type is nested has the same impact on compatibility as renaming. * **Changing csharp_namespace** - Changing `csharp_namespace` will change the namespace of generated .NET types. This isn't a gRPC protocol breaking change, but the client needs to be updated if it upgrades to the latest contract. ### Protocol breaking changes