Skip to content

feat(social-links): document endpoints in Swagger/OpenAPI#1337

Merged
aji70 merged 2 commits into
MyFanss:mainfrom
Damidesign:feat/social-links-swagger-docs
Jun 30, 2026
Merged

feat(social-links): document endpoints in Swagger/OpenAPI#1337
aji70 merged 2 commits into
MyFanss:mainfrom
Damidesign:feat/social-links-swagger-docs

Conversation

@Damidesign

Copy link
Copy Markdown
Contributor

this pr closes #1059
this pr closes #1060

  • Add SocialLinksListItemDto (concrete class with id) so Swagger can resolve the paginated list schema instead of an un-resolvable generic
  • Register PaginatedResponseDto and SocialLinksListItemDto via @ApiExtraModels; use allOf + getSchemaPath for the GET 200 schema
  • Add type annotations to POST 201 and PATCH 200 responses
  • Add 400 (validation) and 429 (rate-limit) @apiresponse decorators on mutating endpoints; add @ApiBody and example values on query params
  • Add 14 Swagger metadata unit tests covering tags, extra-models registration, operation summaries, response types, and status codes

Summary

Changes

Test Plan

Automated tests added or updated

  • Unit tests (backend/src/**/*.spec.ts) — service/guard/decorator logic in isolation
  • Integration / e2e tests (backend/test/**/*.e2e-spec.ts) — HTTP round-trips with mocked infrastructure
  • Frontend component tests (frontend/src/**/*.test.{ts,tsx}) — React component behaviour
  • Frontend e2e tests (frontend/e2e/**/*.spec.ts) — Playwright browser flows
  • Contract tests (contract/) — Soroban/Rust unit tests via cargo test
  • No new tests required — explain why: ___

How to run the tests locally

# Backend unit tests
cd backend && npm test

# Backend e2e tests (requires no live DB — uses in-memory mocks)
cd backend && npm run test:e2e

# Frontend component tests
cd frontend && npx vitest run

# Frontend e2e tests (requires dev server on :3000 and API on :3001)
cd frontend && npx playwright test

# Contract tests
cd contract && cargo test

Manual verification checklist

  • Happy path works end-to-end in a local environment
  • Error / edge cases handled gracefully (stale state, invalid input, disconnected wallet)
  • No regressions in closely related API or UI flows
  • Rate-limiting, auth guards, and feature flags behave as expected where touched
  • Linting passes: cd backend && npm run lint / cd frontend && npm run lint

Related issues

Notes for reviewers

- Add SocialLinksListItemDto (concrete class with id) so Swagger can
  resolve the paginated list schema instead of an un-resolvable generic
- Register PaginatedResponseDto and SocialLinksListItemDto via
  @ApiExtraModels; use allOf + getSchemaPath for the GET 200 schema
- Add type annotations to POST 201 and PATCH 200 responses
- Add 400 (validation) and 429 (rate-limit) @apiresponse decorators on
  mutating endpoints; add @ApiBody and example values on query params
- Add 14 Swagger metadata unit tests covering tags, extra-models
  registration, operation summaries, response types, and status codes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

@Damidesign 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

@aji70 aji70 merged commit 5f429e4 into MyFanss:main Jun 30, 2026
2 of 6 checks passed
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.

Backend Social links: Document endpoints in Swagger/OpenAPI Backend Social links: Return consistent error shape on failure

2 participants