project-release-file.json 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. {
  2. "get": {
  3. "tags": ["Releases"],
  4. "description": "Retrieve a file for a given release.",
  5. "operationId": "Retrieve a Project Release's File",
  6. "parameters": [
  7. {
  8. "name": "organization_slug",
  9. "in": "path",
  10. "description": "The slug of the organization.",
  11. "required": true,
  12. "schema": {
  13. "type": "string"
  14. }
  15. },
  16. {
  17. "name": "project_slug",
  18. "in": "path",
  19. "description": "The slug of the project.",
  20. "required": true,
  21. "schema": {
  22. "type": "string"
  23. }
  24. },
  25. {
  26. "name": "version",
  27. "in": "path",
  28. "description": "The version identifier of the release.",
  29. "required": true,
  30. "schema": {
  31. "type": "string"
  32. }
  33. },
  34. {
  35. "name": "file_id",
  36. "in": "path",
  37. "required": true,
  38. "description": "The ID of the file to retrieve.",
  39. "schema": {
  40. "type": "string"
  41. }
  42. }
  43. ],
  44. "responses": {
  45. "200": {
  46. "description": "Success",
  47. "content": {
  48. "application/json": {
  49. "schema": {
  50. "$ref": "../../components/schemas/releases/release-file.json#/ReleaseFile"
  51. },
  52. "example": {
  53. "dateCreated": "2018-11-06T21:20:19.150Z",
  54. "dist": null,
  55. "headers": {
  56. "Content-Type": "text/plain; encoding=utf-8"
  57. },
  58. "id": "1",
  59. "name": "/demo/message-for-you.txt",
  60. "sha1": "2ef7bde608ce5404e97d5f042f95f89f1c232871",
  61. "size": 12
  62. }
  63. }
  64. }
  65. },
  66. "403": {
  67. "description": "Forbidden"
  68. },
  69. "404": {
  70. "description": "Not Found"
  71. }
  72. },
  73. "security": [
  74. {
  75. "auth_token": ["project:releases"]
  76. }
  77. ]
  78. },
  79. "put": {
  80. "tags": ["Releases"],
  81. "description": "Update a project release file.",
  82. "operationId": "Update a Project Release File",
  83. "parameters": [
  84. {
  85. "name": "organization_slug",
  86. "in": "path",
  87. "description": "The slug of the organization.",
  88. "required": true,
  89. "schema": {
  90. "type": "string"
  91. }
  92. },
  93. {
  94. "name": "project_slug",
  95. "in": "path",
  96. "description": "The slug of the project.",
  97. "required": true,
  98. "schema": {
  99. "type": "string"
  100. }
  101. },
  102. {
  103. "name": "version",
  104. "in": "path",
  105. "description": "The version identifier of the release.",
  106. "required": true,
  107. "schema": {
  108. "type": "string"
  109. }
  110. },
  111. {
  112. "name": "file_id",
  113. "in": "path",
  114. "description": "The ID of the file to retrieve.",
  115. "required": true,
  116. "schema": {
  117. "type": "string"
  118. }
  119. }
  120. ],
  121. "requestBody": {
  122. "content": {
  123. "application/json": {
  124. "schema": {
  125. "type": "object",
  126. "properties": {
  127. "name": {
  128. "type": "string",
  129. "description": "The new name (full path) of the file."
  130. },
  131. "dist": {
  132. "type": "string",
  133. "description": "The new name of the dist."
  134. }
  135. }
  136. },
  137. "example": {
  138. "name": "/demo/goodbye.txt"
  139. }
  140. }
  141. }
  142. },
  143. "responses": {
  144. "200": {
  145. "description": "Success",
  146. "content": {
  147. "application/json": {
  148. "schema": {
  149. "$ref": "../../components/schemas/releases/release-file.json#/ReleaseFile"
  150. },
  151. "example": {
  152. "dateCreated": "2018-11-06T21:20:22.894Z",
  153. "dist": null,
  154. "headers": {
  155. "Content-Type": "text/plain; encoding=utf-8"
  156. },
  157. "id": "3",
  158. "name": "/demo/goodbye.txt",
  159. "sha1": "94d6b21e962a9fc65889617ec1f17a1e2fe11b65",
  160. "size": 15
  161. }
  162. }
  163. }
  164. },
  165. "403": {
  166. "description": "Forbidden"
  167. },
  168. "404": {
  169. "description": "Not Found"
  170. }
  171. },
  172. "security": [
  173. {
  174. "auth_token": ["project:releases"]
  175. }
  176. ]
  177. },
  178. "delete": {
  179. "tags": ["Releases"],
  180. "description": "Delete a file for a given release.",
  181. "operationId": "Delete a Project Release's File",
  182. "parameters": [
  183. {
  184. "name": "organization_slug",
  185. "in": "path",
  186. "description": "The slug of the organization the release belongs to.",
  187. "required": true,
  188. "schema": {
  189. "type": "string"
  190. }
  191. },
  192. {
  193. "name": "project_slug",
  194. "in": "path",
  195. "description": "The slug of the project.",
  196. "required": true,
  197. "schema": {
  198. "type": "string"
  199. }
  200. },
  201. {
  202. "name": "version",
  203. "in": "path",
  204. "description": "The version identifier of the release.",
  205. "required": true,
  206. "schema": {
  207. "type": "string"
  208. }
  209. },
  210. {
  211. "name": "file_id",
  212. "in": "path",
  213. "description": "The ID of the file to delete.",
  214. "required": true,
  215. "schema": {
  216. "type": "string"
  217. }
  218. }
  219. ],
  220. "responses": {
  221. "204": {
  222. "description": "Success"
  223. },
  224. "403": {
  225. "description": "Forbidden"
  226. },
  227. "404": {
  228. "description": "Not Found"
  229. }
  230. },
  231. "security": [
  232. {
  233. "auth_token": ["project:releases"]
  234. }
  235. ]
  236. }
  237. }