Add post comment creation API #72

Merged
caradoc merged 1 commit from feat/task-bbd3d65c-create-post-comments into main 2026-05-26 07:07:39 -05:00
Collaborator

Summary

  • add protected POST /api/v1/posts/{slug}/comments for local post comments
  • document request/response schemas and CLI workflow
  • add slug comments create <post-slug> --content <text> support

Verification

  • make check

Task: #task-bbd3d65c

## Summary - add protected `POST /api/v1/posts/{slug}/comments` for local post comments - document request/response schemas and CLI workflow - add `slug comments create <post-slug> --content <text>` support ## Verification - `make check` Task: #task-bbd3d65c
feat: add post comment creation API
All checks were successful
CI / build-lint-test (pull_request) Successful in 26s
419cf19788
Task: #task-bbd3d65c
Author
Collaborator

PR review approved

Summary:

  • Adds protected POST /api/v1/posts/{slug}/comments with OpenAPI request/response schemas.
  • Creates local approved comments through the shared comments module and existing database repositories.
  • Adds slug comments create <post-slug> --content <text> plus CLI tests.
  • Updates API and CLI specs.

Acceptance criteria:

  • POST /api/v1/posts/{slug}/comments is documented in OpenAPI with operation ID, request schema, response schema, auth, validation, 404, and shared errors.
  • A valid request creates a comment associated with the target post.
  • Missing posts return shared NOT_FOUND.
  • Invalid or empty comment content returns shared VALIDATION_ERROR.
  • Created comments appear in GET /api/v1/posts/{slug}/comments.
  • Route uses shared comment services/repositories; no internal HTTP calls to website or protocol routes.
  • Matching CLI workflow is specified and implemented.

Blocking issues: none.

Warnings: none.

Verification:

  • make check passed.
  • Forgejo CI CI / build-lint-test (pull_request) passed.

Final verdict: approved.

### PR review approved Summary: - Adds protected `POST /api/v1/posts/{slug}/comments` with OpenAPI request/response schemas. - Creates local approved comments through the shared comments module and existing database repositories. - Adds `slug comments create <post-slug> --content <text>` plus CLI tests. - Updates API and CLI specs. Acceptance criteria: - [x] `POST /api/v1/posts/{slug}/comments` is documented in OpenAPI with operation ID, request schema, response schema, auth, validation, `404`, and shared errors. - [x] A valid request creates a comment associated with the target post. - [x] Missing posts return shared `NOT_FOUND`. - [x] Invalid or empty comment content returns shared `VALIDATION_ERROR`. - [x] Created comments appear in `GET /api/v1/posts/{slug}/comments`. - [x] Route uses shared comment services/repositories; no internal HTTP calls to website or protocol routes. - [x] Matching CLI workflow is specified and implemented. Blocking issues: none. Warnings: none. Verification: - `make check` passed. - Forgejo CI `CI / build-lint-test (pull_request)` passed. Final verdict: approved.
caradoc deleted branch feat/task-bbd3d65c-create-post-comments 2026-05-26 07:07:39 -05:00
Sign in to join this conversation.
No description provided.