openapi.json 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. {
  2. "openapi": "3.0.3",
  3. "info": {
  4. "title": "files_trashbin",
  5. "version": "0.0.1",
  6. "description": "This application enables people to restore files that were deleted from the system.",
  7. "license": {
  8. "name": "agpl"
  9. }
  10. },
  11. "components": {
  12. "securitySchemes": {
  13. "basic_auth": {
  14. "type": "http",
  15. "scheme": "basic"
  16. },
  17. "bearer_auth": {
  18. "type": "http",
  19. "scheme": "bearer"
  20. }
  21. },
  22. "schemas": {
  23. "Capabilities": {
  24. "type": "object",
  25. "required": [
  26. "files"
  27. ],
  28. "properties": {
  29. "files": {
  30. "type": "object",
  31. "required": [
  32. "undelete"
  33. ],
  34. "properties": {
  35. "undelete": {
  36. "type": "boolean"
  37. }
  38. }
  39. }
  40. }
  41. }
  42. }
  43. },
  44. "paths": {
  45. "/index.php/apps/files_trashbin/preview": {
  46. "get": {
  47. "operationId": "preview-get-preview",
  48. "summary": "Get the preview for a file",
  49. "tags": [
  50. "preview"
  51. ],
  52. "security": [
  53. {
  54. "bearer_auth": []
  55. },
  56. {
  57. "basic_auth": []
  58. }
  59. ],
  60. "requestBody": {
  61. "required": false,
  62. "content": {
  63. "application/json": {
  64. "schema": {
  65. "type": "object",
  66. "properties": {
  67. "fileId": {
  68. "type": "integer",
  69. "format": "int64",
  70. "default": -1,
  71. "description": "ID of the file"
  72. },
  73. "x": {
  74. "type": "integer",
  75. "format": "int64",
  76. "default": 32,
  77. "description": "Width of the preview"
  78. },
  79. "y": {
  80. "type": "integer",
  81. "format": "int64",
  82. "default": 32,
  83. "description": "Height of the preview"
  84. },
  85. "a": {
  86. "type": "boolean",
  87. "default": false,
  88. "description": "Whether to not crop the preview"
  89. }
  90. }
  91. }
  92. }
  93. }
  94. },
  95. "responses": {
  96. "200": {
  97. "description": "Preview returned",
  98. "content": {
  99. "*/*": {
  100. "schema": {
  101. "type": "string",
  102. "format": "binary"
  103. }
  104. }
  105. }
  106. },
  107. "400": {
  108. "description": "Getting preview is not possible",
  109. "content": {
  110. "application/json": {
  111. "schema": {}
  112. }
  113. }
  114. },
  115. "404": {
  116. "description": "Preview not found",
  117. "content": {
  118. "application/json": {
  119. "schema": {}
  120. }
  121. }
  122. }
  123. }
  124. }
  125. }
  126. },
  127. "tags": []
  128. }