Quellcode durchsuchen

Create docs for session creation route

Lee Morgan vor 1 Monat
Ursprung
Commit
ac86cafab5
3 geänderte Dateien mit 42 neuen und 0 gelöschten Zeilen
  1. 4 0
      docs/openapi.yaml
  2. 38 0
      docs/paths/game/session/create.yaml
  3. 0 0
      docs/redoc-static.html

+ 4 - 0
docs/openapi.yaml

@@ -12,6 +12,7 @@ tags:
    - name: User
    - name: Game
    - name: Character
+   - name: Session
 
 components:
   schemas:
@@ -63,3 +64,6 @@ paths:
   /game/{game_id}/character:
     post:
       $ref: "./paths/game/character/create.yaml"
+  /game/{game_id}/session:
+    post:
+      $ref: "./paths/game/session/create.yaml"

+ 38 - 0
docs/paths/game/session/create.yaml

@@ -0,0 +1,38 @@
+operationId: sessionCreate
+summary: Create
+security:
+  - UserAuth: [tokens]
+description: Create a new session. Will also be the first turn to set the scene.
+tags: [Session]
+parameters:
+  - name: game_id
+    in: path
+    description: Game ID
+    required: true
+    schema:
+      type: string
+      format: uuid
+      example: 019eb91d-9820-7624-b22b-4e2423b1942b
+
+responses:
+  "200":
+    description: Session started
+    content:
+      application/json:
+        schema:
+          type: object
+          properties:
+            session:
+              $ref: "#/components/schemas/Session"
+            turn:
+              $ref: "#/components/schemas/Turn"
+  "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"

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
docs/redoc-static.html


Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.