Commit 6334464 1 parent daa55b8 commit 6334464 Copy full SHA for 6334464
File tree 2 files changed +8
-1
lines changed
java/com/linecorp/armeria/internal/server/grpc
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -451,7 +451,11 @@ void httpEndpoint() {
451
451
FieldInfo .builder ("message_id" , TypeSignature .ofBase (JavaType .STRING .name ()))
452
452
.location (FieldLocation .PATH ).requirement (FieldRequirement .REQUIRED ).build (),
453
453
FieldInfo .builder ("text" , TypeSignature .ofBase (JavaType .STRING .name ()))
454
- .location (FieldLocation .BODY ).requirement (FieldRequirement .REQUIRED ).build ()));
454
+ .location (FieldLocation .BODY ).requirement (FieldRequirement .REQUIRED ).build (),
455
+ FieldInfo .builder ("required_text" , TypeSignature .ofBase (JavaType .STRING .name ()))
456
+ .location (FieldLocation .BODY ).requirement (FieldRequirement .REQUIRED ).build (),
457
+ FieldInfo .builder ("optional_text" , TypeSignature .ofBase (JavaType .STRING .name ()))
458
+ .location (FieldLocation .BODY ).requirement (FieldRequirement .OPTIONAL ).build ()));
455
459
assertThat (updateMessageV2 .useParameterAsRoot ()).isFalse ();
456
460
}
457
461
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ package armeria.grpc.testing;
21
21
option java_package = "testing.grpc" ;
22
22
23
23
import "google/api/annotations.proto" ;
24
+ import "google/api/field_behavior.proto" ;
24
25
import "google/protobuf/timestamp.proto" ;
25
26
import "google/protobuf/duration.proto" ;
26
27
import "google/protobuf/wrappers.proto" ;
@@ -292,6 +293,8 @@ message UpdateMessageRequestV1 {
292
293
293
294
message Message {
294
295
string text = 1 ; // The resource content.
296
+ google.protobuf.StringValue required_text = 2 [(google.api.field_behavior ) = REQUIRED ];
297
+ google.protobuf.StringValue optional_text = 3 ;
295
298
}
296
299
297
300
enum MessageType {
You can’t perform that action at this time.
0 commit comments