Ver código fonte

Create docs for route to retrieve single user

Lee Morgan 2 meses atrás
pai
commit
fca9073d93
2 arquivos alterados com 24 adições e 0 exclusões
  1. 2 0
      docs/openapi.yaml
  2. 22 0
      docs/paths/user/get_one.yaml

+ 2 - 0
docs/openapi.yaml

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

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

@@ -0,0 +1,22 @@
+operationId: userGetOne
+summary: Get One
+security:
+  - UserAuth: []
+description: User get their own data from database
+tags: [User]
+
+responses:
+  "200":
+    description: User retrieved
+    content:
+      application/json:
+        schema:
+          $ref: "#/components/schemas/User"
+  "400":
+    $ref: "#/components/responses/400"
+  "401":
+    $ref: "#/components/responses/401"
+  "404":
+    $ref: "#/components/responses/404"
+  "500":
+    $ref: "#/components/responses/500"