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

     1  ---
     2  rule:
     3    aip: 165
     4    name: [core, '0165', http-body]
     5    summary: Purge methods should use `*` as the HTTP body.
     6  permalink: /165/http-body
     7  redirect_from:
     8    - /0165/http-body
     9  ---
    10  
    11  # Purge methods: HTTP body
    12  
    13  This rule enforces that all `Purge` RPCs use `*` as the HTTP `body`, as mandated in
    14  [AIP-165][].
    15  
    16  ## Details
    17  
    18  This rule looks at any message beginning with `Purge`, and complains
    19  if the HTTP `body` field is anything other than `*`.
    20  
    21  ## Examples
    22  
    23  **Incorrect** code for this rule:
    24  
    25  ```proto
    26  // Incorrect.
    27  rpc PurgeBooks(PurgeBooksRequest) returns (google.longrunning.Operation) {
    28    option (google.api.http) = {
    29      post: "/v1/{parent=publishers/*}/books:purge"
    30      // body: "*" should be set.
    31    };
    32    option (google.longrunning.operation_info) = {
    33      response_type: "PurgeBooksResponse"
    34      metadata_type: "PurgeBooksMetadata"
    35    };
    36  }
    37  ```
    38  
    39  **Correct** code for this rule:
    40  
    41  ```proto
    42  // Correct.
    43  rpc PurgeBooks(PurgeBooksRequest) returns (google.longrunning.Operation) {
    44    option (google.api.http) = {
    45      post: "/v1/{parent=publishers/*}/books:purge"
    46      body: "*"
    47    };
    48    option (google.longrunning.operation_info) = {
    49      response_type: "PurgeBooksResponse"
    50      metadata_type: "PurgeBooksMetadata"
    51    };
    52  }
    53  ```
    54  
    55  ## Disabling
    56  
    57  If you need to violate this rule, use a leading comment above the method.
    58  Remember to also include an [aip.dev/not-precedent][] comment explaining why.
    59  
    60  ```proto
    61  // (-- api-linter: core::0165::http-body=disabled
    62  //     aip.dev/not-precedent: We need to do this because reasons. --)
    63  rpc PurgeBooks(PurgeBooksRequest) returns (google.longrunning.Operation) {
    64    option (google.api.http) = {
    65      post: "/v1/{parent=publishers/*}/books:purge"
    66    };
    67    option (google.longrunning.operation_info) = {
    68      response_type: "PurgeBooksResponse"
    69      metadata_type: "PurgeBooksMetadata"
    70    };
    71  }
    72  ```
    73  
    74  If you need to violate this rule for an entire file, place the comment at the
    75  top of the file.
    76  
    77  [aip-165]: https://aip.dev/165
    78  [aip.dev/not-precedent]: https://aip.dev/not-precedent