Skip to content

Commit 03a2435

Browse files
committed
make generate-swagger
1 parent b83b17e commit 03a2435

File tree

1 file changed

+166
-0
lines changed

1 file changed

+166
-0
lines changed

templates/swagger/v1_json.tmpl

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,6 +1371,130 @@
13711371
}
13721372
}
13731373
},
1374+
"/repos/{owner}/{repo}/branches/{branch}/protection": {
1375+
"get": {
1376+
"produces": [
1377+
"application/json"
1378+
],
1379+
"tags": [
1380+
"repository"
1381+
],
1382+
"summary": "Retrieve a specific branch protection from a repository",
1383+
"operationId": "repoGetBranchProtection",
1384+
"parameters": [
1385+
{
1386+
"type": "string",
1387+
"description": "owner of the repo",
1388+
"name": "owner",
1389+
"in": "path",
1390+
"required": true
1391+
},
1392+
{
1393+
"type": "string",
1394+
"description": "name of the repo",
1395+
"name": "repo",
1396+
"in": "path",
1397+
"required": true
1398+
},
1399+
{
1400+
"type": "string",
1401+
"description": "branch to get",
1402+
"name": "branch",
1403+
"in": "path",
1404+
"required": true
1405+
}
1406+
],
1407+
"responses": {
1408+
"200": {
1409+
"$ref": "#/responses/Branch"
1410+
}
1411+
}
1412+
},
1413+
"put": {
1414+
"produces": [
1415+
"application/json"
1416+
],
1417+
"tags": [
1418+
"repository"
1419+
],
1420+
"summary": "Update branch protection of a repository",
1421+
"operationId": "repoUpdateProtectBranch",
1422+
"parameters": [
1423+
{
1424+
"type": "string",
1425+
"description": "owner of the repo",
1426+
"name": "owner",
1427+
"in": "path",
1428+
"required": true
1429+
},
1430+
{
1431+
"type": "string",
1432+
"description": "name of the repo",
1433+
"name": "repo",
1434+
"in": "path",
1435+
"required": true
1436+
},
1437+
{
1438+
"type": "string",
1439+
"description": "branch to update",
1440+
"name": "branch",
1441+
"in": "path",
1442+
"required": true
1443+
},
1444+
{
1445+
"name": "body",
1446+
"in": "body",
1447+
"required": true,
1448+
"schema": {
1449+
"$ref": "#/definitions/ProtectBranchForm"
1450+
}
1451+
}
1452+
],
1453+
"responses": {
1454+
"200": {
1455+
"$ref": "#/responses/Branch"
1456+
}
1457+
}
1458+
},
1459+
"delete": {
1460+
"produces": [
1461+
"application/json"
1462+
],
1463+
"tags": [
1464+
"repository"
1465+
],
1466+
"summary": "Remove branch protection from a repository",
1467+
"operationId": "repoDeleteProtectedBranch",
1468+
"parameters": [
1469+
{
1470+
"type": "string",
1471+
"description": "owner of the repo",
1472+
"name": "owner",
1473+
"in": "path",
1474+
"required": true
1475+
},
1476+
{
1477+
"type": "string",
1478+
"description": "name of the repo",
1479+
"name": "repo",
1480+
"in": "path",
1481+
"required": true
1482+
},
1483+
{
1484+
"type": "string",
1485+
"description": "branch to remove protection",
1486+
"name": "branch",
1487+
"in": "path",
1488+
"required": true
1489+
}
1490+
],
1491+
"responses": {
1492+
"204": {
1493+
"$ref": "#/responses/empty"
1494+
}
1495+
}
1496+
}
1497+
},
13741498
"/repos/{owner}/{repo}/collaborators": {
13751499
"get": {
13761500
"produces": [
@@ -6941,6 +7065,10 @@
69417065
"name": {
69427066
"type": "string",
69437067
"x-go-name": "Name"
7068+
},
7069+
"protected": {
7070+
"type": "boolean",
7071+
"x-go-name": "Protected"
69447072
}
69457073
},
69467074
"x-go-package": "code.gitea.io/gitea/modules/structs"
@@ -9115,6 +9243,44 @@
91159243
},
91169244
"x-go-package": "code.gitea.io/gitea/modules/structs"
91179245
},
9246+
"ProtectBranchForm": {
9247+
"description": "ProtectBranchForm form for changing protected branch settings",
9248+
"type": "object",
9249+
"properties": {
9250+
"ApprovalsWhitelistTeams": {
9251+
"type": "string"
9252+
},
9253+
"ApprovalsWhitelistUsers": {
9254+
"type": "string"
9255+
},
9256+
"EnableMergeWhitelist": {
9257+
"type": "boolean"
9258+
},
9259+
"EnableWhitelist": {
9260+
"type": "boolean"
9261+
},
9262+
"MergeWhitelistTeams": {
9263+
"type": "string"
9264+
},
9265+
"MergeWhitelistUsers": {
9266+
"type": "string"
9267+
},
9268+
"Protected": {
9269+
"type": "boolean"
9270+
},
9271+
"RequiredApprovals": {
9272+
"type": "integer",
9273+
"format": "int64"
9274+
},
9275+
"WhitelistTeams": {
9276+
"type": "string"
9277+
},
9278+
"WhitelistUsers": {
9279+
"type": "string"
9280+
}
9281+
},
9282+
"x-go-package": "code.gitea.io/gitea/modules/auth"
9283+
},
91189284
"PublicKey": {
91199285
"description": "PublicKey publickey is a user key to push code to repository",
91209286
"type": "object",

0 commit comments

Comments
 (0)