-
Notifications
You must be signed in to change notification settings - Fork 66
/
api-linter.yaml
66 lines (59 loc) · 5.79 KB
/
api-linter.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
- included_paths:
- "**/*.proto"
disabled_rules:
- "core::0122::name-suffix" # Allow fields to have a "_name" suffix -- https://linter.aip.dev/122/name-suffix
- "core::0140::uri" # We use "URL" instead of "URI" in many places. -- https://linter.aip.dev/140/uri
- "core::0192::has-comments" # Don't require comments on every field. -- https://linter.aip.dev/192/has-comments
- "core::0203::required" # We don't use resource annotations -- https://linter.aip.dev/203/required
- "core::0203::optional" # Same rationale as `core::0203::required` -- https://linter.aip.dev/203/optional
- included_paths:
- "**/message.proto"
disabled_rules:
- "core::0123::resource-annotation" # We don't require resource annotations on all messages -- https://linter.aip.dev/123/resource-annotation
- included_paths:
- "**/workflowservice/v1/request_response.proto"
- "**/operatorservice/v1/request_response.proto"
disabled_rules:
- "core::0131::request-name-behavior" # We don't add non-HTTP annotations -- https://linter.aip.dev/131/request-name-behavior
- "core::0131::request-name-reference" # We don't add non-HTTP annotations -- https://linter.aip.dev/131/request-name-reference
- "core::0131::request-name-required" # Don't require the `name` field in RPCs -- https://linter.aip.dev/131/request-name-required
- "core::0131::request-unknown-fields" # Allow things other than `name`, like `namespace`, in RPCs. This could've been `parent`, but that ship has sailed. -- https://linter.aip.dev/131/request-unknown-fields
- "core::0132::request-parent-required" # Don't require the `parent` field in List RPCs -- https://linter.aip.dev/132/request-parent-required
- "core::0132::request-unknown-fields" # Same rationale as `core::0131::request-unknown-fields`, but for List RPCs -- https://linter.aip.dev/132/request-unknown-fields
- "core::0132::response-unknown-fields" # We have a lot of List APIs which have more than just X's in the response. -- https://linter.aip.dev/132/response-unknown-fields
- "core::0133::request-parent-required" # Same rationale as `core::0132::request-parent-required`, but for Create RPCs -- https://linter.aip.dev/133/request-parent-required
- "core::0133::request-resource-behavior" # We don't add non-HTTP annotations -- https://linter.aip.dev/133/request-resource-behavior
- "core::0133::request-resource-field" # We don't add non-HTTP annotations -- https://linter.aip.dev/133/request-resource-field
- "core::0133::request-unknown-fields" # Same rationale as `core::0131::request-unknown-fields`, but for Create RPCs -- https://linter.aip.dev/133/request-unknown-fields
- "core::0134::request-mask-required" # We don't support an update mask in any of our APIs -- https://linter.aip.dev/134/request-mask-required
- "core::0134::request-resource-required" # We don't add non-HTTP annotations -- https://linter.aip.dev/134/request-resource-required
- "core::0134::request-unknown-fields" # Same rationale as `core::0131::request-unknown-fields`, but for Update RPCs -- https://linter.aip.dev/134/request-unknown-fields
- "core::0135::request-name-behavior" # We don't add non-HTTP annotations -- https://linter.aip.dev/135/request-name-behavior
- "core::0135::request-name-reference" # We don't add non-HTTP annotations -- https://linter.aip.dev/135/request-name-reference
- "core::0135::request-name-required" # Allow objects to be identified with something other than `name` -- https://linter.aip.dev/135/request-name-required
- "core::0135::request-unknown-fields" # Same rationale as `core::0131::request-unknown-fields`, but for Delete RPCs -- https://linter.aip.dev/135/request-unknown-fields
- "core::0158::request-page-size-field" # Allow "maximum_page_size" instead of "page_size" in requests, and allow non-paginated List RPCs -- https://linter.aip.dev/158/response-next-page-token-field
- "core::0158::request-page-token-field" # Allow "next_page_token" instead of "page_token" in requests, and allow non-paginated List RPCs -- https://linter.aip.dev/158/response-next-page-token-field
- "core::0158::response-next-page-token-field" # Allow for page tokens to be byte arrays instead of strings, and allow non-paginated List RPCs -- https://linter.aip.dev/158/response-next-page-token-field
- "core::0158::response-plural-first-field" # We have many APIs where we use "next_page_token" instead of "page_token" in the request. For some reason, that causes AIP to enforce some response-specific linter rules like this one. -- https://linter.aip.dev/158/response-plural-first-field
- "core::0158::response-repeated-first-field" # Same rationale as `core::0158::response-plural-first-field` -- https://linter.aip.dev/158/response-repeated-first-field
- included_paths:
- "**/workflowservice/v1/service.proto"
- "**/operatorservice/v1/service.proto"
disabled_rules:
- "core::0127::resource-name-extraction" # We extract specific fields in URL since the gRPC API predates the HTTP API -- https://linter.aip.dev/127/resource-name-extraction
# We do not require specific "Get", "Create", "Update", or "Delete" RPC
# rules just because we happen to use a known RPC name prefix
- "core::0131" # https://linter.aip.dev/0131
- "core::0133" # https://linter.aip.dev/0133
- "core::0134" # https://linter.aip.dev/0134
- "core::0135" # https://linter.aip.dev/0135
- "core::0136::http-uri-suffix" # We don't require HTTP calls to be suffixed with the same name as the gRPC name -- https://linter.aip.dev/136/http-uri-suffix
- included_paths:
- "**/operatorservice/v1/service.proto"
disabled_rules:
- "core::0127::http-annotation" # Do not require HTTP annotations on OperatorService calls at this time -- https://linter.aip.dev/127/http-annotation
- included_paths:
- "google/**/*.proto"
disabled_rules:
- "all"