Conversation
Greptile SummaryThis release updates the Rust SDK to Appwrite API response format 2.0.0 and promotes crate version 0.14.0.
Confidence Score: 4/5The nullable credential-generation field must be fixed before merging because it makes valid dedicated-database responses fail to decode. The new model requires an integer for a field explicitly documented as null before credential rotation is initialized, and the shared transport directly deserializes that response into the model. Files Needing Attention: src/models/dedicated_database.rs Important Files Changed
Prompt To Fix All With AI### Issue 1
src/models/dedicated_database.rs:54-57
**Nullable generation breaks decoding**
When a dedicated database has not initialized credential rotation, `credentialGeneration` is null, but this required `i64` cannot represent null, causing otherwise successful dedicated-database responses to return deserialization errors.
```suggestion
/// Committed generation of the primary connection credentials. Null until the
/// rotation contract has been initialized.
#[serde(rename = "credentialGeneration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub credential_generation: Option<i64>,
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "chore: update Rust SDK to 0.14.0" | Re-trigger Greptile |
| /// Committed generation of the primary connection credentials. Null until the | ||
| /// rotation contract has been initialized. | ||
| #[serde(rename = "credentialGeneration")] | ||
| pub credential_generation: i64, |
There was a problem hiding this comment.
Nullable generation breaks decoding
When a dedicated database has not initialized credential rotation, credentialGeneration is null, but this required i64 cannot represent null, causing otherwise successful dedicated-database responses to return deserialization errors.
| /// Committed generation of the primary connection credentials. Null until the | |
| /// rotation contract has been initialized. | |
| #[serde(rename = "credentialGeneration")] | |
| pub credential_generation: i64, | |
| /// Committed generation of the primary connection credentials. Null until the | |
| /// rotation contract has been initialized. | |
| #[serde(rename = "credentialGeneration")] | |
| #[serde(skip_serializing_if = "Option::is_none")] | |
| pub credential_generation: Option<i64>, |
Knowledge Base Used: Resource models and serialization
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/models/dedicated_database.rs
Line: 54-57
Comment:
**Nullable generation breaks decoding**
When a dedicated database has not initialized credential rotation, `credentialGeneration` is null, but this required `i64` cannot represent null, causing otherwise successful dedicated-database responses to return deserialization errors.
```suggestion
/// Committed generation of the primary connection credentials. Null until the
/// rotation contract has been initialized.
#[serde(rename = "credentialGeneration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub credential_generation: Option<i64>,
```
**Knowledge Base Used:** [Resource models and serialization](https://app.greptile.com/appwrite/-/custom-context/knowledge-base/appwrite/sdk-for-rust/-/docs/resource-models.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
This PR contains updates to the SDK for version 0.14.0.
What's Changed
mysql,postgresql,mongo,documentsDB, andvectorsDBservices, previously released as release candidatestablesDB.cutoverMigrationis renamed totablesDB.createCutoverExecution.functionIdis replaced byresourceIdandresourceType, covering function and site executionsusageAggregateOnlyMetricson theBillingPlanmodeltransactionIdis accepted again bydocumentsDBandvectorsDBcreateDocumentandcreateDocumentsX-Appwrite-Response-Formatis now2.0.0FrameworkAdapter.fallbackFileis now optional