Quellcode durchsuchen

Create docs for create game route

Lee Morgan vor 1 Monat
Ursprung
Commit
ab011608e3
3 geänderte Dateien mit 392 neuen und 347 gelöschten Zeilen
  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"

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


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