Skip to content

Commit 31278cd

Browse files
updateclibot[bot]updatecli
andauthored
chore: Update API Documentation (#259)
Made with ❤️️ by updatecli Co-authored-by: updatecli <bot@updatecli.io>
1 parent 468c6fd commit 31278cd

3 files changed

Lines changed: 220 additions & 195 deletions

File tree

docs/docs.go

Lines changed: 81 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,18 @@ const docTemplate = `{
7171
"description": "Configuration of the condition",
7272
"name": "config",
7373
"in": "query"
74+
},
75+
{
76+
"type": "string",
77+
"description": "Limit the number of reports returned, default is 100",
78+
"name": "limit",
79+
"in": "query"
80+
},
81+
{
82+
"type": "string",
83+
"description": "Page number for pagination, default is 1",
84+
"name": "page",
85+
"in": "query"
7486
}
7587
],
7688
"responses": {
@@ -214,6 +226,18 @@ const docTemplate = `{
214226
"description": "Configuration of the source",
215227
"name": "config",
216228
"in": "query"
229+
},
230+
{
231+
"type": "string",
232+
"description": "Limit the number of reports returned, default is 100",
233+
"name": "limit",
234+
"in": "query"
235+
},
236+
{
237+
"type": "string",
238+
"description": "Page number for pagination, default is 1",
239+
"name": "page",
240+
"in": "query"
217241
}
218242
],
219243
"responses": {
@@ -322,6 +346,18 @@ const docTemplate = `{
322346
"description": "Configuration of the target",
323347
"name": "config",
324348
"in": "query"
349+
},
350+
{
351+
"type": "string",
352+
"description": "Limit the number of reports returned, default is 100",
353+
"name": "limit",
354+
"in": "query"
355+
},
356+
{
357+
"type": "string",
358+
"description": "Page number for pagination, default is 1",
359+
"name": "page",
360+
"in": "query"
325361
}
326362
],
327363
"responses": {
@@ -418,6 +454,18 @@ const docTemplate = `{
418454
"description": "SCM ID",
419455
"name": "scmid",
420456
"in": "query"
457+
},
458+
{
459+
"type": "string",
460+
"description": "Limit the number of reports returned, default is 100",
461+
"name": "limit",
462+
"in": "query"
463+
},
464+
{
465+
"type": "string",
466+
"description": "Page number for pagination, default is 1",
467+
"name": "page",
468+
"in": "query"
421469
}
422470
],
423471
"responses": {
@@ -476,6 +524,20 @@ const docTemplate = `{
476524
"Pipeline Reports"
477525
],
478526
"summary": "Search pipeline reports",
527+
"parameters": [
528+
{
529+
"type": "string",
530+
"description": "Limit the number of reports returned, default is 100",
531+
"name": "limit",
532+
"in": "query"
533+
},
534+
{
535+
"type": "string",
536+
"description": "Page number for pagination, default is 1",
537+
"name": "page",
538+
"in": "query"
539+
}
540+
],
479541
"responses": {
480542
"200": {
481543
"description": "OK",
@@ -596,7 +658,7 @@ const docTemplate = `{
596658
}
597659
}
598660
},
599-
"/api/scms": {
661+
"/api/pipeline/scms": {
600662
"get": {
601663
"description": "List SCMs data from the database",
602664
"tags": [
@@ -627,56 +689,25 @@ const docTemplate = `{
627689
"description": "Return a summary of the SCMs",
628690
"name": "summary",
629691
"in": "query"
630-
}
631-
],
632-
"responses": {
633-
"200": {
634-
"description": "OK",
635-
"schema": {
636-
"$ref": "#/definitions/server.DefaultResponseModel"
637-
}
638-
},
639-
"500": {
640-
"description": "Internal Server Error",
641-
"schema": {
642-
"$ref": "#/definitions/server.DefaultResponseModel"
643-
}
644-
}
645-
}
646-
}
647-
},
648-
"/api/scms/summary": {
649-
"get": {
650-
"description": "Find SCM Summary of all git repositories detected",
651-
"tags": [
652-
"SCMs"
653-
],
654-
"summary": "Find SCM Summary",
655-
"parameters": [
656-
{
657-
"type": "string",
658-
"description": "ID of the SCM",
659-
"name": "scmid",
660-
"in": "query"
661692
},
662693
{
663694
"type": "string",
664-
"description": "URL of the SCM",
665-
"name": "url",
695+
"description": "Limit the number of reports returned, default is 100",
696+
"name": "limit",
666697
"in": "query"
667698
},
668699
{
669700
"type": "string",
670-
"description": "Branch of the SCM",
671-
"name": "branch",
701+
"description": "Page number for pagination, default is 1",
702+
"name": "page",
672703
"in": "query"
673704
}
674705
],
675706
"responses": {
676707
"200": {
677708
"description": "OK",
678709
"schema": {
679-
"$ref": "#/definitions/server.FindSCMSummaryResponse"
710+
"$ref": "#/definitions/server.DefaultResponseModel"
680711
}
681712
},
682713
"500": {
@@ -1302,6 +1333,10 @@ const docTemplate = `{
13021333
"items": {
13031334
"$ref": "#/definitions/model.ConfigCondition"
13041335
}
1336+
},
1337+
"total_count": {
1338+
"description": "TotalCount is the total number of conditions for pagination.",
1339+
"type": "integer"
13051340
}
13061341
}
13071342
},
@@ -1338,17 +1373,6 @@ const docTemplate = `{
13381373
}
13391374
}
13401375
},
1341-
"server.FindSCMSummaryResponse": {
1342-
"type": "object",
1343-
"properties": {
1344-
"data": {
1345-
"type": "object",
1346-
"additionalProperties": {
1347-
"$ref": "#/definitions/server.ScmBranchData"
1348-
}
1349-
}
1350-
}
1351-
},
13521376
"server.GetPipelineReportByIDResponse": {
13531377
"type": "object",
13541378
"properties": {
@@ -1374,32 +1398,9 @@ const docTemplate = `{
13741398
"items": {
13751399
"$ref": "#/definitions/database.SearchLatestReportData"
13761400
}
1377-
}
1378-
}
1379-
},
1380-
"server.ScmBranchData": {
1381-
"type": "object",
1382-
"additionalProperties": {
1383-
"$ref": "#/definitions/server.ScmSummaryData"
1384-
}
1385-
},
1386-
"server.ScmSummaryData": {
1387-
"type": "object",
1388-
"properties": {
1389-
"id": {
1390-
"description": "ID is the unique identifier of the SCM.",
1391-
"type": "string"
13921401
},
1393-
"total_result": {
1394-
"description": "TotalResult is the total number of results for this SCM.",
1402+
"total_count": {
13951403
"type": "integer"
1396-
},
1397-
"total_result_by_type": {
1398-
"description": "TotalResultByType is a map of result types and their counts.",
1399-
"type": "object",
1400-
"additionalProperties": {
1401-
"type": "integer"
1402-
}
14031404
}
14041405
}
14051406
},
@@ -1412,6 +1413,10 @@ const docTemplate = `{
14121413
"items": {
14131414
"$ref": "#/definitions/model.ConfigSource"
14141415
}
1416+
},
1417+
"total_count": {
1418+
"description": "TotalCount is the total number of sources for pagination.",
1419+
"type": "integer"
14151420
}
14161421
}
14171422
},
@@ -1424,6 +1429,10 @@ const docTemplate = `{
14241429
"items": {
14251430
"$ref": "#/definitions/model.ConfigTarget"
14261431
}
1432+
},
1433+
"total_count": {
1434+
"description": "TotalCount is the total number of targets for pagination.",
1435+
"type": "integer"
14271436
}
14281437
}
14291438
},

0 commit comments

Comments
 (0)