Skip to content

Commit

Permalink
Fix api-linter errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
SanjayVas committed Jun 5, 2023
1 parent e5645d8 commit ea853e8
Show file tree
Hide file tree
Showing 45 changed files with 903 additions and 355 deletions.
21 changes: 21 additions & 0 deletions src/main/proto/api-linter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2022 The Cross-Media Measurement Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

- included_paths:
- 'wfa/measurement/api/v2alpha/**/*.proto'
disabled_rules:
- 'core::0191::java-package'
- 'core::0127::http-annotation'
- 'core::0133::http-uri-parent'
- 'core::0146::any'
57 changes: 52 additions & 5 deletions src/main/proto/wfa/measurement/api/v2alpha/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ proto_library(
srcs = ["certificate.proto"],
strip_import_prefix = IMPORT_PREFIX,
deps = [
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)
Expand All @@ -33,6 +34,7 @@ proto_library(
strip_import_prefix = IMPORT_PREFIX,
deps = [
":crypto_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)
Expand All @@ -43,6 +45,7 @@ proto_library(
strip_import_prefix = IMPORT_PREFIX,
deps = [
"//src/main/proto/wfa/measurement/api/v2alpha:time_interval_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)
Expand All @@ -55,6 +58,7 @@ proto_library(
":crypto_proto",
":measurement_proto",
":protocol_config_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)
Expand All @@ -73,6 +77,7 @@ proto_library(
srcs = ["api_key.proto"],
strip_import_prefix = IMPORT_PREFIX,
deps = [
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)
Expand All @@ -83,6 +88,7 @@ proto_library(
strip_import_prefix = IMPORT_PREFIX,
deps = [
":crypto_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)
Expand All @@ -94,6 +100,7 @@ proto_library(
deps = [
":crypto_proto",
":measurement_consumer_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)
Expand Down Expand Up @@ -141,6 +148,7 @@ proto_library(
strip_import_prefix = IMPORT_PREFIX,
deps = [
":differential_privacy_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
],
)

Expand All @@ -150,7 +158,7 @@ proto_library(
strip_import_prefix = IMPORT_PREFIX,
deps = [
":differential_privacy_proto",
"@com_google_googleapis//google/api:resource_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
],
)

Expand All @@ -161,6 +169,7 @@ proto_library(
deps = [
":crypto_proto",
":protocol_config_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
"@com_google_protobuf//:duration_proto",
],
Expand All @@ -171,6 +180,7 @@ proto_library(
srcs = ["duchy.proto"],
strip_import_prefix = IMPORT_PREFIX,
deps = [
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)
Expand Down Expand Up @@ -212,6 +222,7 @@ proto_library(
strip_import_prefix = IMPORT_PREFIX,
deps = [
":model_suite_proto",
"@com_google_googleapis//google/api:client_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
Expand All @@ -234,6 +245,7 @@ proto_library(
strip_import_prefix = IMPORT_PREFIX,
deps = [
":model_line_proto",
"@com_google_googleapis//google/api:client_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
"@com_google_protobuf//:timestamp_proto",
Expand All @@ -259,6 +271,7 @@ proto_library(
deps = [
":model_rollout_proto",
"//src/main/proto/wfa/measurement/api/v2alpha:time_interval_proto",
"@com_google_googleapis//google/api:client_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
"@com_google_protobuf//:empty_proto",
Expand All @@ -283,6 +296,7 @@ proto_library(
strip_import_prefix = IMPORT_PREFIX,
deps = [
":model_release_proto",
"@com_google_googleapis//google/api:client_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
Expand All @@ -293,10 +307,8 @@ proto_library(
srcs = ["model_shard.proto"],
strip_import_prefix = IMPORT_PREFIX,
deps = [
"//src/main/proto/wfa/measurement/api/v2alpha:time_interval_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
"@com_google_protobuf//:any_proto",
"@com_google_protobuf//:timestamp_proto",
],
)
Expand All @@ -307,7 +319,7 @@ proto_library(
strip_import_prefix = IMPORT_PREFIX,
deps = [
":model_shard_proto",
"//src/main/proto/wfa/measurement/api/v2alpha:time_interval_proto",
"@com_google_googleapis//google/api:client_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
"@com_google_protobuf//:empty_proto",
Expand All @@ -333,6 +345,7 @@ proto_library(
deps = [
":model_outage_proto",
"//src/main/proto/wfa/measurement/api/v2alpha:time_interval_proto",
"@com_google_googleapis//google/api:client_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
Expand All @@ -344,6 +357,7 @@ proto_library(
strip_import_prefix = IMPORT_PREFIX,
deps = [
":exchange_workflow_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
"@com_google_googleapis//google/type:date_proto",
],
Expand All @@ -354,6 +368,7 @@ proto_library(
srcs = ["exchange.proto"],
strip_import_prefix = IMPORT_PREFIX,
deps = [
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
"@com_google_googleapis//google/type:date_proto",
],
Expand All @@ -364,6 +379,7 @@ proto_library(
srcs = ["exchange_step.proto"],
strip_import_prefix = IMPORT_PREFIX,
deps = [
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
"@com_google_googleapis//google/type:date_proto",
],
Expand All @@ -374,6 +390,7 @@ proto_library(
srcs = ["exchange_step_attempt.proto"],
strip_import_prefix = IMPORT_PREFIX,
deps = [
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
"@com_google_protobuf//:timestamp_proto",
],
Expand All @@ -386,21 +403,29 @@ proto_library(
srcs = ["certificates_service.proto"],
deps = [
":certificate_proto",
"@com_google_googleapis//google/api:client_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)

proto_library(
name = "public_keys_service_proto",
srcs = ["public_keys_service.proto"],
deps = [":public_key_proto"],
deps = [
":public_key_proto",
"@com_google_googleapis//google/api:client_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
],
)

proto_library(
name = "accounts_service_proto",
srcs = ["accounts_service.proto"],
deps = [
":account_proto",
"@com_google_googleapis//google/api:client_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)
Expand All @@ -410,6 +435,8 @@ proto_library(
srcs = ["api_keys_service.proto"],
deps = [
":api_key_proto",
"@com_google_googleapis//google/api:client_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)
Expand All @@ -421,6 +448,7 @@ proto_library(
deps = [
":measurement_proto",
":requisition_proto",
"@com_google_googleapis//google/api:client_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)
Expand All @@ -431,6 +459,8 @@ proto_library(
strip_import_prefix = IMPORT_PREFIX,
deps = [
":requisition_proto",
"@com_google_googleapis//google/api:client_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)
Expand All @@ -441,6 +471,8 @@ proto_library(
strip_import_prefix = IMPORT_PREFIX,
deps = [
":measurement_consumer_proto",
"@com_google_googleapis//google/api:client_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)
Expand All @@ -451,6 +483,8 @@ proto_library(
strip_import_prefix = IMPORT_PREFIX,
deps = [
":measurement_proto",
"@com_google_googleapis//google/api:client_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)
Expand All @@ -461,6 +495,8 @@ proto_library(
strip_import_prefix = IMPORT_PREFIX,
deps = [
":data_provider_proto",
"@com_google_googleapis//google/api:client_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)
Expand All @@ -471,6 +507,8 @@ proto_library(
strip_import_prefix = IMPORT_PREFIX,
deps = [
":model_provider_proto",
"@com_google_googleapis//google/api:client_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)
Expand All @@ -481,6 +519,7 @@ proto_library(
strip_import_prefix = IMPORT_PREFIX,
deps = [
":event_group_proto",
"@com_google_googleapis//google/api:client_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
Expand All @@ -492,6 +531,8 @@ proto_library(
strip_import_prefix = IMPORT_PREFIX,
deps = [
":event_group_metadata_descriptor_proto",
"@com_google_googleapis//google/api:client_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)
Expand All @@ -501,6 +542,8 @@ proto_library(
srcs = ["exchanges_service.proto"],
deps = [
":exchange_proto",
"@com_google_googleapis//google/api:client_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)
Expand All @@ -510,6 +553,8 @@ proto_library(
srcs = ["exchange_steps_service.proto"],
deps = [
":exchange_step_proto",
"@com_google_googleapis//google/api:client_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
"@com_google_googleapis//google/type:date_proto",
],
Expand All @@ -520,6 +565,8 @@ proto_library(
srcs = ["exchange_step_attempts_service.proto"],
deps = [
":exchange_step_attempt_proto",
"@com_google_googleapis//google/api:client_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)
Expand Down
1 change: 1 addition & 0 deletions src/main/proto/wfa/measurement/api/v2alpha/account.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ message Account {
option (google.api.resource) = {
type: "halo.wfanet.org/Account"
pattern: "accounts/{account}"
plural: "accounts"
};

enum View {
Expand Down
Loading

0 comments on commit ea853e8

Please sign in to comment.