33 aep : 131
44 name : [core, '0131', request-path-reference-type]
55 summary : |
6- The `google .api.resource_reference` on the `path` field of a Get RPC request
6+ The `(aep .api.field_info) .resource_reference` on the `path` field of a Get RPC request
77 message should use `type`, not `child_type`.
88permalink : /131/request-path-reference-type
99redirect_from :
@@ -12,13 +12,13 @@ redirect_from:
1212
1313# Get methods: Resource reference
1414
15- This rule enforces that the ` google .api.resource_reference` on the ` path ` field
15+ This rule enforces that the ` (aep .api.field_info) .resource_reference` on the ` path ` field
1616of a Get RPC request message uses ` type ` , not ` child_type ` , as suggested in
1717[ AEP-131] [ ] .
1818
1919## Details
2020
21- This rule looks at the ` google .api.resource_reference` annotation on the ` path `
21+ This rule looks at the ` (aep .api.field_info) .resource_reference` annotation on the ` path `
2222field of any message matching ` Get*Request ` and complains if it does not use a
2323direct ` type ` reference.
2424
@@ -29,11 +29,11 @@ direct `type` reference.
2929``` proto
3030// Incorrect.
3131message GetBookRequest {
32- // The `google .api.resource_reference` annotation should be a direct `type`
32+ // The `(aep .api.field_info) .resource_reference` annotation should be a direct `type`
3333 // reference.
3434 string path = 1 [
3535 (aep.api.field_behavior) = FIELD_BEHAVIOR_REQUIRED,
36- (google .api.resource_reference) .child_type = "library.googleapis.com/Book"
36+ (aep .api.field_info).resource_reference .child_type = "library.googleapis.com/Book"
3737 ];
3838}
3939```
@@ -45,7 +45,7 @@ message GetBookRequest {
4545message GetBookRequest {
4646 string path = 1 [
4747 (aep.api.field_behavior) = FIELD_BEHAVIOR_REQUIRED,
48- (google .api.resource_reference) .type = "library.googleapis.com/Book"
48+ (aep .api.field_info).resource_reference .type = "library.googleapis.com/Book"
4949 ];
5050}
5151```
@@ -61,7 +61,7 @@ message GetBookRequest {
6161 // aep.dev/not-precedent: We need to do this because reasons. --)
6262 string path = 1 [
6363 (aep.api.field_behavior) = FIELD_BEHAVIOR_REQUIRED,
64- (google .api.resource_reference) .child_type = "library.googleapis.com/Book"
64+ (aep .api.field_info).resource_reference .child_type = "library.googleapis.com/Book"
6565 ];
6666}
6767```
0 commit comments