Răsfoiți Sursa

Create doc schemas for new tables

Lee Morgan 1 lună în urmă
părinte
comite
e44afa5248

+ 20 - 0
docs/components/schemas/character.yaml

@@ -0,0 +1,20 @@
+type: object
+properties:
+  id:
+    type: string
+    format: uuid
+    description: Unique ID of the session
+    example: 019eb74c-632b-7c1e-87bc-bac42335d85a
+  game_id:
+    type: string
+    format: uuid
+    description: ID of the game the session belongs to
+    example: 019eb74e-00ce-76ca-a88e-6ffaa8062b26
+  name:
+    type: string
+    description: Character name
+    example: Sweeney Todd
+  description:
+    type: string
+    description: User written description of their character
+    example: Lorem Ipsum, etc...

+ 19 - 0
docs/components/schemas/game.yaml

@@ -0,0 +1,19 @@
+type: object
+properties:
+  id:
+    type: string
+    format: uuid
+    description: Unique ID of the game
+    example: 019eb747-4371-7230-b3f0-53550cd253c6
+  title:
+    type: string
+    description: User generated title for the game
+    example: Demon Barber of Fleet Street
+  world_context:
+    type: string
+    description: User created text to summarize the world to create
+    example: Lorem Ipsum, etc...
+  created_at:
+    type: date
+    description: Date when game was first created
+    example: 2026-06-11T15:26:34.176Z

+ 24 - 0
docs/components/schemas/session.yaml

@@ -0,0 +1,24 @@
+type: object
+properties:
+  id:
+    type: string
+    format: uuid
+    description: Unique ID of the session
+    example: 019eb74f-c5c3-771c-b3ce-399a9ffeafe0
+  game_id:
+    type: string
+    format: uuid
+    description: ID of the game that owns this session
+    example: cbc7d94e-12fe-4773-b095-43ce28d601d4
+  summary:
+    type: string
+    description: LLM generated summary of the full session. Only available after session is over
+    example: Lorem Ipsum, etc...
+  started_at:
+    type: date
+    description: Date session was first created
+    example: 2026-06-11T15:42:12.281Z
+  ended_at:
+    type: date
+    description: Date when session was ended. Possibly null.
+    example: 2026-06-11T15:42:50.417Z

+ 28 - 0
docs/components/schemas/turn.yaml

@@ -0,0 +1,28 @@
+type: object
+properties:
+  id:
+    type: string
+    format: uuid
+    description: Unique ID of the turn
+    example: 019eb75b-bb35-77b7-a16f-38b85223085d
+  session_id:
+    type: string
+    format: uuid
+    description: ID of the session that this turn belongs to
+    example: 019eb75c-41cd-7456-95fe-382787dc4f12
+  user_text:
+    type: string
+    description: User provided input for the actions to take for their turn
+    example: Lorem Ipsum, etc...
+  llm_text:
+    type: string
+    description: LLM generated text to respond to user and move the game forward
+    example: Lorem Ipsum, etc...
+  sequence_number:
+    type: number
+    description: Number for ordering the turns in a session. Refers to session, not game.
+    example: 5
+  created_at:
+    type: date
+    description: Time when the turn was taken
+    example: 2026-06-11T15:48:40.705Z

+ 8 - 0
docs/openapi.yaml

@@ -15,6 +15,14 @@ components:
   schemas:
     User:
       $ref: "./components/schemas/user.yaml"
+    Game:
+      $ref: "./components/schemas/game.yaml"
+    Character:
+      $ref: "./components/schemas/character.yaml"
+    Session:
+      $ref: "./components/schemas/session.yaml"
+    Turn:
+      $ref: "./components/schemas/turn.yaml"
   responses:
     "400":
       $ref: "./components/responses/400.yaml"