openapi.json 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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. }
  99. }
  100. ],
  101. "responses": {
  102. "200": {
  103. "description": "Preview returned",
  104. "content": {
  105. "*/*": {
  106. "schema": {
  107. "type": "string",
  108. "format": "binary"
  109. }
  110. }
  111. }
  112. },
  113. "400": {
  114. "description": "Getting preview is not possible",
  115. "content": {
  116. "application/json": {
  117. "schema": {}
  118. }
  119. }
  120. },
  121. "404": {
  122. "description": "Preview not found",
  123. "content": {
  124. "application/json": {
  125. "schema": {}
  126. }
  127. }
  128. }
  129. }
  130. }
  131. }
  132. },
  133. "tags": []
  134. }