Skip to content

Review API versioning/deprecation for new v1 analytics endpoints #40

Description

@christabel888

Context: This repo already has api_v1_middleware.rs and api_deprecation_middleware.rs -- before adding ~15 new endpoints under /api/v1/... in this batch, worth confirming they actually route through that existing versioning/deprecation machinery instead of being wired up ad hoc.

Where:

  • src/api_v1_middleware.rs, src/api_deprecation_middleware.rs

What to do:

Suggested approach:

  1. This is an audit, not new code -- go through every endpoint added in this batch (Add /api/v1/stats/summary endpoint: DAA, tx count 24h, payment volume 24h, active soroban contracts #1, Add /api/v1/assets/{code}/insights endpoint #11-Add governance insights endpoint: proposal momentum, voter turnout #14, Add /api/v1/network/daily-active-accounts time-series endpoint #15-Add /api/v1/network/fee-trends endpoint #19, Add /api/v1/soroban/active-contracts endpoint #21-Add /api/v1/soroban/top-contracts and /new-deployments endpoints #24, Add /api/v1/wallets/{address}/portfolio endpoint #25-Add /api/v1/wallets/{address}/largest-transfers endpoint #29, Add /api/v1/rankings/top-movers endpoint: 24h percent change by holders/volume #33, Add /api/v1/rankings/assets endpoint: top assets by holders and volume #39) and confirm each is registered through api_v1_middleware.rs/api_deprecation_middleware.rs the same way pre-existing v1 routes are.
  2. Where you find an inconsistency, fix the registration rather than special-casing the middleware to accommodate it.

Watch out for:

  • This issue's value is in catching endpoints that got wired up ad hoc during a busy pivot -- don't rubber-stamp it, actually trace each route's registration code.

Definition of done:

  • All new endpoints confirmed to go through the same versioning/deprecation middleware as existing v1 routes, or a documented reason why not

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions