project-release-files.json 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. {
  2. "get": {
  3. "tags": ["Releases"],
  4. "description": "Return a list of files for a given release.",
  5. "operationId": "List a Project's Release Files",
  6. "parameters": [
  7. {
  8. "name": "organization_id_or_slug",
  9. "in": "path",
  10. "description": "The id or slug of the organization.",
  11. "required": true,
  12. "schema": {
  13. "type": "string"
  14. }
  15. },
  16. {
  17. "name": "project_id_or_slug",
  18. "in": "path",
  19. "description": "The id or 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. "responses": {
  36. "200": {
  37. "description": "Success",
  38. "content": {
  39. "application/json": {
  40. "schema": {
  41. "type": "array",
  42. "items": {
  43. "$ref": "../../components/schemas/releases/release-file.json#/ReleaseFile"
  44. }
  45. },
  46. "example": [
  47. {
  48. "dateCreated": "2018-11-06T21:20:22.894Z",
  49. "dist": null,
  50. "headers": {
  51. "Content-Type": "text/plain; encoding=utf-8"
  52. },
  53. "id": "3",
  54. "name": "/demo/goodbye.txt",
  55. "sha1": "94d6b21e962a9fc65889617ec1f17a1e2fe11b65",
  56. "size": 15
  57. }
  58. ]
  59. }
  60. }
  61. },
  62. "403": {
  63. "description": "Forbidden"
  64. },
  65. "404": {
  66. "description": "Not Found"
  67. }
  68. },
  69. "security": [
  70. {
  71. "auth_token": ["project:releases"]
  72. }
  73. ]
  74. },
  75. "post": {
  76. "tags": ["Releases"],
  77. "description": "Upload a new project release file.",
  78. "operationId": "Upload a New Project Release File",
  79. "parameters": [
  80. {
  81. "name": "organization_id_or_slug",
  82. "in": "path",
  83. "description": "The id or slug of the organization.",
  84. "required": true,
  85. "schema": {
  86. "type": "string"
  87. }
  88. },
  89. {
  90. "name": "project_id_or_slug",
  91. "in": "path",
  92. "description": "The id or slug of the project.",
  93. "required": true,
  94. "schema": {
  95. "type": "string"
  96. }
  97. },
  98. {
  99. "name": "version",
  100. "in": "path",
  101. "description": "The version identifier of the release.",
  102. "required": true,
  103. "schema": {
  104. "type": "string"
  105. }
  106. }
  107. ],
  108. "requestBody": {
  109. "content": {
  110. "multipart/form-data": {
  111. "schema": {
  112. "type": "object",
  113. "required": ["file"],
  114. "properties": {
  115. "name": {
  116. "type": "string",
  117. "description": "The name (full path) of the file."
  118. },
  119. "file": {
  120. "type": "string",
  121. "format": "binary",
  122. "description": "The multipart encoded file."
  123. },
  124. "dist": {
  125. "type": "string",
  126. "description": "The name of the dist."
  127. },
  128. "header": {
  129. "type": "string",
  130. "description": "This parameter can be supplied multiple times to attach headers to the file. Each header is a string in the format `key:value`. For instance it can be used to define a content type."
  131. }
  132. }
  133. },
  134. "example": {
  135. "name": "/demo/hello.min.js.map",
  136. "file": "@hello.min.js.map"
  137. }
  138. }
  139. }
  140. },
  141. "responses": {
  142. "201": {
  143. "description": "Success",
  144. "content": {
  145. "application/json": {
  146. "schema": {
  147. "$ref": "../../components/schemas/releases/release-file.json#/ReleaseFile"
  148. },
  149. "example": {
  150. "dateCreated": "2018-11-06T21:20:22.894Z",
  151. "dist": null,
  152. "headers": {
  153. "Content-Type": "text/plain; encoding=utf-8"
  154. },
  155. "id": "3",
  156. "name": "/demo/goodbye.txt",
  157. "sha1": "94d6b21e962a9fc65889617ec1f17a1e2fe11b65",
  158. "size": 15
  159. }
  160. }
  161. }
  162. },
  163. "403": {
  164. "description": "Forbidden"
  165. },
  166. "404": {
  167. "description": "Not Found"
  168. }
  169. },
  170. "security": [
  171. {
  172. "auth_token": ["project:releases"]
  173. }
  174. ]
  175. }
  176. }