github.com/googleapis/api-linter@v1.65.2/docs/rules/0162/delete-revision-http-body.md (about)

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