github.com/googleapis/api-linter@v1.65.2/docs/rules/0235/plural-method-name.md (about)

     1  ---
     2  rule:
     3    aip: 235
     4    name: [core, '0235', plural-method-name]
     5    summary: Batch Delete methods must have plural names.
     6  permalink: /235/plural-method-name
     7  redirect_from:
     8    - /0235/plural-method-name
     9  ---
    10  
    11  # Batch Delete methods: Plural method name
    12  
    13  This rule enforces that all `BatchDelete` RPCs have a plural resource in the
    14  method name, as mandated in [AIP-235][].
    15  
    16  ## Details
    17  
    18  This rule looks at any method whose name begins with `BatchDelete`, and complains
    19  if the name of the resource in the method name is singular.
    20  
    21  ## Examples
    22  
    23  **Incorrect** code for this rule:
    24  
    25  ```proto
    26  // Incorrect.
    27  // Method name should be `BatchDeleteBooks`
    28  rpc BatchDeleteBook(BatchDeleteBookRequest) returns (google.protobuf.Empty) {
    29    option (google.api.http) = {
    30      post: "/v1/{parent=publishers/*}/books:batchDelete"
    31      body: "*"
    32    };
    33  }
    34  ```
    35  
    36  **Correct** code for this rule:
    37  
    38  ```proto
    39  // Correct.
    40  rpc BatchDeleteBooks(BatchDeleteBooksRequest) returns (google.protobuf.Empty) {
    41    option (google.api.http) = {
    42      post: "/v1/{parent=publishers/*}/books:batchDelete"
    43      body: "*"
    44    };
    45  }
    46  ```
    47  
    48  ## Disabling
    49  
    50  If you need to violate this rule, use a leading comment above the method.
    51  Remember to also include an [aip.dev/not-precedent][] comment explaining why.
    52  
    53  ```proto
    54  // (-- api-linter: core::0235::plural-method-name=disabled
    55  //     aip.dev/not-precedent: We need to do this because reasons. --)
    56  rpc BatchDeleteBook(BatchDeleteBookRequest) returns (google.protobuf.Empty) {
    57    option (google.api.http) = {
    58      post: "/v1/{parent=publishers/*}/books:batchDelete"
    59      body: "*"
    60    };
    61  }
    62  ```
    63  
    64  If you need to violate this rule for an entire file, place the comment at the
    65  top of the file.
    66  
    67  [aip-235]: https://aip.dev/235
    68  [aip.dev/not-precedent]: https://aip.dev/not-precedent