github.com/googleapis/api-linter@v1.65.2/docs/rules/0122/camel-case-uris.md (about)

     1  ---
     2  rule:
     3    aip: 122
     4    name: [core, '0122', camel-case-uris]
     5    summary: All resource names must use camel case in collection identifiers.
     6  permalink: /122/camel-case-uris
     7  redirect_from:
     8    - /0122/camel-case-uris
     9  ---
    10  
    11  # HTTP URI case
    12  
    13  This rule enforces that the HTTP URI pattern only uses camel case for word
    14  separation, as mandated in [AIP-122][].
    15  
    16  ## Details
    17  
    18  This rule scans all methods and ensures that the `_` character is not present
    19  in the URI.
    20  
    21  ## Examples
    22  
    23  **Incorrect** code for this rule:
    24  
    25  ```proto
    26  // Incorrect.
    27  rpc GetElectronicBook(GetElectronicBookRequest) returns (ElectronicBook) {
    28    option (google.api.http) = {
    29      // Should be "electronicBooks", not "electronic_books".
    30      get: "/v1/{name=publishers/*/electronic_books/*}"
    31    };
    32  }
    33  ```
    34  
    35  **Correct** code for this rule:
    36  
    37  ```proto
    38  // Correct.
    39  rpc GetElectronicBook(GetElectronicBookRequest) returns (ElectronicBook) {
    40    option (google.api.http) = {
    41      get: "/v1/{name=publishers/*/electronicBooks/*}"
    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::0122::camel-case-uris=disabled
    53  //     aip.dev/not-precedent: We need to do this because reasons. --)
    54  rpc GetElectronicBook(GetElectronicBookRequest) returns (ElectronicBook) {
    55    option (google.api.http) = {
    56      // Should be "electronicBooks", not "electronic_books".
    57      get: "/v1/{name=publishers/*/electronic_books/*}"
    58    };
    59  }
    60  ```
    61  
    62  If you need to violate this rule for an entire file, place the comment at the
    63  top of the file.
    64  
    65  [aip-122]: https://aip.dev/122
    66  [aip.dev/not-precedent]: https://aip.dev/not-precedent