Procházet zdrojové kódy

Create docs for game get one route.

Lee Morgan před 1 měsícem
rodič
revize
534ea94806
3 změnil soubory, kde provedl 53 přidání a 0 odebrání
  1. 3 0
      docs/openapi.yaml
  2. 50 0
      docs/paths/game/get_one.yaml
  3. 0 0
      docs/redoc-static.html

+ 3 - 0
docs/openapi.yaml

@@ -62,6 +62,9 @@ paths:
   /game:
     post:
       $ref: "./paths/game/create.yaml"
+  /game/{game_id}:
+    get:
+      $ref: "./paths/game/get_one.yaml"
   /game/{game_id}/character:
     post:
       $ref: "./paths/game/character/create.yaml"

+ 50 - 0
docs/paths/game/get_one.yaml

@@ -0,0 +1,50 @@
+operationId: gameGetOne
+summary: Get One
+security:
+  - UserAuth: [tokens]
+description: Retrieve all necessary data for a single game
+tags: [Game]
+parameters:
+  - name: game_id
+    in: path
+    description: Game ID
+    required: true
+    schema:
+      type: string
+      format: uuid
+      example: 019ec246-dd08-7e1b-ba4e-e941d8ba2206
+
+responses:
+  "200":
+    description: Data fetched
+    content:
+      application/json:
+        schema:
+          type: object
+          properties:
+            game:
+              $ref: "#/components/schemas/Game"
+            character:
+              $ref: "#/components/schemas/Character"
+            sessions:
+              type: array
+              items:
+                $ref: "#/components/schemas/Session"
+            turns:
+              type: array
+              items:
+                $ref: "#/components/schemas/Turn"
+            remaining_tokens:
+              type: number
+              description: Number of tokens remaining for user
+              example: 873042
+  "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"

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
docs/redoc-static.html


Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů