77- url : /
88tags :
99- name : Project
10+ - name : Branch
1011- name : Commit
1112- name : Element
1213- name : Relationship
@@ -135,9 +136,9 @@ paths:
135136 tags :
136137 - Project
137138 x-accepts : application/json
138- /projects/{projectId}/commits :
139+ /projects/{projectId}/branches :
139140 get :
140- operationId : getCommitsByProject
141+ operationId : getBranchesByProject
141142 parameters :
142143 - description : ID of the project
143144 in : path
@@ -167,7 +168,7 @@ paths:
167168 application/json :
168169 schema :
169170 items :
170- $ref : ' #/components/schemas/Commit '
171+ $ref : ' #/components/schemas/Branch '
171172 type : array
172173 description : Ok
173174 " 404 " :
@@ -188,12 +189,12 @@ paths:
188189 default :
189190 content : {}
190191 description : Unexpected response.
191- summary : Get commits by project
192+ summary : Get branches by project
192193 tags :
193- - Commit
194+ - Branch
194195 x-accepts : application/json
195196 post :
196- operationId : postCommitByProject
197+ operationId : postBranchByProject
197198 parameters :
198199 - description : ID of the project
199200 in : path
@@ -206,14 +207,14 @@ paths:
206207 content :
207208 application/json :
208209 schema :
209- $ref : ' #/components/schemas/Commit '
210+ $ref : ' #/components/schemas/Branch '
210211 required : true
211212 responses :
212213 " 201 " :
213214 content :
214215 application/json :
215216 schema :
216- $ref : ' #/components/schemas/Commit '
217+ $ref : ' #/components/schemas/Branch '
217218 description : Created
218219 " 415 " :
219220 content :
@@ -230,15 +231,15 @@ paths:
230231 default :
231232 content : {}
232233 description : Unexpected response.
233- summary : Create commit by project
234+ summary : Create branch by project
234235 tags :
235- - Commit
236+ - Branch
236237 x-codegen-request-body-name : body
237238 x-contentType : application/json
238239 x-accepts : application/json
239- /projects/{projectId}/commits/{commitId } :
240+ /projects/{projectId}/branches/{branchId } :
240241 get :
241- operationId : getCommitByProjectAndId
242+ operationId : getBranchesByProjectAndId
242243 parameters :
243244 - description : ID of the project
244245 in : path
@@ -247,9 +248,9 @@ paths:
247248 schema :
248249 format : uuid
249250 type : string
250- - description : ID of the commit
251+ - description : ID of the branch
251252 in : path
252- name : commitId
253+ name : branchId
253254 required : true
254255 schema :
255256 format : uuid
@@ -259,7 +260,7 @@ paths:
259260 content :
260261 application/json :
261262 schema :
262- $ref : ' #/components/schemas/Commit '
263+ $ref : ' #/components/schemas/Branch '
263264 description : Ok
264265 " 404 " :
265266 content : {}
@@ -279,13 +280,120 @@ paths:
279280 default :
280281 content : {}
281282 description : Unexpected response.
282- summary : Get commit by project and ID
283+ summary : Get branch by project and ID
284+ tags :
285+ - Branch
286+ x-accepts : application/json
287+ /projects/{projectId}/commits :
288+ get :
289+ operationId : getCommitsByProject
290+ parameters :
291+ - description : ID of the project
292+ in : path
293+ name : projectId
294+ required : true
295+ schema :
296+ format : uuid
297+ type : string
298+ - description : Page after
299+ in : query
300+ name : page[after]
301+ schema :
302+ type : string
303+ - description : Page before
304+ in : query
305+ name : page[before]
306+ schema :
307+ type : string
308+ - description : Page size
309+ in : query
310+ name : page[size]
311+ schema :
312+ type : integer
313+ responses :
314+ " 200 " :
315+ content :
316+ application/json :
317+ schema :
318+ items :
319+ $ref : ' #/components/schemas/Commit'
320+ type : array
321+ description : Ok
322+ " 404 " :
323+ content : {}
324+ description : Not found.
325+ " 415 " :
326+ content :
327+ application/json :
328+ schema :
329+ $ref : ' #/components/schemas/Error'
330+ description : The requested content type is not acceptable.
331+ " 500 " :
332+ content :
333+ application/json :
334+ schema :
335+ $ref : ' #/components/schemas/Error'
336+ description : Internal server error.
337+ default :
338+ content : {}
339+ description : Unexpected response.
340+ summary : Get commits by project
283341 tags :
284342 - Commit
285343 x-accepts : application/json
286- /projects/{projectId}/head :
344+ post :
345+ operationId : postCommitByProject
346+ parameters :
347+ - description : ID of the project
348+ in : path
349+ name : projectId
350+ required : true
351+ schema :
352+ format : uuid
353+ type : string
354+ - description : ID of the branch - project's default branch if unspecified
355+ in : query
356+ name : branchId
357+ schema :
358+ format : uuid
359+ type : string
360+ requestBody :
361+ content :
362+ application/json :
363+ schema :
364+ $ref : ' #/components/schemas/Commit'
365+ required : true
366+ responses :
367+ " 201 " :
368+ content :
369+ application/json :
370+ schema :
371+ $ref : ' #/components/schemas/Commit'
372+ description : Created
373+ " 415 " :
374+ content :
375+ application/json :
376+ schema :
377+ $ref : ' #/components/schemas/Error'
378+ description : The requested content type is not acceptable.
379+ " 500 " :
380+ content :
381+ application/json :
382+ schema :
383+ $ref : ' #/components/schemas/Error'
384+ description : Internal server error.
385+ default :
386+ content : {}
387+ description : Unexpected response.
388+ summary : Create commit by project
389+ tags :
390+ - Commit
391+ x-codegen-request-body-name : body
392+ x-contentType : application/json
393+ x-accepts : application/json
394+ /projects/{projectId}/commits/{commitId} :
287395 get :
288- operationId : getHeadCommitByProject
396+ operationId : getCommitByProjectAndId
289397 parameters :
290398 - description : ID of the project
291399 in : path
@@ -294,6 +402,13 @@ paths:
294402 schema :
295403 format : uuid
296404 type : string
405+ - description : ID of the commit
406+ in : path
407+ name : commitId
408+ required : true
409+ schema :
410+ format : uuid
411+ type : string
297412 responses :
298413 " 200 " :
299414 content :
@@ -319,7 +434,7 @@ paths:
319434 default :
320435 content : {}
321436 description : Unexpected response.
322- summary : Get head commit by project
437+ summary : Get commit by project and ID
323438 tags :
324439 - Commit
325440 x-accepts : application/json
@@ -1002,27 +1117,47 @@ components:
10021117 content : {}
10031118 description : Ok
10041119 schemas :
1005- Record :
1120+ Project :
10061121 example :
1122+ ' @type ' : Project
1123+ defaultBranch :
1124+ id : 046b6c7f-0b8a-43b9-b35d-6489e6daee91
1125+ name : name
1126+ description : description
10071127 id : 046b6c7f-0b8a-43b9-b35d-6489e6daee91
10081128 properties :
1129+ ' @type ' :
1130+ enum :
1131+ - Project
1132+ type : string
1133+ defaultBranch :
1134+ $ref : ' #/components/schemas/Project_defaultBranch'
1135+ description :
1136+ type : string
10091137 id :
10101138 format : uuid
10111139 type : string
1140+ name :
1141+ type : string
10121142 type : object
1013- Project :
1143+ Branch :
10141144 example :
1015- ' @type ' : Project
1145+ head :
1146+ id : 046b6c7f-0b8a-43b9-b35d-6489e6daee91
1147+ ' @type ' : Branch
10161148 name : name
1017- description : description
10181149 id : 046b6c7f-0b8a-43b9-b35d-6489e6daee91
1150+ owningProject :
1151+ id : 046b6c7f-0b8a-43b9-b35d-6489e6daee91
10191152 properties :
10201153 ' @type ' :
10211154 enum :
1022- - Project
1023- type : string
1024- description :
1155+ - Branch
10251156 type : string
1157+ head :
1158+ $ref : ' #/components/schemas/Branch_head'
1159+ owningProject :
1160+ $ref : ' #/components/schemas/Branch_owningProject'
10261161 id :
10271162 format : uuid
10281163 type : string
@@ -1054,7 +1189,7 @@ components:
10541189 previousCommit :
10551190 id : 046b6c7f-0b8a-43b9-b35d-6489e6daee91
10561191 id : 046b6c7f-0b8a-43b9-b35d-6489e6daee91
1057- containingProject :
1192+ owningProject :
10581193 id : 046b6c7f-0b8a-43b9-b35d-6489e6daee91
10591194 properties :
10601195 ' @type ' :
@@ -1065,13 +1200,13 @@ components:
10651200 items :
10661201 $ref : ' #/components/schemas/ElementVersion'
10671202 type : array
1068- containingProject :
1069- $ref : ' #/components/schemas/Commit_containingProject '
1203+ owningProject :
1204+ $ref : ' #/components/schemas/Branch_owningProject '
10701205 id :
10711206 format : uuid
10721207 type : string
10731208 previousCommit :
1074- $ref : ' #/components/schemas/Record '
1209+ $ref : ' #/components/schemas/Branch_head '
10751210 type : object
10761211 ElementVersion :
10771212 example :
@@ -1179,15 +1314,15 @@ components:
11791314 where :
11801315 ' @type ' : PrimitiveConstraint
11811316 id : 046b6c7f-0b8a-43b9-b35d-6489e6daee91
1182- containingProject :
1317+ owningProject :
11831318 id : 046b6c7f-0b8a-43b9-b35d-6489e6daee91
11841319 properties :
11851320 ' @type ' :
11861321 enum :
11871322 - Query
11881323 type : string
1189- containingProject :
1190- $ref : ' #/components/schemas/Commit_containingProject '
1324+ owningProject :
1325+ $ref : ' #/components/schemas/Branch_owningProject '
11911326 id :
11921327 format : uuid
11931328 type : string
@@ -1259,7 +1394,24 @@ components:
12591394 error :
12601395 type : string
12611396 type : object
1262- Commit_containingProject :
1397+ Project_defaultBranch :
1398+ description : Branch
1399+ example :
1400+ id : 046b6c7f-0b8a-43b9-b35d-6489e6daee91
1401+ properties :
1402+ id :
1403+ format : uuid
1404+ type : string
1405+ Branch_head :
1406+ description : Commit
1407+ example :
1408+ id : 046b6c7f-0b8a-43b9-b35d-6489e6daee91
1409+ properties :
1410+ id :
1411+ format : uuid
1412+ type : string
1413+ Branch_owningProject :
1414+ description : Project
12631415 example :
12641416 id : 046b6c7f-0b8a-43b9-b35d-6489e6daee91
12651417 properties :
0 commit comments