release-files.json 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. {
  2. "get": {
  3. "tags": ["Releases"],
  4. "description": "Return a list of files for a given release.",
  5. "operationId": "List an Organization'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": "version",
  18. "in": "path",
  19. "description": "The version identifier of the release.",
  20. "required": true,
  21. "schema": {
  22. "type": "string"
  23. }
  24. }
  25. ],
  26. "responses": {
  27. "200": {
  28. "description": "Success",
  29. "content": {
  30. "application/json": {
  31. "schema": {
  32. "type": "array",
  33. "items": {
  34. "$ref": "../../components/schemas/releases/release-file.json#/ReleaseFile"
  35. }
  36. },
  37. "example": [
  38. {
  39. "dateCreated": "2018-11-06T21:20:22.894Z",
  40. "dist": null,
  41. "headers": {
  42. "Content-Type": "text/plain; encoding=utf-8"
  43. },
  44. "id": "3",
  45. "name": "/demo/goodbye.txt",
  46. "sha1": "94d6b21e962a9fc65889617ec1f17a1e2fe11b65",
  47. "size": 15
  48. }
  49. ]
  50. }
  51. }
  52. },
  53. "403": {
  54. "description": "Forbidden"
  55. },
  56. "404": {
  57. "description": "Not Found"
  58. }
  59. },
  60. "security": [
  61. {
  62. "auth_token": ["project:releases"]
  63. }
  64. ]
  65. },
  66. "post": {
  67. "tags": ["Releases"],
  68. "description": "Upload a new organization release file.",
  69. "operationId": "Upload a New Organization Release File",
  70. "parameters": [
  71. {
  72. "name": "organization_id_or_slug",
  73. "in": "path",
  74. "description": "The id or slug of the organization.",
  75. "required": true,
  76. "schema": {
  77. "type": "string"
  78. }
  79. },
  80. {
  81. "name": "version",
  82. "in": "path",
  83. "description": "The version identifier of the release.",
  84. "required": true,
  85. "schema": {
  86. "type": "string"
  87. }
  88. }
  89. ],
  90. "requestBody": {
  91. "content": {
  92. "multipart/form-data": {
  93. "schema": {
  94. "type": "object",
  95. "required": ["file"],
  96. "properties": {
  97. "name": {
  98. "type": "string",
  99. "description": "The name (full path) of the file."
  100. },
  101. "file": {
  102. "type": "string",
  103. "format": "binary",
  104. "description": "The multipart encoded file."
  105. },
  106. "dist": {
  107. "type": "string",
  108. "description": "The name of the dist."
  109. },
  110. "header": {
  111. "type": "string",
  112. "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."
  113. }
  114. }
  115. },
  116. "example": {
  117. "name": "/demo/release.min.js",
  118. "file": "release.min.js"
  119. }
  120. }
  121. }
  122. },
  123. "responses": {
  124. "201": {
  125. "description": "Success"
  126. },
  127. "403": {
  128. "description": "Forbidden"
  129. },
  130. "404": {
  131. "description": "Not Found"
  132. }
  133. },
  134. "security": [
  135. {
  136. "auth_token": ["project:releases"]
  137. }
  138. ]
  139. }
  140. }