Skip to content

fix(fixed/databases): list() returns broken AccountFixedSubscriptionDatabases (missing 'subscription') #73

@joshrotenberg

Description

@joshrotenberg

Summary

FixedDatabaseHandler::list_subscription_databases() (and the harmonized list() alias) returns AccountFixedSubscriptionDatabases, which is missing the subscription field. The wrapper deserializes successfully but contains no databases — the call is effectively broken.

Expected behavior

Should mirror the Pro side. AccountSubscriptionDatabases (src/flexible/databases.rs:72-85) wraps a subscription: Vec<SubscriptionDatabasesInfo> containing the actual databases. Fixed should follow the same shape.

Actual behavior

AccountFixedSubscriptionDatabases (src/fixed/databases.rs:62-69) only declares accountId and links; the subscription array is missing entirely. Real Cloud responses include it (see #40 for the spec-vs-actual delta tracking).

Impact

Listing databases under a Fixed/Essentials subscription returns an empty result set. Any caller relying on the typed handler for fixed-plan database enumeration is silently broken.

Relevant code

  • src/fixed/databases.rs:62-69AccountFixedSubscriptionDatabases struct
  • src/fixed/databases.rslist_subscription_databases and list (harmonized alias)
  • For comparison: src/flexible/databases.rs:72-85 — Pro side, correct shape

Suggested fix

Add the missing nesting:

```rust
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct AccountFixedSubscriptionDatabases {
pub account_id: i32,
pub subscription: Vec,
pub links: Vec,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct FixedSubscriptionDatabasesInfo {
pub subscription_id: i32,
pub databases: Vec,
pub links: Vec,
}
```

The list() alias should then unwrap to Vec<FixedDatabase> like the Pro side does.

Acceptance criteria

  • AccountFixedSubscriptionDatabases includes the subscription field
  • FixedDatabaseHandler::list() returns a non-empty Vec<FixedDatabase> when the subscription has databases
  • Mock test covering the realistic response shape with at least one subscription containing one database
  • Existing tests continue to pass

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions