From 6da7b00c92abccc546d8515c15161a214a0cfc2a Mon Sep 17 00:00:00 2001 From: hello Date: Wed, 10 Jul 2024 18:48:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=BE=E8=AE=A1=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notes/helloshop/basket-service-grpc.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/notes/helloshop/basket-service-grpc.md b/notes/helloshop/basket-service-grpc.md index 8cfdf30..792049d 100644 --- a/notes/helloshop/basket-service-grpc.md +++ b/notes/helloshop/basket-service-grpc.md @@ -13,12 +13,16 @@ gRPC 使用 Protocol Buffers 作为接口定义语言(IDL),Protocol Buffer 定义一个 gRPC 服务,需要创建一个 gRPC 服务定义文件(.proto 文件),然后使用 gRPC 工具生成服务端和客户端代码。 -## 带有OpenAPI 的 gRPC 服务 +## 带有 OpenAPI 的 gRPC 服务 ```shell dotnet add package Microsoft.AspNetCore.Grpc.Swagger ``` +```xml +true +``` + ```csharp var builder = WebApplication.CreateBuilder(args); builder.Services.AddGrpc().AddJsonTranscoding();