feat: api for projects

This commit is contained in:
Dinesh Salunke
2023-11-18 18:32:22 +05:30
parent 6092b81563
commit b6f9d05180
7 changed files with 1396 additions and 58 deletions

View File

@@ -2311,6 +2311,75 @@
}
}
},
"/orgs/{org}/projects": {
"get": {
"produces": [
"application/json"
],
"tags": [
"project"
],
"summary": "List repository projects",
"operationId": "projectListOrgProjects",
"parameters": [
{
"type": "string",
"description": "owner of the repository",
"name": "org",
"in": "path",
"required": true
},
{
"type": "boolean",
"description": "include closed issues or not",
"name": "closed",
"in": "query"
},
{
"type": "integer",
"description": "page number of results to return (1-based)",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "page size of results",
"name": "limit",
"in": "query"
}
]
},
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"project"
],
"summary": "Create a organization project",
"operationId": "projectCreateOrgProject",
"parameters": [
{
"type": "string",
"description": "owner of repo",
"name": "org",
"in": "path",
"required": true
},
{
"name": "project",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/NewProjectPayload"
}
}
]
}
},
"/orgs/{org}/public_members": {
"get": {
"produces": [
@@ -2912,6 +2981,73 @@
}
}
},
"/projects/{id}": {
"get": {
"produces": [
"application/json"
],
"tags": [
"project"
],
"summary": "Get project",
"operationId": "projectGetProject",
"parameters": [
{
"type": "string",
"description": "id of the project",
"name": "id",
"in": "path",
"required": true
}
]
},
"delete": {
"tags": [
"project"
],
"summary": "Delete project",
"operationId": "projectDeleteProject",
"parameters": [
{
"type": "string",
"description": "id of the project",
"name": "id",
"in": "path",
"required": true
}
]
},
"patch": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"project"
],
"summary": "Update project",
"operationId": "projectUpdateProject",
"parameters": [
{
"type": "string",
"description": "id of the project",
"name": "id",
"in": "path",
"required": true
},
{
"name": "project",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateProjectPayload"
}
}
]
}
},
"/repos/issues/search": {
"get": {
"produces": [
@@ -10140,6 +10276,89 @@
}
}
},
"/repos/{owner}/{repo}/projects": {
"get": {
"produces": [
"application/json"
],
"tags": [
"project"
],
"summary": "List repository projects",
"operationId": "projectListRepositoryProjects",
"parameters": [
{
"type": "string",
"description": "owner of the repository",
"name": "owner",
"in": "path",
"required": true
},
{
"type": "string",
"description": "repo",
"name": "repo",
"in": "path",
"required": true
},
{
"type": "boolean",
"description": "include closed issues or not",
"name": "closed",
"in": "query"
},
{
"type": "integer",
"description": "page number of results to return (1-based)",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "page size of results",
"name": "limit",
"in": "query"
}
]
},
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"project"
],
"summary": "Create a repository project",
"operationId": "projectCreateRepositoryProject",
"parameters": [
{
"type": "string",
"description": "owner of repo",
"name": "owner",
"in": "path",
"required": true
},
{
"type": "string",
"description": "repo",
"name": "repo",
"in": "path",
"required": true
},
{
"name": "project",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/NewProjectPayload"
}
}
]
}
},
"/repos/{owner}/{repo}/pulls": {
"get": {
"produces": [
@@ -15481,6 +15700,61 @@
}
}
},
"/user/projects": {
"get": {
"produces": [
"application/json"
],
"tags": [
"project"
],
"summary": "List repository projects",
"operationId": "projectListUserProjects",
"parameters": [
{
"type": "boolean",
"description": "include closed issues or not",
"name": "closed",
"in": "query"
},
{
"type": "integer",
"description": "page number of results to return (1-based)",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "page size of results",
"name": "limit",
"in": "query"
}
]
},
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"project"
],
"summary": "Create a user project",
"operationId": "projectCreateUserProject",
"parameters": [
{
"name": "project",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/NewProjectPayload"
}
}
]
}
},
"/user/repos": {
"get": {
"produces": [
@@ -21310,6 +21584,55 @@
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
"Project": {
"type": "object",
"properties": {
"board_type": {
"type": "integer",
"format": "uint8",
"x-go-name": "BoardType"
},
"closed_at": {
"type": "string",
"format": "date-time",
"x-go-name": "Closed"
},
"created_at": {
"type": "string",
"format": "date-time",
"x-go-name": "Created"
},
"creator": {
"$ref": "#/definitions/User"
},
"description": {
"type": "string",
"x-go-name": "Description"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"is_closed": {
"type": "boolean",
"x-go-name": "IsClosed"
},
"repository": {
"$ref": "#/definitions/RepositoryMeta"
},
"title": {
"type": "string",
"x-go-name": "Title"
},
"updated_at": {
"type": "string",
"format": "date-time",
"x-go-name": "Updated"
}
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
"PublicKey": {
"description": "PublicKey publickey is a user key to push code to repository",
"type": "object",
@@ -23628,6 +23951,21 @@
}
}
},
"Project": {
"description": "Project",
"schema": {
"$ref": "#/definitions/Project"
}
},
"ProjectList": {
"description": "ProjectList",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Project"
}
}
},
"PublicKey": {
"description": "PublicKey",
"schema": {