소스 검색

Create docs for game get one route.

Lee Morgan 1 개월 전
부모
커밋
534ea94806
3개의 변경된 파일53개의 추가작업 그리고 0개의 파일을 삭제
  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"

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
docs/redoc-static.html


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.