Skip to content

api(consistency): finish harmonized handler surface across remaining domains #65

@joshrotenberg

Description

@joshrotenberg

Summary

The crate has started an ergonomics pass, but the public handler surface is still uneven. flexible::databases now has builders, pagination helpers, and simplified list/get/create/update/delete methods, while other domains still expose older verbose names, mixed return types, or raw serde_json::Value responses.

Why this matters

  • users have to learn different naming schemes for equivalent operations
  • docs/examples are harder to keep coherent
  • Python parity work gets harder when the Rust surface is not internally consistent
  • new endpoint additions are more likely to copy older patterns instead of the newer façade style

Examples of the inconsistency

Newer simplified style already exists

  • src/flexible/databases.rs:2073
  • src/flexible/databases.rs:2105
  • src/flexible/databases.rs:2141
  • src/flexible/databases.rs:2180
  • src/flexible/databases.rs:2215
  • src/fixed/subscriptions.rs:476
  • src/fixed/databases.rs:803

Older or uneven surfaces still remain

  • src/account.rs:449
  • src/users.rs:193
  • src/acl.rs:436
  • src/cloud_accounts.rs:258
  • src/tasks.rs:131
  • src/connectivity/mod.rs:74
  • src/connectivity/private_link.rs:277
  • src/connectivity/psc.rs:177
  • src/transit_gateway.rs equivalent methods in src/connectivity/transit_gateway.rs
  • src/flexible/subscriptions.rs:906 and related methods still use older names without a fully harmonized alias layer

Suggested direction

  • finish the harmonization plan across remaining handlers
  • add simplified alias methods where there is a clear CRUD/list/get shape
  • prefer typed return values over raw Value when the response is known
  • keep existing method names as compatibility shims where needed, but make the simplified façade the documented/default API

Acceptance criteria

  • each handler has a coherent public surface with consistent naming for equivalent operations
  • CRUD-like handlers expose list/get/create/update/delete or an explicitly documented alternative
  • raw Value return types are reduced to cases where the payload is genuinely dynamic
  • README and rustdoc examples prefer the harmonized façade

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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