Skip to content

fix(apis): honour requested status when publishing developer APIs - #1460

Closed
lienhoatienphung-svg wants to merge 1 commit into
CalloraOrg:mainfrom
lienhoatienphung-svg:fix/1219-honour-requested-api-status
Closed

lienhoatienphung-svg wants to merge 1 commit into
CalloraOrg:mainfrom
lienhoatienphung-svg:fix/1219-honour-requested-api-status

Conversation

@lienhoatienphung-svg

@lienhoatienphung-svg lienhoatienphung-svg commented Oct 16, 2026 •

Copy link
Copy Markdown

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 with status: 'active' | 'draft' | 'deprecated' (defaulting to 'draft' when omitted), persists the requested status, and excludes draft APIs from the public GET /api/apis catalog while keeping them visible to the owning developer under GET /api/developers/apis.

Acceptance Criteria Mapping

  • POST /api/developers/apis with status: 'active' returns 201 with status: 'active': Validated in registerApiSchema and persisted via options.apiRepository.create.
  • Omitting status defaults to 'draft': registerApiSchema defaults status to 'draft'.
  • Invalid status values return 400 with a field-level validation error on status: z.enum(API_STATUSES) produces a status validation error.
  • Public GET /api/apis excludes draft APIs; GET /api/developers/apis includes the caller's drafts: Verified in src/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

@lienhoatienphung-svg
lienhoatienphung-svg force-pushed the fix/1219-honour-requested-api-status branch from 457869d to 1a658b0 Compare October 16, 2026 12:09
@lienhoatienphung-svg lienhoatienphung-svg changed the title fix(apis): honour requested status when publishing developer APIs (#1219) fix(apis): honour requested status when publishing developer APIs Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Honour requested status when publishing developer APIs

2 participants