Преглед на файлове

Create docs for get one route

Lee Morgan преди 1 месец
родител
ревизия
59607388bd
променени са 2 файла, в които са добавени 20 реда и са изтрити 0 реда
  1. 2 0
      docs/openapi.yaml
  2. 18 0
      docs/paths/user/get_one.yaml

+ 2 - 0
docs/openapi.yaml

@@ -34,6 +34,8 @@ paths:
   /user:
     post:
       $ref: "./paths/user/create.yaml"
+    get:
+      $ref: "./paths/user/get_one.yaml"
   /user/login:
     post:
       $ref: "./paths/user/login.yaml"

+ 18 - 0
docs/paths/user/get_one.yaml

@@ -0,0 +1,18 @@
+operationId: userGetOne
+summary: Get One
+security:
+  - UserAuth: []
+description: Retrieve the user data for a user
+tags: [User]
+
+responses:
+  "200":
+    description: User retrieved
+    content:
+      application/json:
+        schema:
+          $ref: "#/components/schemas/User"
+  "401":
+    $ref: "#/components/responses/401"
+  "500":
+    $ref: "#/components/responses/500"