openapi.json 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. {
  2. "openapi": "3.0.3",
  3. "info": {
  4. "title": "files_trashbin",
  5. "version": "0.0.1",
  6. "description": "This application enables users 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. "parameters": [
  61. {
  62. "name": "fileId",
  63. "in": "query",
  64. "description": "ID of the file",
  65. "schema": {
  66. "type": "integer",
  67. "format": "int64",
  68. "default": -1
  69. }
  70. },
  71. {
  72. "name": "x",
  73. "in": "query",
  74. "description": "Width of the preview",
  75. "schema": {
  76. "type": "integer",
  77. "format": "int64",
  78. "default": 32
  79. }
  80. },
  81. {
  82. "name": "y",
  83. "in": "query",
  84. "description": "Height of the preview",
  85. "schema": {
  86. "type": "integer",
  87. "format": "int64",
  88. "default": 32
  89. }
  90. },
  91. {
  92. "name": "a",
  93. "in": "query",
  94. "description": "Whether to not crop the preview",
  95. "schema": {
  96. "type": "integer",
  97. "default": 0,
  98. "enum": [
  99. 0,
  100. 1
  101. ]
  102. }
  103. }
  104. ],
  105. "responses": {
  106. "200": {
  107. "description": "Preview returned",
  108. "content": {
  109. "*/*": {
  110. "schema": {
  111. "type": "string",
  112. "format": "binary"
  113. }
  114. }
  115. }
  116. },
  117. "400": {
  118. "description": "Getting preview is not possible",
  119. "content": {
  120. "application/json": {
  121. "schema": {}
  122. }
  123. }
  124. },
  125. "404": {
  126. "description": "Preview not found",
  127. "content": {
  128. "application/json": {
  129. "schema": {}
  130. }
  131. }
  132. }
  133. }
  134. }
  135. }
  136. },
  137. "tags": []
  138. }