From 2fd85cf1943a9253360b60b153f7bb69e3607354 Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Wed, 16 Sep 2020 11:13:30 -0400 Subject: [PATCH] Replace erroneous references to "Get" with "Delete" in aip0135 package --- rules/aip0135/http_body_test.go | 6 +++--- rules/aip0135/request_name_field.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rules/aip0135/http_body_test.go b/rules/aip0135/http_body_test.go index 4a83cb66a..53314000e 100644 --- a/rules/aip0135/http_body_test.go +++ b/rules/aip0135/http_body_test.go @@ -41,14 +41,14 @@ func TestHttpBody(t *testing.T) { // Create a MethodOptions with the annotation set. opts := &dpb.MethodOptions{} httpRule := &annotations.HttpRule{ - Pattern: &annotations.HttpRule_Get{ - Get: "/v1/{name=publishers/*/books/*}", + Pattern: &annotations.HttpRule_Delete{ + Delete: "/v1/{name=publishers/*/books/*}", }, Body: test.body, } proto.SetExtension(opts, annotations.E_Http, httpRule) - // Create a minimal service with a AIP-135 Get method + // Create a minimal service with a AIP-135 Delete method // (or with a different method, in the "Irrelevant" case). service, err := builder.NewService("Library").AddMethod(builder.NewMethod(test.methodName, builder.RpcTypeMessage(builder.NewMessage("DeleteBookRequest"), false), diff --git a/rules/aip0135/request_name_field.go b/rules/aip0135/request_name_field.go index 6524429b6..9a68e68ff 100644 --- a/rules/aip0135/request_name_field.go +++ b/rules/aip0135/request_name_field.go @@ -29,7 +29,7 @@ var requestNameField = &lint.FieldRule{ LintField: func(f *desc.FieldDescriptor) []lint.Problem { if f.GetType() != builder.FieldTypeString().GetType() { return []lint.Problem{{ - Message: "`name` field on Get RPCs should be a string", + Message: "`name` field on Delete RPCs should be a string", Suggestion: "string", Descriptor: f, Location: locations.FieldType(f),