create.yaml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. operationId: turnCreate
  2. summary: Create
  3. security:
  4. - UserAuth: [tokens]
  5. description: Create a new turn
  6. tags: [Turn]
  7. parameters:
  8. - name: game_id
  9. in: path
  10. description: Game ID
  11. required: true
  12. schema:
  13. type: string
  14. format: uuid
  15. example: 019ec14f-c42c-7ad2-a0fb-37f712eba704
  16. - name: session_id
  17. in: path
  18. description: Session ID
  19. required: true
  20. schema:
  21. type: string
  22. format: uuid
  23. example: 019ec150-72ef-7f9e-b164-6dbbcc045e29
  24. requestBody:
  25. content:
  26. application/json:
  27. schema:
  28. type: object
  29. required:
  30. - content
  31. properties:
  32. content:
  33. type: string
  34. description: User response and instructions for the turn
  35. example: Pull out my sword and swing at the enemy
  36. responses:
  37. "200":
  38. description: Turn created
  39. content:
  40. application/json:
  41. schema:
  42. type: object
  43. properties:
  44. turn:
  45. $ref: "#/components/schemas/Turn"
  46. tokens_remaining:
  47. type: number
  48. description: Tokens that the user has remaining
  49. example: 997364
  50. "400":
  51. $ref: "#/components/responses/400"
  52. "401":
  53. $ref: "#/components/responses/401"
  54. "403":
  55. $ref: "#/components/responses/403"
  56. "404":
  57. $ref: "#/components/responses/404"
  58. "500":
  59. $ref: "#/components/responses/500"