ソースを参照

Create docs for create turn route

Lee Morgan 1 ヶ月 前
コミット
82d3ac2ebe
3 ファイル変更52 行追加0 行削除
  1. 4 0
      docs/openapi.yaml
  2. 48 0
      docs/paths/game/session/turn/create.yaml
  3. 0 0
      docs/redoc-static.html

+ 4 - 0
docs/openapi.yaml

@@ -13,6 +13,7 @@ tags:
    - name: Game
    - name: Character
    - name: Session
+   - name: Turn
 
 components:
   schemas:
@@ -67,3 +68,6 @@ paths:
   /game/{game_id}/session:
     post:
       $ref: "./paths/game/session/create.yaml"
+  /game/{game_id}/session/{session_id}/turn:
+    post:
+      $ref: "./paths/game/session/turn/create.yaml"

+ 48 - 0
docs/paths/game/session/turn/create.yaml

@@ -0,0 +1,48 @@
+operationId: turnCreate
+summary: Create
+security:
+  - UserAuth: [tokens]
+description: Create a new turn
+tags: [Turn]
+parameters:
+  - name: game_id
+    in: path
+    description: Game ID
+    required: true
+    schema:
+      type: string
+      format: uuid
+      example: 019ec14f-c42c-7ad2-a0fb-37f712eba704
+  - name: session_id
+    in: path
+    description: Session ID
+    required: true
+    schema:
+      type: string
+      format: uuid
+      example: 019ec150-72ef-7f9e-b164-6dbbcc045e29
+
+responses:
+  "200":
+    description: Turn created
+    content:
+      application/json:
+        schema:
+          type: object
+          properties:
+            turn:
+              $ref: "#/components/schemas/Turn"
+            tokens_remaining:
+              type: number
+              description: Tokens that the user has remaining
+              example: 997364
+  "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


この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません