瀏覽代碼

Create docs for route to get homes

Lee Morgan 2 月之前
父節點
當前提交
c042a1bc9b
共有 2 個文件被更改,包括 24 次插入0 次删除
  1. 2 0
      docs/openapi.yaml
  2. 22 0
      docs/paths/home/get_many.yaml

+ 2 - 0
docs/openapi.yaml

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

+ 22 - 0
docs/paths/home/get_many.yaml

@@ -0,0 +1,22 @@
+operationId: homeGetMany
+summary: Get Many
+security:
+  - UserAuth: []
+description: Retrieve a list of all homes of logged in user
+tags: [Home]
+
+responses:
+  "200":
+    description: Homes retrieved
+    content:
+      application/json:
+        schema:
+          type: array
+          items:
+            $ref: "#/components/schemas/Home"
+  "400":
+    $ref: "#/components/responses/400"
+  "401":
+    $ref: "#/components/responses/401"
+  "500":
+    $ref: "#/components/responses/500"