openapi.json 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. "parameters": [
  69. {
  70. "name": "file",
  71. "in": "query",
  72. "description": "Path of the file",
  73. "schema": {
  74. "type": "string",
  75. "default": ""
  76. }
  77. },
  78. {
  79. "name": "x",
  80. "in": "query",
  81. "description": "Width of the preview",
  82. "schema": {
  83. "type": "integer",
  84. "format": "int64",
  85. "default": 44
  86. }
  87. },
  88. {
  89. "name": "y",
  90. "in": "query",
  91. "description": "Height of the preview",
  92. "schema": {
  93. "type": "integer",
  94. "format": "int64",
  95. "default": 44
  96. }
  97. },
  98. {
  99. "name": "version",
  100. "in": "query",
  101. "description": "Version of the file to get the preview for",
  102. "schema": {
  103. "type": "string",
  104. "default": ""
  105. }
  106. }
  107. ],
  108. "responses": {
  109. "200": {
  110. "description": "Preview returned",
  111. "content": {
  112. "*/*": {
  113. "schema": {
  114. "type": "string",
  115. "format": "binary"
  116. }
  117. }
  118. }
  119. },
  120. "400": {
  121. "description": "Getting preview is not possible",
  122. "content": {
  123. "application/json": {
  124. "schema": {}
  125. }
  126. }
  127. },
  128. "404": {
  129. "description": "Preview not found",
  130. "content": {
  131. "application/json": {
  132. "schema": {}
  133. }
  134. }
  135. }
  136. }
  137. }
  138. }
  139. },
  140. "tags": []
  141. }