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

     1  ---
     2  rule:
     3    aip: 132
     4    name: [core, '0132', http-body]
     5    summary: List methods must not have an HTTP body.
     6  permalink: /132/http-body
     7  redirect_from:
     8    - /0132/http-body
     9  ---
    10  
    11  # List methods: No HTTP body
    12  
    13  This rule enforces that all `List` RPCs omit the HTTP `body`, as mandated in
    14  [AIP-132][].
    15  
    16  ## Details
    17  
    18  This rule looks at any message beginning with `List`, and complains if
    19  the HTTP `body` field is set.
    20  
    21  ## Examples
    22  
    23  **Incorrect** code for this rule:
    24  
    25  ```proto
    26  // Incorrect.
    27  rpc ListBooks(ListBooksRequest) returns (ListBooksResponse) {
    28    option (google.api.http) = {
    29      get: "/v1/{parent=publishers/*}/books"
    30      body: "*"  // This should be absent.
    31    };
    32  }
    33  ```
    34  
    35  **Correct** code for this rule:
    36  
    37  ```proto
    38  // Correct.
    39  rpc ListBooks(ListBooksRequest) returns (ListBooksResponse) {
    40    option (google.api.http) = {
    41      get: "/v1/{parent=publishers/*}/books"
    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::0132::http-body=disabled
    53  //     api-linter: core::0132::http-method=disabled
    54  //     aip.dev/not-precedent: We need to do this because reasons. --)
    55  rpc ListBooks(ListBooksRequest) returns (ListBooksResponse) {
    56    option (google.api.http) = {
    57      post: "/v1/{parent=publishers/*}/books"
    58      body: "*"
    59    };
    60  }
    61  ```
    62  
    63  **Important:** HTTP `GET` requests are unable to have an HTTP body, due to the
    64  nature of the protocol. The only valid way to include a body is to also use a
    65  different HTTP method (as depicted above).
    66  
    67  If you need to violate this rule for an entire file, place the comment at the
    68  top of the file.
    69  
    70  [aip-132]: https://aip.dev/132
    71  [aip.dev/not-precedent]: https://aip.dev/not-precedent