feat: back GET /api/apis with the Drizzle apis table#355
Merged
greatest0fallt1me merged 2 commits intoMay 27, 2026
Merged
Conversation
|
@isaacCodes1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR replaces the hard-coded
GET /api/apisplaceholder with a real marketplace listing backed by the Drizzleapistable. The route now returns paginated public catalog results, defaults toactiveAPIs, validates?status=againstapiStatusEnum, and includes endpoint pricing where available so the marketplace can render actual registered APIs.Related Issue
Closes #302
Changes
⚙️ API Listing Endpoint
src/routes/apis.ts{ apis: [] }response with a real paginated listing route.statusquery validation againstapiStatusEnum.parsePagination(...)andpaginatedResponse(...).🗄️ Repository Read Path
src/repositories/apiRepository.tsapistable.🌐 App Wiring
src/app.ts/api/apisrouter with the injected repository so app-level tests and runtime use the same route path.🧪 Tests
[ADD]
src/routes/apis.test.tsAdded route coverage for default active filtering.
Added route coverage for valid
?status=filtering.Added route coverage for invalid
?status=returning400.Added route coverage for pagination metadata and endpoint pricing output.
[MODIFY]
src/repositories/apiRepository.test.tsAdded coverage for detailed public listings with endpoint pricing.
Added coverage for explicit status filtering and totals.
[MODIFY]
src/webhooks/webhook.integration.test.tsUpdated the
/api/apisexpectation to match the real paginated response shape.📘 Documentation and Types
[MODIFY]
src/types/index.tsUpdated the public API listing response types to reflect pagination and endpoint pricing.
[MODIFY]
README.mdRemoved the stale placeholder wording for
GET /api/apis.Verification Results
GET /api/apisreturns active APIs from the database with pagination metadata?status=filtering validates againstapiStatusEnumand rejects unknown values with400Screenshots
✅ Repository and route tests pass
A screenshot of:
npm test -- src/repositories/apiRepository.test.ts src/routes/apis.test.ts✅ App-level public route sanity check passes
A screenshot of: