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

     1  ---
     2  rule:
     3    aip: 140
     4    name: [core, '0140', uri]
     5    summary: Field names should prefer `uri` to `url`.
     6  permalink: /140/uri
     7  redirect_from:
     8    - /0140/uri
     9  ---
    10  
    11  # Field names: URIs
    12  
    13  This rule enforces that field names use `uri` rather than `url`, as mandated in
    14  [AIP-140][].
    15  
    16  ## Details
    17  
    18  This rule checks every field in the proto and complains if the field name
    19  includes `url`. (It splits on `_` to avoid false positives.)
    20  
    21  ## Examples
    22  
    23  **Incorrect** code for this rule:
    24  
    25  ```proto
    26  // Incorrect.
    27  message Book {
    28    string url = 1;  // Should be `uri`.
    29  }
    30  ```
    31  
    32  **Correct** code for this rule:
    33  
    34  ```proto
    35  // Correct.
    36  message Book {
    37    string uri = 1;
    38  }
    39  ```
    40  
    41  ## Disabling
    42  
    43  If you need to violate this rule, use a leading comment above the method.
    44  Remember to also include an [aip.dev/not-precedent][] comment explaining why.
    45  
    46  ```proto
    47  // (-- api-linter: core::0140::uri=disabled
    48  //     aip.dev/not-precedent: We need to do this because reasons. --)
    49  message Book {
    50    string url = 1;
    51  }
    52  ```
    53  
    54  If you need to violate this rule for an entire file, place the comment at the
    55  top of the file.
    56  
    57  [aip-140]: https://aip.dev/140
    58  [aip.dev/not-precedent]: https://aip.dev/not-precedent