Эх сурвалжийг харах

Create docs for home deletion route

Lee Morgan 2 сар өмнө
parent
commit
6c9678e20b

+ 3 - 0
docs/openapi.yaml

@@ -50,3 +50,6 @@ paths:
   /home:
     post:
       $ref: "./paths/home/create.yaml"
+  /home/{home_id}:
+    delete:
+      $ref: "./paths/home/delete.yaml"

+ 2 - 1
docs/paths/home/create.yaml

@@ -1,6 +1,7 @@
 operationId: homeCrate
 summary: Create
-security: []
+security:
+  - UserAuth: []
 description: Create new home for a user
 tags: [Home]
 requestBody:

+ 36 - 0
docs/paths/home/delete.yaml

@@ -0,0 +1,36 @@
+operationId: homeDelete
+summary: Delete
+security:
+  - UserAuth: []
+description: Delete a home
+tags: [Home]
+parameters:
+  - name: home_id
+    in: path
+    description: ID of home to delete
+    required: true
+    schema:
+      type: string
+      format: uuid
+      example: 019e1332-66c2-7b41-a77c-17df2e2eae78
+
+responses:
+  "200":
+    description: "Home deleted (always returns '{success: true}')"
+    content:
+      application/json:
+        schema:
+          type: object
+          properties:
+            success:
+              type: boolean
+  "400":
+    $ref: "#/components/responses/400"
+  "401":
+    $ref: "#/components/responses/401"
+  "403":
+    $ref: "#/components/responses/403"
+  "404":
+    $ref: "#/components/responses/404"
+  "500":
+    $ref: "#/components/responses/500"