ktor-arrow-example icon indicating copy to clipboard operation
ktor-arrow-example copied to clipboard

GET /articles/{slug}/comments

Open nomisRev opened this issue 2 years ago • 2 comments

In order to fully support articles we need to implement a GET article comments for slug, according to following OpenAPI Spec.

/articles/{slug}/comments:
    get:
      tags:
        - Comments
      summary: Get comments for an article
      description: Get the comments for an article. Auth is optional
      operationId: GetArticleComments
      parameters:
        - name: slug
          in: path
          description: Slug of the article that you want to get comments for
          required: true
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/MultipleCommentsResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/GenericError'
  1. Add missing domain objects MultipleCommentsResponse if it doesn't exist.
  2. Implement getCommentsForSlug in ArticlePersistence by adding the corresponding SQL to SqlDelight
  3. Create articles.kt in routes if does not exist, implement the GET route using ArticlePersistence
  4. Add test that verifies the behavior works

Please assign yourself to this ticket before starting, and if you run into any issues please raise a PR so I can provide help and support directly in the code.

Thank you in advance for your interest in the project! Happy hacktoberfest!

nomisRev avatar Sep 25 '23 12:09 nomisRev

hi @nomisRev , can I work on this? I may also help with #165

arioston avatar Nov 18 '23 02:11 arioston

Hey @arioston, Please do! 🙏 Sorry for the late response, I needed some off time.

nomisRev avatar Nov 23 '23 10:11 nomisRev