Skip to content

Indexer /recent and per-wallet responses: add response schema + validation tests #349

Description

@Psalmuel01

The indexer API (`services/indexer/src/api.ts`) returns `{ claims, limit, page }` and per-wallet claim rows straight from SQL. There is an `api.test.ts`, but the response shape consumers depend on (field names, types — e.g. `verified_at`/`expiry` as numbers vs strings, `revoked` as 0/1 vs boolean) should be pinned by tests and documented, since the SDK/UI or third parties will code against it.

Scope

  • Define and document the response schema for each endpoint (`/recent`, per-wallet, health) — field names and types.
  • Add tests asserting the serialized shape (numbers are numbers, booleans normalized, no leaking of internal DB columns).
  • Normalize any DB-driver quirks (e.g. SQLite integer vs Postgres bigint-as-string) so the API contract is stable across the two DB backends.

Acceptance

  • Each endpoint has a documented, test-pinned response schema that is identical across the SQLite and Postgres backends.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbackendAPI routes, indexer, key management, server-side serviceseasyGood for newcomers, low complexity

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions