From 5828aea6c24776fb544f9174a89ed7453f075ce3 Mon Sep 17 00:00:00 2001 From: Josh Rotenberg Date: Tue, 19 May 2026 11:29:28 -0700 Subject: [PATCH] docs(small modules): document the remaining undocumented fields in 6 short modules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds field-level docstrings to all 31 of the missing-docs errors concentrated in the smaller modules: - src/account.rs (12): the AccountSystemLogEntry log-event fields (id/time/originator/api_key_name/resource/r#type/description), ModulesData.modules, Regions.regions, PaymentMethods.account_id, AccountSystemLogEntries.entries, AccountSessionLogEntries.entries. - src/acl.rs (9): the 6 read-only command_type fields (one blanket doc applied via replace_all since the field has the same meaning across every request struct), plus user_id/redis_rule_id/role_id on the AclUserUpdateRequest, AclRedisRuleUpdateRequest, and the role update request — all 'server-populated from path' fields. - src/cloud_accounts.rs (3): cloud_account_id on the update request, plus the two command_type fields on create/update request bodies. - src/connectivity/psc.rs (3): PscEndpointUpdateRequest's three path-mirrored IDs (subscription_id, psc_service_id, endpoint_id). - src/connectivity/transit_gateway.rs (2): Cidr.cidr_address and TgwUpdateCidrsRequest.command_type. - src/connectivity/vpc_peering.rs (2): VpcPeeringUpdateAwsRequest's subscription_id and command_type. Strict-lint missing-docs error count drops from 368 to 337 on main. The remaining ~270 errors are concentrated in the four large request/response modules (fixed/databases, fixed/subscriptions, flexible/databases, flexible/subscriptions) plus users.rs. Those ship as separate per-module PRs. Refs #80 (rustdoc umbrella — P0 missing-docs slice for small modules) --- src/account.rs | 12 ++++++++++++ src/acl.rs | 15 +++++++++++++++ src/cloud_accounts.rs | 5 +++++ src/connectivity/psc.rs | 4 ++++ src/connectivity/transit_gateway.rs | 3 +++ src/connectivity/vpc_peering.rs | 3 +++ 6 files changed, 42 insertions(+) diff --git a/src/account.rs b/src/account.rs index bc9fd0c..31cabeb 100644 --- a/src/account.rs +++ b/src/account.rs @@ -54,6 +54,7 @@ use serde::{Deserialize, Serialize}; /// Database modules/capabilities response #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ModulesData { + /// Database modules supported on this account. #[serde(skip_serializing_if = "Option::is_none")] pub modules: Option>, @@ -158,18 +159,23 @@ pub struct AccountApiKeyOwner { #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct AccountSystemLogEntry { + /// Unique log entry ID. #[serde(skip_serializing_if = "Option::is_none")] pub id: Option, + /// Timestamp the event was recorded (ISO-8601). #[serde(skip_serializing_if = "Option::is_none")] pub time: Option, + /// Originator of the event (user, system, etc.). #[serde(skip_serializing_if = "Option::is_none")] pub originator: Option, + /// Name of the API key that initiated the action, if any. #[serde(skip_serializing_if = "Option::is_none")] pub api_key_name: Option, + /// Resource category the event applies to (e.g. `"database"`). #[serde(skip_serializing_if = "Option::is_none")] pub resource: Option, @@ -177,9 +183,11 @@ pub struct AccountSystemLogEntry { #[serde(skip_serializing_if = "Option::is_none")] pub resource_id: Option, + /// Event type (e.g. `"info"`, `"warning"`, `"error"`). #[serde(skip_serializing_if = "Option::is_none")] pub r#type: Option, + /// Human-readable description of the event. #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, } @@ -187,6 +195,7 @@ pub struct AccountSystemLogEntry { /// Available regions response #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Regions { + /// Regions available on the account. #[serde(skip_serializing_if = "Option::is_none")] pub regions: Option>, @@ -215,6 +224,7 @@ pub struct Region { #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PaymentMethods { + /// Account ID the payment methods belong to. #[serde(skip_serializing_if = "Option::is_none")] pub account_id: Option, @@ -313,6 +323,7 @@ pub struct ModuleParameter { /// Account system log entries response #[derive(Debug, Clone, Serialize, Deserialize)] pub struct AccountSystemLogEntries { + /// System log entries returned by the server. #[serde(skip_serializing_if = "Option::is_none")] pub entries: Option>, @@ -399,6 +410,7 @@ pub struct DataPersistenceOptions { /// Account session log entries response #[derive(Debug, Clone, Serialize, Deserialize)] pub struct AccountSessionLogEntries { + /// Session log entries returned by the server. #[serde(skip_serializing_if = "Option::is_none")] pub entries: Option>, diff --git a/src/acl.rs b/src/acl.rs index c9b81e5..8f8d8b6 100644 --- a/src/acl.rs +++ b/src/acl.rs @@ -58,6 +58,8 @@ pub struct AclRoleCreateRequest { /// A list of Redis ACL rules to assign to this database access role. pub redis_rules: Vec, + /// Read-only on the response; populated by the server with the + /// operation type. #[serde(skip_serializing_if = "Option::is_none")] pub command_type: Option, } @@ -66,6 +68,7 @@ pub struct AclRoleCreateRequest { #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct AclUserUpdateRequest { + /// ACL user ID being updated. Server-populated from the path. #[serde(skip_serializing_if = "Option::is_none")] pub user_id: Option, @@ -77,6 +80,8 @@ pub struct AclUserUpdateRequest { #[serde(skip_serializing_if = "Option::is_none")] pub password: Option, + /// Read-only on the response; populated by the server with the + /// operation type. #[serde(skip_serializing_if = "Option::is_none")] pub command_type: Option, } @@ -154,6 +159,8 @@ pub struct AclRedisRuleCreateRequest { /// Redis ACL rule pattern. See [ACL syntax](https://redis.io/docs/latest/operate/rc/security/access-control/data-access-control/configure-acls/#define-permissions-with-acl-syntax) to learn how to define rules. pub redis_rule: String, + /// Read-only on the response; populated by the server with the + /// operation type. #[serde(skip_serializing_if = "Option::is_none")] pub command_type: Option, } @@ -262,6 +269,7 @@ pub struct ACLRoleDatabase { #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct AclRedisRuleUpdateRequest { + /// Redis ACL rule ID being updated. Server-populated from the path. #[serde(skip_serializing_if = "Option::is_none")] pub redis_rule_id: Option, @@ -271,6 +279,8 @@ pub struct AclRedisRuleUpdateRequest { /// Optional. Changes the Redis ACL rule pattern. See [ACL syntax](https://redis.io/docs/latest/operate/rc/security/access-control/data-access-control/configure-acls/#define-permissions-with-acl-syntax) to learn how to define rules. pub redis_rule: String, + /// Read-only on the response; populated by the server with the + /// operation type. #[serde(skip_serializing_if = "Option::is_none")] pub command_type: Option, } @@ -303,6 +313,8 @@ pub struct AclUserCreateRequest { /// The database password for this user. pub password: String, + /// Read-only on the response; populated by the server with the + /// operation type. #[serde(skip_serializing_if = "Option::is_none")] pub command_type: Option, } @@ -343,9 +355,12 @@ pub struct AclRoleUpdateRequest { #[serde(skip_serializing_if = "Option::is_none")] pub redis_rules: Option>, + /// ACL role ID being updated. Server-populated from the path. #[serde(skip_serializing_if = "Option::is_none")] pub role_id: Option, + /// Read-only on the response; populated by the server with the + /// operation type. #[serde(skip_serializing_if = "Option::is_none")] pub command_type: Option, } diff --git a/src/cloud_accounts.rs b/src/cloud_accounts.rs index a127fbf..ceb0310 100644 --- a/src/cloud_accounts.rs +++ b/src/cloud_accounts.rs @@ -69,6 +69,7 @@ pub struct CloudAccountUpdateRequest { #[serde(skip_serializing_if = "Option::is_none")] pub name: Option, + /// Cloud account ID being updated. Server-populated from the path. #[serde(skip_serializing_if = "Option::is_none")] pub cloud_account_id: Option, @@ -88,6 +89,8 @@ pub struct CloudAccountUpdateRequest { #[serde(skip_serializing_if = "Option::is_none")] pub sign_in_login_url: Option, + /// Read-only on the response; populated by the server with the + /// operation type (e.g. `"UPDATE_CLOUD_ACCOUNT"`). #[serde(skip_serializing_if = "Option::is_none")] pub command_type: Option, } @@ -171,6 +174,8 @@ pub struct CloudAccountCreateRequest { /// Cloud provider management console login URL. pub sign_in_login_url: String, + /// Read-only on the response; populated by the server with the + /// operation type (e.g. `"CREATE_CLOUD_ACCOUNT"`). #[serde(skip_serializing_if = "Option::is_none")] pub command_type: Option, } diff --git a/src/connectivity/psc.rs b/src/connectivity/psc.rs index b08f7b5..76083e1 100644 --- a/src/connectivity/psc.rs +++ b/src/connectivity/psc.rs @@ -10,8 +10,12 @@ use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PscEndpointUpdateRequest { + /// Subscription that owns the PSC service. Server-populated; clients + /// pass the value via the path parameter and may leave the default. pub subscription_id: i32, + /// PSC service ID under the subscription. Server-populated. pub psc_service_id: i32, + /// PSC endpoint ID being updated. Server-populated. pub endpoint_id: i32, /// Google Cloud project ID diff --git a/src/connectivity/transit_gateway.rs b/src/connectivity/transit_gateway.rs index 358b1af..9ac2075 100644 --- a/src/connectivity/transit_gateway.rs +++ b/src/connectivity/transit_gateway.rs @@ -10,6 +10,7 @@ use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Cidr { + /// CIDR notation address (e.g. `"10.0.0.0/16"`). #[serde(skip_serializing_if = "Option::is_none")] pub cidr_address: Option, } @@ -22,6 +23,8 @@ pub struct TgwUpdateCidrsRequest { #[serde(skip_serializing_if = "Option::is_none")] pub cidrs: Option>, + /// Read-only on the response; populated by the server with the + /// operation type (e.g. `"UPDATE_TGW_CIDRS"`). #[serde(skip_serializing_if = "Option::is_none")] pub command_type: Option, } diff --git a/src/connectivity/vpc_peering.rs b/src/connectivity/vpc_peering.rs index b1e6134..dcf2ea1 100644 --- a/src/connectivity/vpc_peering.rs +++ b/src/connectivity/vpc_peering.rs @@ -104,6 +104,7 @@ pub type VpcPeeringCreateBaseRequest = VpcPeeringCreateRequest; #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct VpcPeeringUpdateAwsRequest { + /// Subscription that owns the peering. Server-populated from the path. #[serde(skip_serializing_if = "Option::is_none")] pub subscription_id: Option, @@ -119,6 +120,8 @@ pub struct VpcPeeringUpdateAwsRequest { #[serde(skip_serializing_if = "Option::is_none")] pub vpc_cidrs: Option>, + /// Read-only on the response; populated by the server with the + /// operation type (e.g. `"UPDATE_VPC_PEERING"`). #[serde(skip_serializing_if = "Option::is_none")] pub command_type: Option, }