Răsfoiți Sursa

Create docs for devices get many route

Lee Morgan 2 luni în urmă
părinte
comite
b51cab8c40
2 a modificat fișierele cu 28 adăugiri și 0 ștergeri
  1. 2 0
      docs/openapi.yaml
  2. 26 0
      docs/paths/device/get_many.yaml

+ 2 - 0
docs/openapi.yaml

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

+ 26 - 0
docs/paths/device/get_many.yaml

@@ -0,0 +1,26 @@
+operationId: deviceGetMany
+summary: Get Many
+security:
+  - UserAuth: []
+description: Retrieve all devices for a specific home
+tags: [Device]
+
+responses:
+  "200":
+    description: Devices retrieved
+    content:
+      application/json:
+        schema:
+          type: array
+          items:
+            $ref: "#/components/schemas/Device"
+  "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"