Explorar o código

Create docs for home deletion route

Lee Morgan hai 2 meses
pai
achega
6c9678e20b
Modificáronse 3 ficheiros con 41 adicións e 1 borrados
  1. 3 0
      docs/openapi.yaml
  2. 2 1
      docs/paths/home/create.yaml
  3. 36 0
      docs/paths/home/delete.yaml

+ 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"