Skip to content

feat: generate and propagate X-Correlation-Id through /api/comments h… - #718

Merged
greatest0fallt1me merged 3 commits into
Predictify-org:mainfrom
victorocheje:feature/x-correlation-id-comments
Jul 29, 2026
Merged

feat: generate and propagate X-Correlation-Id through /api/comments h…#718
greatest0fallt1me merged 3 commits into
Predictify-org:mainfrom
victorocheje:feature/x-correlation-id-comments

Conversation

@victorocheje

Copy link
Copy Markdown
Contributor

…andlers

  • Register GET /api/comments and POST /api/comments in OpenAPI registry with X-Correlation-Id request/response header documentation
  • Update GET /api/markets/{id}/comments registration to document the X-Correlation-Id header and add 'Comments' tag
  • Add docs/comments-api.md full runbook: endpoint reference, correlation ID lifecycle (sanitise → resolve → store → echo → propagate), structured log fields, error envelope, rate limiting/CORS notes
  • Update README.md with Comments API section linking to the new doc

The correlation middleware, route handlers, and tests were already present on main (src/middleware/correlation.ts, src/routes/comments.ts, tests/comments-correlation.test.ts, tests/middleware/correlation.test.ts, tests/market-comments.test.ts — 35 tests passing).

closes #581

…andlers

- Register GET /api/comments and POST /api/comments in OpenAPI registry
  with X-Correlation-Id request/response header documentation
- Update GET /api/markets/{id}/comments registration to document the
  X-Correlation-Id header and add 'Comments' tag
- Add docs/comments-api.md full runbook: endpoint reference, correlation
  ID lifecycle (sanitise → resolve → store → echo → propagate),
  structured log fields, error envelope, rate limiting/CORS notes
- Update README.md with Comments API section linking to the new doc

The correlation middleware, route handlers, and tests were already
present on main (src/middleware/correlation.ts, src/routes/comments.ts,
tests/comments-correlation.test.ts, tests/middleware/correlation.test.ts,
tests/market-comments.test.ts — 35 tests passing).
@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@victorocheje 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 68989dd into Predictify-org:main Jul 29, 2026
1 check passed
@greatest0fallt1me

Copy link
Copy Markdown
Contributor

CI passed, solid PR — merged.

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 correlation-id propagation on /api/comments [b#012]

2 participants