Skip to content

Commit

Permalink
feat: add autopopulated request id field to echo (#1404)
Browse files Browse the repository at this point in the history
  • Loading branch information
alicejli authored Jan 4, 2024
1 parent 56796fa commit 196b665
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions schema/google/showcase/v1beta1/echo.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ syntax = "proto3";
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/field_info.proto";
import "google/api/routing.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/any.proto";
Expand Down Expand Up @@ -209,6 +210,11 @@ message EchoRequest {

// Optional. This field can be set to test the routing annotation on the Echo method.
string other_header = 5;

// Based on go/client-populate-request-id-design; subject to change
string request_id = 7 [
(google.api.field_info).format = UUID4
];
}

// The response message for the Echo methods.
Expand Down
5 changes: 5 additions & 0 deletions schema/google/showcase/v1beta1/showcase_v1beta1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,8 @@ http:
delete: '/v1beta1/{name=operations/**}'
- selector: google.longrunning.Operations.CancelOperation
post: '/v1beta1/{name=operations/**}:cancel'
publishing:
method_settings:
- selector: google.showcase.v1beta1.Echo.Echo
auto_populated_fields:
- request_id

0 comments on commit 196b665

Please sign in to comment.