openapi.yaml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. components:
  15. schemas:
  16. User:
  17. $ref: "./components/schemas/user.yaml"
  18. Game:
  19. $ref: "./components/schemas/game.yaml"
  20. Character:
  21. $ref: "./components/schemas/character.yaml"
  22. Session:
  23. $ref: "./components/schemas/session.yaml"
  24. Turn:
  25. $ref: "./components/schemas/turn.yaml"
  26. responses:
  27. "400":
  28. $ref: "./components/responses/400.yaml"
  29. "401":
  30. $ref: "./components/responses/401.yaml"
  31. "403":
  32. $ref: "./components/responses/403.yaml"
  33. "404":
  34. $ref: "./components/responses/404.yaml"
  35. "500":
  36. $ref: "./components/responses/500.yaml"
  37. securitySchemes:
  38. $ref: "./components/security.yaml"
  39. paths:
  40. #Users
  41. /user:
  42. post:
  43. $ref: "./paths/user/create.yaml"
  44. get:
  45. $ref: "./paths/user/get_one.yaml"
  46. /user/login:
  47. post:
  48. $ref: "./paths/user/login.yaml"
  49. /user/logout:
  50. get:
  51. $ref: "./paths/user/logout.yaml"
  52. /user/payment-intent:
  53. post:
  54. $ref: "./paths/user/payment_intent.yaml"
  55. #Game
  56. /game:
  57. post:
  58. $ref: "./paths/game/create.yaml"
  59. /game/{game_id}/character:
  60. post:
  61. $ref: "./paths/game/character/create.yaml"
  62. /game/{game_id}/session:
  63. post:
  64. $ref: "./paths/game/session/create.yaml"