From 0aa68395fb417be2df1e4a373c00ac60ed4a64f8 Mon Sep 17 00:00:00 2001 From: "duanyi.aster" Date: Tue, 7 Jan 2025 13:48:31 +0800 Subject: [PATCH] test --- testdata/idl/example4.thrift | 2 +- thrift/annotation.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/testdata/idl/example4.thrift b/testdata/idl/example4.thrift index a0e2b2b3..e8c2a746 100644 --- a/testdata/idl/example4.thrift +++ b/testdata/idl/example4.thrift @@ -11,7 +11,7 @@ struct GetFavoriteReq { 255: required Favorite Base, } struct GetFavoriteResp { - 1: required Favorite Favorite (api.body="favorite"), + 1: required Favorite Favorite (api.key="favorite"), 255: required base.BaseResp BaseResp, } diff --git a/thrift/annotation.go b/thrift/annotation.go index 4c84271c..308576b8 100644 --- a/thrift/annotation.go +++ b/thrift/annotation.go @@ -469,4 +469,6 @@ func injectAnnotations(origin *[]*parser.Annotation, next []parser.Annotation) e var ( ctxIsBodyRoot = "isBodyRoot" CtxKeyIsBodyRoot = &ctxIsBodyRoot + ctxIsRequest = "isRequest" + CtxKeyIsRequest = &ctxIsRequest )