Procházet zdrojové kódy

Create docs for home creation route

Lee Morgan před 2 měsíci
rodič
revize
6466fbb1ee
2 změnil soubory, kde provedl 40 přidání a 3 odebrání
  1. 7 3
      docs/openapi.yaml
  2. 33 0
      docs/paths/home/create.yaml

+ 7 - 3
docs/openapi.yaml

@@ -8,10 +8,9 @@ servers:
   - url: http://0.0.0.0:9123
     description: Development/local server
 
-x-tagGroups:
+tags:
   - name: User
-    tags:
-      - User
+  - name: Home
 
 components:
   schemas:
@@ -46,3 +45,8 @@ paths:
   /user/logout:
     post:
       $ref: "./paths/user/logout.yaml"
+
+  #Home
+  /home:
+    post:
+      $ref: "./paths/home/create.yaml"

+ 33 - 0
docs/paths/home/create.yaml

@@ -0,0 +1,33 @@
+operationId: homeCrate
+summary: Create
+security: []
+description: Create new home for a user
+tags: [Home]
+requestBody:
+  content:
+    application/json:
+      schema:
+        type: object
+        required:
+          - name
+        properties:
+          name:
+            type: string
+            description: Name of the new home
+            example: Summer Home
+
+responses:
+  "200":
+    description: Home created
+    content:
+      application/json:
+        schema:
+          $ref: "#/components/schemas/Home"
+  "400":
+    $ref: "#/components/responses/400"
+  "401":
+    $ref: "#/components/responses/401"
+  "403":
+    $ref: "#/components/responses/403"
+  "500":
+    $ref: "#/components/responses/500"