Skip to content

Add Zod validation for webhooks API - #971

Merged
greatest0fallt1me merged 1 commit into
CalloraOrg:mainfrom
Eldren-cmd:grantfox-webhooks-validation
Jul 28, 2026
Merged

Add Zod validation for webhooks API#971
greatest0fallt1me merged 1 commit into
CalloraOrg:mainfrom
Eldren-cmd:grantfox-webhooks-validation

Conversation

@Eldren-cmd

Copy link
Copy Markdown

Closes #952

Summary

  • Adds strict Zod schemas for /api/webhooks registration, params, retry-policy updates, and signed delivery payloads.
  • Adds src/routes/webhooks.ts as the route-facing wrapper for the webhook router.
  • Applies boundary validation to webhook management routes with standardized structured 400 envelopes.
  • Adds structured webhook registration/deletion logging and correlation IDs in webhook audit metadata.
  • Documents validation behavior and retry-policy request shape in docs/webhooks.md.
  • Fixes the error handler envelope helper reference so validation errors render correctly.

Testing

  • jest src/validators/webhooks.test.ts src/routes/webhooks.test.ts --runInBand --forceExit --silent
  • Focused tests: 16 passed
  • Coverage: src/validators/webhooks.ts 100%, src/routes/webhooks.ts 100%
  • Touched-file lint passed
  • Filtered typecheck showed no errors in touched files

@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@Eldren-cmd 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! 🚀

Learn more about application limits

@greatest0fallt1me
greatest0fallt1me merged commit d9999c1 into CalloraOrg:main Jul 28, 2026
1 check failed
@greatest0fallt1me

Copy link
Copy Markdown
Contributor

Great work, this looks good. Thanks for the contribution!

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.

Add zod input validation for /api/webhooks [b#087]

2 participants