From b07b4ee0ef0ddc6c052b53c1804c68bdf691d193 Mon Sep 17 00:00:00 2001
From: Matej Hrica <492778@mail.muni.cz>
Date: Sun, 26 Mar 2023 17:53:00 +0200
Subject: [PATCH] Add /api/login endpoint

---
 authorization/openapi.yaml | 36 ++++++++++++++++++++++++++++++++++--
 1 file changed, 34 insertions(+), 2 deletions(-)

diff --git a/authorization/openapi.yaml b/authorization/openapi.yaml
index 57c9c60..f45af6a 100644
--- a/authorization/openapi.yaml
+++ b/authorization/openapi.yaml
@@ -109,7 +109,23 @@ paths:
           description: OK
         "404":
           description: Not Found
-
+  /api/login:
+    put:
+      tags:
+        - User
+      summary: Login to application
+      description: Login to application
+      operationId: login
+      requestBody:
+        description: Login name and password
+        required: true
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/LoginDto'
+      responses:
+        "200":
+          description: OK
 components:
   schemas:
     DomainEntity:
@@ -196,4 +212,20 @@ components:
           example: john@example.com
         role:
           type: string
-          # TODO: enum
\ No newline at end of file
+          # TODO: enum
+    LoginDto:
+      type: object
+      title: User
+      description: Represents login information for a user.
+      required:
+        - login
+        - password
+      properties:
+        login:
+          type: string
+          description: name used for logging in
+          example: john.doe
+        password:
+          type: string
+          description: password of the user
+          example: secretPassword
\ No newline at end of file
-- 
GitLab