swagger.yaml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. definitions:
  2. model.File:
  3. properties:
  4. created_at:
  5. type: string
  6. id:
  7. type: integer
  8. name:
  9. type: string
  10. path:
  11. type: string
  12. size:
  13. type: integer
  14. type:
  15. type: string
  16. updated_at:
  17. type: string
  18. type: object
  19. info:
  20. contact: {}
  21. paths:
  22. /api/files:
  23. get:
  24. description: Get a list of all files in the cloud storage
  25. produces:
  26. - application/json
  27. responses:
  28. "200":
  29. description: OK
  30. schema:
  31. items:
  32. $ref: '#/definitions/model.File'
  33. type: array
  34. summary: List all files
  35. tags:
  36. - files
  37. post:
  38. consumes:
  39. - multipart/form-data
  40. description: Upload a file to the cloud storage
  41. parameters:
  42. - description: File to upload
  43. in: formData
  44. name: file
  45. required: true
  46. type: file
  47. produces:
  48. - application/json
  49. responses:
  50. "200":
  51. description: OK
  52. schema:
  53. $ref: '#/definitions/model.File'
  54. summary: Upload a file
  55. tags:
  56. - files
  57. swagger: "2.0"