openapi.yaml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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: Devices
  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. #Homes
  48. /home:
  49. post:
  50. $ref: "./paths/home/create.yaml"
  51. get:
  52. $ref: "./paths/home/get_many.yaml"
  53. /home/{home_id}:
  54. delete:
  55. $ref: "./paths/home/delete.yaml"
  56. #Devices
  57. /home/{home_id}/device:
  58. post:
  59. $ref: "./paths/device/create.yaml"