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

GET All articles

Open nomisRev opened this issue 2 years ago • 2 comments
trafficstars

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

/articles:
    get:
      tags:
        - Articles
      summary: Get recent articles globally
      description: Get most recent articles globally. Use query parameters to filter
        results. Auth is optional
      operationId: GetArticles
      parameters:
        - name: tag
          in: query
          description: Filter by tag
          schema:
            type: string
        - name: author
          in: query
          description: Filter by author (username)
          schema:
            type: string
        - name: favorited
          in: query
          description: Filter by favorites of a user (username)
          schema:
            type: string
        - name: offsetParam
          in: query
          name: offset
          required: false
          schema:
            type: integer
            minimum: 0
          description: The number of items to skip before starting to collect the result set.
        - name: limitParam
          in: query
          name: limit
          required: false
          schema:
            type: integer
            minimum: 1
            default: 20
          description: The numbers of items to return.
      responses:
        '200':
          $ref: '#/components/responses/MultipleArticlesResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/GenericError'
  1. Add missing domain objects such as MultipleArticlesResponse domain object if it doesn't exist.
  2. Create the missing SQLDelight queries, and implement getAll in ArticlePersistence
  3. Create articles.kt in routes if does not exist, or add getAll operation they're 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 11:09 nomisRev

Hi @nomisRev I would like to get some experience with Arrow. Can you assign me to this task?

RenatoKiss avatar Oct 19 '23 18:10 RenatoKiss

Hey @RenatoKiss, Of course, if you have any questions or doubts please just raise a PR and we can discuss there.

Thank you for the interest in the project, and Arrow. Happy hacktoberfest 👻

nomisRev avatar Oct 21 '23 14:10 nomisRev