openapi.yaml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. openapi: 3.0.4
  2. info:
  3. title: API Documentation | ChatRPG
  4. version: 1.0.0
  5. description: API fro ChatRPG
  6. servers:
  7. - url: http://localhost:8000
  8. description: Development/local server
  9. tags:
  10. - name: User
  11. - name: Game
  12. - name: Character
  13. - name: Session
  14. - name: Turn
  15. components:
  16. schemas:
  17. User:
  18. $ref: "./components/schemas/user.yaml"
  19. Game:
  20. $ref: "./components/schemas/game.yaml"
  21. Character:
  22. $ref: "./components/schemas/character.yaml"
  23. Session:
  24. $ref: "./components/schemas/session.yaml"
  25. Turn:
  26. $ref: "./components/schemas/turn.yaml"
  27. responses:
  28. "400":
  29. $ref: "./components/responses/400.yaml"
  30. "401":
  31. $ref: "./components/responses/401.yaml"
  32. "403":
  33. $ref: "./components/responses/403.yaml"
  34. "404":
  35. $ref: "./components/responses/404.yaml"
  36. "500":
  37. $ref: "./components/responses/500.yaml"
  38. securitySchemes:
  39. $ref: "./components/security.yaml"
  40. paths:
  41. #Users
  42. /user:
  43. post:
  44. $ref: "./paths/user/create.yaml"
  45. get:
  46. $ref: "./paths/user/get_one.yaml"
  47. /user/login:
  48. post:
  49. $ref: "./paths/user/login.yaml"
  50. /user/logout:
  51. get:
  52. $ref: "./paths/user/logout.yaml"
  53. /user/payment-intent:
  54. post:
  55. $ref: "./paths/user/payment_intent.yaml"
  56. #Game
  57. /game:
  58. get:
  59. $ref: "./paths/game/get_many.yaml"
  60. post:
  61. $ref: "./paths/game/create.yaml"
  62. /game/{game_id}:
  63. get:
  64. $ref: "./paths/game/get_one.yaml"
  65. /game/{game_id}/character:
  66. post:
  67. $ref: "./paths/game/character/create.yaml"
  68. /game/{game_id}/session:
  69. post:
  70. $ref: "./paths/game/session/create.yaml"
  71. /game/{game_id}/session/{session_id}/turn:
  72. post:
  73. $ref: "./paths/game/session/turn/create.yaml"