openapi.json 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. {
  2. "openapi": "3.0.3",
  3. "info": {
  4. "title": "files_versions",
  5. "version": "0.0.1",
  6. "description": "This application automatically maintains older versions of files that are changed.",
  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. "versioning",
  33. "version_labeling",
  34. "version_deletion"
  35. ],
  36. "properties": {
  37. "versioning": {
  38. "type": "boolean"
  39. },
  40. "version_labeling": {
  41. "type": "boolean"
  42. },
  43. "version_deletion": {
  44. "type": "boolean"
  45. }
  46. }
  47. }
  48. }
  49. }
  50. }
  51. },
  52. "paths": {
  53. "/index.php/apps/files_versions/preview": {
  54. "get": {
  55. "operationId": "preview-get-preview",
  56. "summary": "Get the preview for a file version",
  57. "tags": [
  58. "preview"
  59. ],
  60. "security": [
  61. {
  62. "bearer_auth": []
  63. },
  64. {
  65. "basic_auth": []
  66. }
  67. ],
  68. "requestBody": {
  69. "required": false,
  70. "content": {
  71. "application/json": {
  72. "schema": {
  73. "type": "object",
  74. "properties": {
  75. "file": {
  76. "type": "string",
  77. "default": "",
  78. "description": "Path of the file"
  79. },
  80. "x": {
  81. "type": "integer",
  82. "format": "int64",
  83. "default": 44,
  84. "description": "Width of the preview"
  85. },
  86. "y": {
  87. "type": "integer",
  88. "format": "int64",
  89. "default": 44,
  90. "description": "Height of the preview"
  91. },
  92. "version": {
  93. "type": "string",
  94. "default": "",
  95. "description": "Version of the file to get the preview for"
  96. }
  97. }
  98. }
  99. }
  100. }
  101. },
  102. "responses": {
  103. "200": {
  104. "description": "Preview returned",
  105. "content": {
  106. "*/*": {
  107. "schema": {
  108. "type": "string",
  109. "format": "binary"
  110. }
  111. }
  112. }
  113. },
  114. "400": {
  115. "description": "Getting preview is not possible",
  116. "content": {
  117. "application/json": {
  118. "schema": {}
  119. }
  120. }
  121. },
  122. "404": {
  123. "description": "Preview not found",
  124. "content": {
  125. "application/json": {
  126. "schema": {}
  127. }
  128. }
  129. }
  130. }
  131. }
  132. }
  133. },
  134. "tags": []
  135. }