Skip to content

docs: add email verification endpoints to OpenAPI spec (#449) - #573

Draft
s6pa1rta3n-lab wants to merge 1 commit into
Neurowealth:mainfrom
s6pa1rta3n-lab:fix-issue-449
Draft

s6pa1rta3n-lab wants to merge 1 commit into
Neurowealth:mainfrom
s6pa1rta3n-lab:fix-issue-449

Conversation

@s6pa1rta3n-lab

Copy link
Copy Markdown

Description

Addresses #449 by documenting the email notification and verification endpoints in docs/openapi.yaml.

Changes Included

  • Added Notifications tag for notification and identity lifecycle endpoints.
  • Documented POST /notifications/email:
    • Requires Bearer authentication (bearerAuth).
    • Request body accepting email with format email.
    • Responses for dispatched verification (200), generic anti-enumeration response (200), invalid email validation (400), unauthorized (401), and internal error (500).
  • Documented GET /notifications/email/verify:
    • Public endpoint consuming query parameter token.
    • Responses for successful verification (200), idempotent repeated verification (200), invalid/expired token (400), and internal error (500).
  • Added schema definitions for email identity status and responses:
    • EmailIdentityStatus enum: PENDING, VERIFIED, BOUNCED, COMPLAINED, SUPPRESSED.
    • RequestEmailVerificationRequest schema.
    • GenericEmailVerificationResponse schema.
    • PendingEmailIdentity and VerifiedEmailIdentity schemas.
    • PendingEmailVerificationResponse and VerifiedEmailVerificationResponse schemas.
    • EmailVerificationResponse oneOf union schema.
    • EmailIdentity schema.
  • Resolved Redocly no-identical-paths error by consolidating /alerts/{userId} and /alerts/{id} paths under /alerts/{id}.
  • Added comprehensive unit tests in tests/unit/docs/openapi-notifications.test.ts verifying OpenAPI contract and specification compliance.

Verification

  • npm run validate:spec passes cleanly.
  • npx @redocly/cli bundle docs/openapi.yaml --output /tmp/openapi-bundled.yaml resolves all refs without error.
  • npx jest tests/unit/docs/openapi-notifications.test.ts passes (4/4 tests).
  • npx jest tests/unit/controllers/email-identity-controller.test.ts passes (29/29 tests).

Closes #449

Payout Routing

  • EVM (Base/Arbitrum/Polygon/ETH): 0xF46C9F6d70C50BF81ef3588AB523a90a594a2F89
  • Stellar: GCL6OXAMLD75BMTINA6EMRUDWK5THQUSHMYNLSNBCJAPZJHNYJTUNIBC

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.

[DOCS] Add email verification endpoints to OpenAPI spec

1 participant