github.com/googleapis/api-linter@v1.65.2/docs/rules/0132/request-field-types.md (about)

     1  ---
     2  rule:
     3    aip: 132
     4    name: [core, '0132', request-field-types]
     5    summary: List RPCs should have fields with consistent types.
     6  permalink: /132/request-field-types
     7  redirect_from:
     8    - /0132/request-field-types
     9  ---
    10  
    11  # List methods: Unknown fields
    12  
    13  This rule enforces that all `List` standard methods use the correct type for
    14  any optional fields described in [AIP-132][].
    15  
    16  ## Details
    17  
    18  This rule looks at the fields in any message matching `List*Request` and
    19  complains if finds fields with the names below that do not have the correct
    20  type:
    21  
    22  - `string filter`
    23  - `string order_by`
    24  - `bool show_deleted`
    25  
    26  ## Examples
    27  
    28  **Incorrect** code for this rule:
    29  
    30  ```proto
    31  // Incorrect.
    32  message ListBooksRequest {
    33    string parent = 1;
    34    int32 page_size = 2;
    35    string page_token = 3;
    36    BookFilter filter = 4;  // Wrong type; should be a string.
    37  }
    38  ```
    39  
    40  **Correct** code for this rule:
    41  
    42  ```proto
    43  // Correct.
    44  message ListBooksRequest {
    45    string parent = 1;
    46    int32 page_size = 2;
    47    string page_token = 3;
    48    string filter = 4;
    49  }
    50  ```
    51  
    52  ## Disabling
    53  
    54  If you need to violate this rule, use a leading comment above the field.
    55  Remember to also include an [aip.dev/not-precedent][] comment explaining why.
    56  
    57  ```proto
    58  message ListBooksRequest {
    59    string parent = 1;
    60    int32 page_size = 2;
    61    string page_token = 3;
    62  
    63    // (-- api-linter: core::0132::request-field-types=disabled
    64    //     aip.dev/not-precedent: We really need this field because reasons. --)
    65    BookFilter filter = 4;
    66  }
    67  ```
    68  
    69  If you need to violate this rule for an entire file, place the comment at the
    70  top of the file.
    71  
    72  [aip-132]: https://aip.dev/132
    73  [aip.dev/not-precedent]: https://aip.dev/not-precedent