Skip to content

Commit

Permalink
write serde(default) for scalar health parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
bragov4ik committed May 8, 2024
1 parent 9f7dffc commit 17f9ea4
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions da-indexer/da-indexer-proto/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ fn compile(
.bytes(["."])
.btree_map(["."])
.type_attribute(".", "#[actix_prost_macros::serde]")
.field_attribute(
".blockscout.daIndexer.v1.HealthCheckRequest.service",
"#[serde(default)]"
)
// .field_attribute(
// ".blockscout.daIndexer.v1.<MessageName>.<DefaultFieldName>",
// "#[serde(default)]"
Expand Down
4 changes: 4 additions & 0 deletions sig-provider/sig-provider-proto/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ fn compile(
.protoc_arg("grpc_api_configuration=proto/api_config_http.yaml,output_format=yaml,allow_merge=true,merge_file_name=sig-provider")
.bytes(["."])
.type_attribute(".", "#[actix_prost_macros::serde]")
.field_attribute(
".blockscout.sig_provider.v1.HealthCheckRequest.service",
"#[serde(default)]"
)
.message_attribute(".", "#[derive(Eq, Hash)]");
config.compile_protos(protos, includes)?;
Ok(())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ fn compile(
.bytes(["."])
.btree_map(["."])
.type_attribute(".", "#[actix_prost_macros::serde]")
.field_attribute(
".blockscout.smartContractVerifier.v2.HealthCheckRequest.service",
"#[serde(default)]"
)
.field_attribute(
".blockscout.smartContractVerifier.v2.VerifyVyperMultiPartRequest.interfaces",
"#[serde(default)]"
Expand Down
4 changes: 4 additions & 0 deletions stats/stats-proto/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ fn compile(
.protoc_arg("grpc_api_configuration=proto/api_config_http.yaml,output_format=yaml,allow_merge=true,merge_file_name=stats")
.bytes(["."])
.type_attribute(".", "#[actix_prost_macros::serde]")
.field_attribute(
".blockscout.stats.v1.HealthCheckRequest.service",
"#[serde(default)]"
)
.field_attribute(".blockscout.stats.v1.Point.is_approximate", "#[serde(skip_serializing_if = \"std::ops::Not::not\")]")
.field_attribute(".blockscout.stats.v1.Point.is_approximate", "#[serde(default)]");

Expand Down
4 changes: 4 additions & 0 deletions user-ops-indexer/user-ops-indexer-proto/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ fn compile(
.protoc_arg("grpc_api_configuration=proto/api_config_http.yaml,output_format=yaml,allow_merge=true,merge_file_name=user-ops-indexer,json_names_for_fields=false")
.bytes(["."])
.type_attribute(".", "#[actix_prost_macros::serde(rename_all=\"snake_case\")]")
.field_attribute(
".blockscout.userOpsIndexer.v1.HealthCheckRequest.service",
"#[serde(default)]"
)
.field_attribute(".blockscout.userOpsIndexer.v1.UserOp.raw", "#[serde(rename=\"raw\")]");

config.compile_protos(protos, includes)?;
Expand Down

0 comments on commit 17f9ea4

Please sign in to comment.