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

GET profile by username

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

In order to fully support profiles we need to implement a GET profile by username, according to following OpenAPI Spec.

/profiles/{username}:
    get:
      tags:
        - Profile
      summary: Get a profile
      description: Get a profile of a user of the system. Auth is optional
      operationId: GetProfileByUsername
      parameters:
        - name: username
          in: path
          description: Username of the profile to get
          required: true
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/ProfileResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/GenericError'
  1. Add Profile domain object if it doesn't exist.
  2. Add required SQL queries to sqldelight
  3. Add selectProfile operation to UserPersistence
  4. Create profile.kt in routes if does not exist, or add get operation there.
  5. 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

Hey 👋

I've dabbled with Ktor, but I'm mainly focused on the Android side of Kotlin development. Looking to dabble back into Ktor with some FP elements, can I take this one?

MarinJuricev avatar Oct 09 '23 20:10 MarinJuricev

Hey @MarinJuricev, Of course ☺️ I assigned you to the issue

nomisRev avatar Oct 10 '23 06:10 nomisRev