swagger.yaml 1.2 KB

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