release-file.json 5.0 KB

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