Skip to content

fix(flexible/databases): Database.activated should be activatedOn (silent data drop) #76

@joshrotenberg

Description

@joshrotenberg

Summary

Database.activated is named incorrectly. With #[serde(rename_all = "camelCase")] it serializes as activated, but the API returns activatedOn. The field silently deserializes to None on every response.

Expected behavior

The activation timestamp from the Cloud API is preserved on the typed Database model.

Actual behavior

  • src/flexible/databases.rs:928: pub activated: Option<String> → wire key activated
  • API actually returns activatedOn (a format: date-time string)
  • Result: silently dropped on every list/get response.

Impact

Any caller using database.activated for ordering, filtering, age computation, or display sees None for every database. No error is surfaced.

Relevant code

Suggested fix

Either rename the field or add a serde rename:

```rust
#[serde(rename = "activatedOn")]
pub activated_on: Option,
```

Consider whether to use chrono::DateTime<Utc> or time::OffsetDateTime here for type-safe handling of format: date-time. If keeping String for now, document it in the field doc.

Acceptance criteria

  • Field name and serde wire-key match activatedOn
  • Mock test asserts the field is populated when the response includes activatedOn
  • Migration note in CHANGELOG (renamed public field)

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions