Просмотр исходного кода

Create docs for create game route

Lee Morgan 1 месяц назад
Родитель
Сommit
ab011608e3
3 измененных файлов с 392 добавлено и 347 удалено
  1. 6 0
      docs/openapi.yaml
  2. 39 0
      docs/paths/game/create.yaml
  3. 347 347
      docs/redoc-static.html

+ 6 - 0
docs/openapi.yaml

@@ -10,6 +10,7 @@ servers:
 
 tags:
    - name: User
+   - name: Game
 
 components:
   schemas:
@@ -53,3 +54,8 @@ paths:
   /user/payment-intent:
     post:
       $ref: "./paths/user/payment_intent.yaml"
+
+  #Game
+  /game:
+    post:
+      $ref: "./paths/game/create.yaml"

+ 39 - 0
docs/paths/game/create.yaml

@@ -0,0 +1,39 @@
+operationId: gameCreate
+summary: Create
+security:
+  - UserAuth: [tokens]
+description: Create a new game
+tags: [Game]
+requestBody:
+  content:
+    application/json:
+      schema:
+        type: object
+        required:
+          - title
+          - game_context
+        properties:
+          title:
+            type: string
+            description: Title for the game
+            example: Demon Barber of Fleet Street
+          game_context:
+            type: string
+            description: Any information/context that the user wants to provide for the running of the overall game.
+            example: Lorem Ipsum, etc...
+
+responses:
+  "200":
+    description: New game created
+    content:
+      application/json:
+        schema:
+          $ref: "#/components/schemas/Game"
+  "400":
+    $ref: "#/components/responses/400"
+  "401":
+    $ref: "#/components/responses/401"
+  "403":
+    $ref: "#/components/responses/403"
+  "500":
+    $ref: "#/components/responses/500"

Разница между файлами не показана из-за своего большого размера
+ 347 - 347
docs/redoc-static.html


Некоторые файлы не были показаны из-за большого количества измененных файлов