mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-03-16 17:54:07 +01:00
Cleanup api docs and ts api-client options (#3663)
This commit is contained in:
@@ -26,7 +26,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Agents"
|
||||
],
|
||||
"summary": "Get agent list",
|
||||
"summary": "List agents",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -64,13 +64,14 @@ const docTemplate = `{
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"description": "Creates a new agent with a random token",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Agents"
|
||||
],
|
||||
"summary": "Create a new agent with a random token so a new agent can connect to the server",
|
||||
"summary": "Create a new agent",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -108,7 +109,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Agents"
|
||||
],
|
||||
"summary": "Get agent information",
|
||||
"summary": "Get an agent",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -173,7 +174,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Agents"
|
||||
],
|
||||
"summary": "Update agent information",
|
||||
"summary": "Update an agent",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -218,7 +219,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Agents"
|
||||
],
|
||||
"summary": "Get agent tasks",
|
||||
"summary": "List agent tasks",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -283,7 +284,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Badges"
|
||||
],
|
||||
"summary": "Get status badge, SVG format",
|
||||
"summary": "Get status of pipeline as SVG badge",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
@@ -744,7 +745,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Organizations"
|
||||
],
|
||||
"summary": "Lookup organization by full-name",
|
||||
"summary": "Lookup an organization by full name",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -756,7 +757,7 @@ const docTemplate = `{
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "the organizations full-name / slug",
|
||||
"description": "the organizations full name / slug",
|
||||
"name": "org_full_name",
|
||||
"in": "path",
|
||||
"required": true
|
||||
@@ -781,7 +782,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Orgs"
|
||||
],
|
||||
"summary": "Get all orgs",
|
||||
"summary": "List organizations",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -828,7 +829,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Orgs"
|
||||
],
|
||||
"summary": "Delete an org",
|
||||
"summary": "Delete an organization",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -861,7 +862,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Organization"
|
||||
],
|
||||
"summary": "Get organization by id",
|
||||
"summary": "Get an organization",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -900,7 +901,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Organization permissions"
|
||||
],
|
||||
"summary": "Get the permissions of the current user in the given organization",
|
||||
"summary": "Get the permissions of the currently authenticated user for the given organization",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -939,7 +940,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Organization secrets"
|
||||
],
|
||||
"summary": "Get the organization secret list",
|
||||
"summary": "List organization secrets",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -990,7 +991,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Organization secrets"
|
||||
],
|
||||
"summary": "Persist/create an organization secret",
|
||||
"summary": "Create an organization secret",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -1035,7 +1036,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Organization secrets"
|
||||
],
|
||||
"summary": "Get the named organization secret",
|
||||
"summary": "Get a organization secret by name",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -1076,7 +1077,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Organization secrets"
|
||||
],
|
||||
"summary": "Delete the named secret from an organization",
|
||||
"summary": "Delete an organization secret by name",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -1114,7 +1115,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Organization secrets"
|
||||
],
|
||||
"summary": "Update an organization secret",
|
||||
"summary": "Update an organization secret by name",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -1166,7 +1167,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Pipeline queues"
|
||||
],
|
||||
"summary": "List pipeline queues",
|
||||
"summary": "List pipelines in queue",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -1257,7 +1258,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Pipeline queues"
|
||||
],
|
||||
"summary": "Pause a pipeline queue",
|
||||
"summary": "Pause the pipeline queue",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -1283,7 +1284,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Pipeline queues"
|
||||
],
|
||||
"summary": "Resume a pipeline queue",
|
||||
"summary": "Resume the pipeline queue",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -1303,13 +1304,14 @@ const docTemplate = `{
|
||||
},
|
||||
"/repos": {
|
||||
"get": {
|
||||
"description": "Returns a list of all repositories. Requires admin rights.",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Repositories"
|
||||
],
|
||||
"summary": "List all repositories on the server. Requires admin rights.",
|
||||
"summary": "List all repositories on the server",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -1395,7 +1397,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Repositories"
|
||||
],
|
||||
"summary": "Get repository by full-name",
|
||||
"summary": "Lookup a repository by full name",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -1407,7 +1409,7 @@ const docTemplate = `{
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "the repository full-name / slug",
|
||||
"description": "the repository full name / slug",
|
||||
"name": "repo_full_name",
|
||||
"in": "path",
|
||||
"required": true
|
||||
@@ -1425,13 +1427,14 @@ const docTemplate = `{
|
||||
},
|
||||
"/repos/repair": {
|
||||
"post": {
|
||||
"description": "Executes a repair process on all repositories. Requires admin rights.",
|
||||
"produces": [
|
||||
"text/plain"
|
||||
],
|
||||
"tags": [
|
||||
"Repositories"
|
||||
],
|
||||
"summary": "Repair all repositories on the server. Requires admin rights.",
|
||||
"summary": "Repair all repositories on the server",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -1457,7 +1460,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Repositories"
|
||||
],
|
||||
"summary": "Get repository information",
|
||||
"summary": "Get a repository",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -1525,7 +1528,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Repositories"
|
||||
],
|
||||
"summary": "Change a repository",
|
||||
"summary": "Update a repository",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -1570,7 +1573,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Repositories"
|
||||
],
|
||||
"summary": "Get repository branches",
|
||||
"summary": "Get branches of a repository",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -1623,7 +1626,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Repositories"
|
||||
],
|
||||
"summary": "Change a repository's owner, to the one holding the access token",
|
||||
"summary": "Change a repository's owner to the currently authenticated user",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -1659,7 +1662,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Repository cron jobs"
|
||||
],
|
||||
"summary": "Get the cron job list",
|
||||
"summary": "List cron jobs",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -1710,7 +1713,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Repository cron jobs"
|
||||
],
|
||||
"summary": "Persist/creat a cron job",
|
||||
"summary": "Create a cron job",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -1755,7 +1758,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Repository cron jobs"
|
||||
],
|
||||
"summary": "Get a cron job by id",
|
||||
"summary": "Get a cron job",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -1837,7 +1840,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Repository cron jobs"
|
||||
],
|
||||
"summary": "Delete a cron job by id",
|
||||
"summary": "Delete a cron job",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -1927,7 +1930,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Pipeline logs"
|
||||
],
|
||||
"summary": "Deletes log",
|
||||
"summary": "Deletes all logs of a pipeline",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -1967,7 +1970,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Pipeline logs"
|
||||
],
|
||||
"summary": "Log information",
|
||||
"summary": "Get logs for a pipeline step",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -2020,7 +2023,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Pipeline logs"
|
||||
],
|
||||
"summary": "Deletes step log",
|
||||
"summary": "Delete step logs of a pipeline",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -2108,7 +2111,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Repositories"
|
||||
],
|
||||
"summary": "Repository permission information",
|
||||
"summary": "Check current authenticated users access to the repository",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -2138,13 +2141,14 @@ const docTemplate = `{
|
||||
},
|
||||
"/repos/{repo_id}/pipelines": {
|
||||
"get": {
|
||||
"description": "Get a list of pipelines for a repository.",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Pipelines"
|
||||
],
|
||||
"summary": "Get pipelines, current running and past ones",
|
||||
"summary": "List repository pipelines",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -2207,7 +2211,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Pipelines"
|
||||
],
|
||||
"summary": "Run/trigger a pipelines",
|
||||
"summary": "Trigger a manual pipeline",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -2252,7 +2256,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Pipelines"
|
||||
],
|
||||
"summary": "Pipeline information by number",
|
||||
"summary": "Get a repositories pipeline",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -2347,7 +2351,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Pipelines"
|
||||
],
|
||||
"summary": "Delete pipeline",
|
||||
"summary": "Delete a pipeline",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -2387,7 +2391,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Pipelines"
|
||||
],
|
||||
"summary": "Start pipelines in gated repos",
|
||||
"summary": "Approve and start a pipeline",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -2430,7 +2434,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Pipelines"
|
||||
],
|
||||
"summary": "Cancels a pipeline",
|
||||
"summary": "Cancel a pipeline",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -2470,7 +2474,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Pipelines"
|
||||
],
|
||||
"summary": "Pipeline configuration",
|
||||
"summary": "Get configuration files for a pipeline",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -2516,7 +2520,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Pipelines"
|
||||
],
|
||||
"summary": "Decline pipelines in gated repos",
|
||||
"summary": "Decline a pipeline",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -2559,7 +2563,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Repositories"
|
||||
],
|
||||
"summary": "List active pull requests",
|
||||
"summary": "List active pull requests of a repository",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -2612,7 +2616,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Repository registries"
|
||||
],
|
||||
"summary": "Get the registry list",
|
||||
"summary": "List registries",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -2663,7 +2667,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Repository registries"
|
||||
],
|
||||
"summary": "Persist/create a registry",
|
||||
"summary": "Create a registry",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -2708,7 +2712,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Repository registries"
|
||||
],
|
||||
"summary": "Get a named registry",
|
||||
"summary": "Get a registry by name",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -2749,7 +2753,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Repository registries"
|
||||
],
|
||||
"summary": "Delete a named registry",
|
||||
"summary": "Delete a registry by name",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -2787,7 +2791,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Repository registries"
|
||||
],
|
||||
"summary": "Update a named registry",
|
||||
"summary": "Update a registry by name",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -2872,7 +2876,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Repository secrets"
|
||||
],
|
||||
"summary": "Get the secret list",
|
||||
"summary": "List repository secrets",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -2923,7 +2927,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Repository secrets"
|
||||
],
|
||||
"summary": "Persist/create a secret",
|
||||
"summary": "Create a repository secret",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -2968,7 +2972,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Repository secrets"
|
||||
],
|
||||
"summary": "Get a named secret",
|
||||
"summary": "Get a repository secret by name",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -3009,7 +3013,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Repository secrets"
|
||||
],
|
||||
"summary": "Delete a named secret",
|
||||
"summary": "Delete a repository secret by name",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -3047,7 +3051,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Repository secrets"
|
||||
],
|
||||
"summary": "Update a named secret",
|
||||
"summary": "Update a repository secret by name",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -3099,7 +3103,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Secrets"
|
||||
],
|
||||
"summary": "Get the global secret list",
|
||||
"summary": "List global secrets",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -3143,7 +3147,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Secrets"
|
||||
],
|
||||
"summary": "Persist/create a global secret",
|
||||
"summary": "Create a global secret",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -3311,14 +3315,14 @@ const docTemplate = `{
|
||||
},
|
||||
"/stream/events": {
|
||||
"get": {
|
||||
"description": "event source streaming for compatibility with quic and http2",
|
||||
"description": "With quic and http2 support",
|
||||
"produces": [
|
||||
"text/plain"
|
||||
],
|
||||
"tags": [
|
||||
"Events"
|
||||
],
|
||||
"summary": "Event stream",
|
||||
"summary": "Stream events like pipeline updates",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
@@ -3334,7 +3338,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Pipeline logs"
|
||||
],
|
||||
"summary": "Log stream",
|
||||
"summary": "Stream logs of a pipeline step",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
@@ -3373,7 +3377,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "Returns the currently authenticated user.",
|
||||
"summary": "Get the currently authenticated user",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -3396,14 +3400,14 @@ const docTemplate = `{
|
||||
},
|
||||
"/user/feed": {
|
||||
"get": {
|
||||
"description": "Feed entries can be used to display information on the latest builds.",
|
||||
"description": "The feed lists the most recent pipeline for the currently authenticated user.",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "A feed entry for a build.",
|
||||
"summary": "Get the currently authenticaed users pipeline feed",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -3418,7 +3422,10 @@ const docTemplate = `{
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Feed"
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Feed"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3433,7 +3440,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "Get user's repos",
|
||||
"summary": "Get user's repositories",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -3523,7 +3530,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Users"
|
||||
],
|
||||
"summary": "Get all users",
|
||||
"summary": "List users",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -3677,7 +3684,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"Users"
|
||||
],
|
||||
"summary": "Change a user",
|
||||
"summary": "Update a user",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
||||
Reference in New Issue
Block a user