Repository navigation
fix(apis): honour requested status when publishing developer APIs - #1460
Closed
lienhoatienphung-svg wants to merge 1 commit into
Closed
lienhoatienphung-svg wants to merge 1 commit into
lienhoatienphung-svg wants to merge 1 commit into
Conversation
lienhoatienphung-svg
force-pushed
the
fix/1219-honour-requested-api-status
branch
from
October 16, 2026 12:09
457869d to
1a658b0
Compare
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.
Closes #1219
Summary
Updates the developer API registration validator (
src/validators/apis.ts), registration handler (src/routes/apis.ts), and public catalog filter (src/app.ts) so callers can publish APIs withstatus: 'active' | 'draft' | 'deprecated'(defaulting to'draft'when omitted), persists the requested status, and excludesdraftAPIs from the publicGET /api/apiscatalog while keeping them visible to the owning developer underGET /api/developers/apis.Acceptance Criteria Mapping
POST /api/developers/apiswithstatus: 'active'returns201withstatus: 'active': Validated inregisterApiSchemaand persisted viaoptions.apiRepository.create.statusdefaults to'draft':registerApiSchemadefaultsstatusto'draft'.statusvalues return400with a field-level validation error onstatus:z.enum(API_STATUSES)produces astatusvalidation error.GET /api/apisexcludesdraftAPIs;GET /api/developers/apisincludes the caller's drafts: Verified insrc/apis.registration.test.ts.Validation
npx jest src/validators/apiRegistration.test.ts src/apis.registration.test.ts --no-cache(all 13 tests pass).Payout Wallet (Base Mainnet USDC / EVM):
0x3806cd592a508d1992Ed007C2F53de251C2E7452