-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Labels
priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
Followup on #2229.
The generated HttpJsonEchoStub can't handle message type: google.rpc.ErrorInfo introduced by echo.proto (version 0.29.0).
A easy integration test:
@Test
public void testEchoErrorDetails() {
EchoErrorDetailsResponse response = httpjsonClient.echoErrorDetails(
EchoErrorDetailsRequest
.newBuilder()
.setSingleDetailText("singleDetailText1774380934")
.addAllMultiDetailText(new ArrayList<>())
.build());
assertThat(response.hasSingleDetail()).isEqualTo(true);
}
failed with the following error message:
Caused by: com.google.protobuf.InvalidProtocolBufferException: Cannot resolve type: type.googleapis.com/google.rpc.ErrorInfo
at com.google.protobuf.util.JsonFormat$ParserImpl.mergeAny(JsonFormat.java:1511)
Possible solution:
Add the message type in
Lines 1279 to 1286 in 003b993
| for (Method method : service.methods()) { | |
| if (method.hasLro()) { | |
| TypeNode anyType = method.lro().responseType(); | |
| anyTypes.put(anyType.reference().fullName(), anyType); | |
| anyType = method.lro().metadataType(); | |
| anyTypes.put(anyType.reference().fullName(), anyType); | |
| } | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.