github.com/googleapis/api-linter@v1.65.2/docs/rules/0140/prepositions.md (about)

     1  ---
     2  rule:
     3    aip: 140
     4    name: [core, '0140', prepositions]
     5    summary: Fields must not include prepositions in their names.
     6  permalink: /140/prepositions
     7  redirect_from:
     8    - /0140/prepositions
     9  ---
    10  
    11  # Field names: Prepositions
    12  
    13  This rule enforces that field names do not include most prepositions, as
    14  mandated in [AIP-140][].
    15  
    16  ## Details
    17  
    18  This rule looks at each field and complains if it sees any of the following
    19  words in the method's name:
    20  
    21  {% include prepositions.md %}
    22  
    23  **Note:** The standard fields `order_by` and `group_by` are permitted.
    24  
    25  ## Examples
    26  
    27  **Incorrect** code for this rule:
    28  
    29  ```proto
    30  // Incorrect.
    31  message Book {
    32    string name = 1;
    33    string written_by = 2;  // Should be `author`.
    34  }
    35  ```
    36  
    37  **Correct** code for this rule:
    38  
    39  ```proto
    40  // Correct.
    41  message Book {
    42    string name = 1;
    43    string author = 2;
    44  }
    45  ```
    46  
    47  ## Disabling
    48  
    49  If you need to violate this rule, use a leading comment above the field.
    50  Remember to also include an [aip.dev/not-precedent][] comment explaining why.
    51  
    52  ```proto
    53  // (-- api-linter: core::0140::prepositions=disabled
    54  //     aip.dev/not-precedent: We need to do this because reasons. --)
    55  message Book {
    56    string name = 1;
    57    string written_by = 2;
    58  }
    59  ```
    60  
    61  If you need to violate this rule for an entire file, place the comment at the
    62  top of the file.
    63  
    64  [aip-140]: https://aip.dev/140
    65  [aip.dev/not-precedent]: https://aip.dev/not-precedent