Jelajahi Sumber

Create docs for user logout route

Lee Morgan 2 bulan lalu
induk
melakukan
808a22c170
2 mengubah file dengan 21 tambahan dan 0 penghapusan
  1. 3 0
      docs/openapi.yaml
  2. 18 0
      docs/paths/user/logout.yaml

+ 3 - 0
docs/openapi.yaml

@@ -41,3 +41,6 @@ paths:
   /user/login:
     post:
       $ref: "./paths/user/login.yaml"
+  /user/logout:
+    post:
+      $ref: "./paths/user/logout.yaml"

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

@@ -0,0 +1,18 @@
+operationId: userLogout
+summary: Logout
+security: []
+description: Remove session cookie and logout the user
+tags: [User]
+
+responses:
+  "200":
+    description: "Cookie removed and session ended (always returns '{success: true}')"
+    content:
+      application/json:
+        schema:
+          type: object
+          properties:
+            success:
+              type: boolean
+  "500":
+    $ref: "#/components/responses/500"