Skip to content

Add provider catalog sorting for stable API responses #35

Description

@emrekayat

Goal

Make the provider catalog deterministic so demos, tests, and clients receive stable ordering across runs.

Scope

  • Sort providers in the public catalog response by category, then price, then provider id.
  • Keep provider payload shape unchanged.
  • Keep disabled-provider filtering behavior unchanged.
  • Add or update a focused public route/provider test.

Acceptance criteria

  • GET /api/providers returns providers in deterministic category/price/id order.
  • Existing provider fields are unchanged.
  • The test covers at least one tie-breaker by provider id or price.
  • npm test --workspace @query402/api -- src/routes/public.test.ts src/providers/registry.test.ts passes.
  • npm run typecheck --workspace @query402/api passes.

Notes

This is intended to be a small sorting-only change, not a provider model redesign.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssue proposed for the Drips Stellar Wave programarea: apiAPI servicecomplexity: highExpected high implementation complexitydrips-candidateCandidate for a Drips Stellar WaveenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions