openapi.yaml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. openapi: 3.0.4
  2. info:
  3. title: API Documentation | Homo
  4. version: 1.0.0
  5. description: API for Homo, home automation software
  6. servers:
  7. - url: http://0.0.0.0:9123
  8. description: Development/local server
  9. tags:
  10. - name: User
  11. - name: Home
  12. - name: Device
  13. components:
  14. schemas:
  15. User:
  16. $ref: "./components/schemas/user.yaml"
  17. Home:
  18. $ref: "./components/schemas/home.yaml"
  19. Device:
  20. $ref: "./components/schemas/device.yaml"
  21. responses:
  22. "400":
  23. $ref: "./components/responses/400.yaml"
  24. "401":
  25. $ref: "./components/responses/401.yaml"
  26. "403":
  27. $ref: "./components/responses/403.yaml"
  28. "404":
  29. $ref: "./components/responses/404.yaml"
  30. "500":
  31. $ref: "./components/responses/500.yaml"
  32. securitySchemes:
  33. $ref: "./components/security.yaml"
  34. paths:
  35. #Users
  36. /user:
  37. post:
  38. $ref: "./paths/user/create.yaml"
  39. get:
  40. $ref: "./paths/user/get_one.yaml"
  41. /user/login:
  42. post:
  43. $ref: "./paths/user/login.yaml"
  44. /user/logout:
  45. post:
  46. $ref: "./paths/user/logout.yaml"
  47. /user/password/reset:
  48. patch:
  49. $ref: "./paths/user/reset_password.yaml"
  50. #Homes
  51. /home:
  52. post:
  53. $ref: "./paths/home/create.yaml"
  54. get:
  55. $ref: "./paths/home/get_many.yaml"
  56. /home/{home_id}:
  57. delete:
  58. $ref: "./paths/home/delete.yaml"
  59. /home/{home_id}/apikey/:
  60. post:
  61. $ref: "./paths/home/rotate_key.yaml"
  62. #Devices
  63. /home/{home_id}/device:
  64. post:
  65. $ref: "./paths/device/create.yaml"
  66. get:
  67. $ref: "./paths/device/get_many.yaml"
  68. /home/{home_id}/device/{device_id}:
  69. delete:
  70. $ref: "./paths/device/delete.yaml"
  71. /home/{home_id}?device/{device_id}/signal:
  72. post:
  73. $ref: "./paths/device/signal.yaml"