123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485 |
- {
- "swagger": "2.0",
- "info": {
- "title": "go-common api",
- "description": "api",
- "version": "1.0",
- "contact": {
- "email": "lintanghui@bilibili.com"
- },
- "license": {
- "name": "Apache 2.0",
- "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
- }
- },
- "paths": {
- "/ep/admin/saga/v1/projects": {
- "get": {
- "operationId": "/ep/admin/saga/v1/projects",
- "responses": {
- "200": {
- "description": "服务成功响应内容",
- "schema": {
- "type": "object",
- "properties": {
- "code": {
- "description": "错误码描述",
- "type": "integer"
- },
- "data": {
- "$ref": "#/definitions/ProjectsResp",
- "type": "object"
- },
- "message": {
- "description": "错误码文本描述",
- "type": "string"
- },
- "ttl": {
- "description": "客户端限速时间",
- "type": "integer",
- "format": "int64"
- }
- }
- }
- }
- }
- }
- },
- "/ep/admin/saga/v1/projects/favorite": {
- "get": {
- "operationId": "/ep/admin/saga/v1/projects/favorite",
- "responses": {
- "200": {
- "description": "服务成功响应内容",
- "schema": {
- "type": "object",
- "properties": {
- "code": {
- "description": "错误码描述",
- "type": "integer"
- },
- "data": {
- "$ref": "#/definitions/FavoriteProjectsResp",
- "type": "object"
- },
- "message": {
- "description": "错误码文本描述",
- "type": "string"
- },
- "ttl": {
- "description": "客户端限速时间",
- "type": "integer",
- "format": "int64"
- }
- }
- }
- }
- }
- }
- },
- "/ep/admin/saga/v1/projects/favorite/edit": {
- "post": {
- "operationId": "/ep/admin/saga/v1/projects/favorite/edit",
- "parameters": [
- {
- "in": "query",
- "name": "proj_id",
- "required": true,
- "type": "integer",
- "format": "int64"
- },
- {
- "in": "query",
- "name": "star",
- "required": true,
- "type": "boolean"
- }
- ],
- "responses": {
- "200": {
- "description": "服务成功响应内容",
- "schema": {
- "type": "object",
- "properties": {
- "code": {
- "description": "错误码描述",
- "type": "integer"
- },
- "data": {
- "$ref": "#/definitions/EmptyResp",
- "type": "object"
- },
- "message": {
- "description": "错误码文本描述",
- "type": "string"
- },
- "ttl": {
- "description": "客户端限速时间",
- "type": "integer",
- "format": "int64"
- }
- }
- }
- }
- }
- }
- },
- "/ep/admin/saga/v1/tasks/project": {
- "get": {
- "operationId": "/ep/admin/saga/v1/tasks/project",
- "parameters": [
- {
- "in": "query",
- "name": "ProjID",
- "type": "integer",
- "format": "int64"
- },
- {
- "in": "query",
- "name": "Statuses",
- "description": "3 - running, 4 - waiting, 默认查运行中和等待的任务 默认值 3,4",
- "type": "array"
- }
- ],
- "responses": {
- "200": {
- "description": "服务成功响应内容",
- "schema": {
- "type": "object",
- "properties": {
- "code": {
- "description": "错误码描述",
- "type": "integer"
- },
- "data": {
- "$ref": "#/definitions/TasksResp",
- "type": "object"
- },
- "message": {
- "description": "错误码文本描述",
- "type": "string"
- },
- "ttl": {
- "description": "客户端限速时间",
- "type": "integer",
- "format": "int64"
- }
- }
- }
- }
- }
- }
- },
- "/ep/admin/saga/v1/tasks/simple": {
- "get": {
- "operationId": "/ep/admin/saga/v1/tasks/simple",
- "parameters": [
- {
- "in": "query",
- "name": "Statuses",
- "description": "3 - running, 4 - waiting, 默认查运行中和等待的任务 默认值 3,4",
- "type": "array"
- }
- ],
- "responses": {
- "200": {
- "description": "服务成功响应内容",
- "schema": {
- "type": "object",
- "properties": {
- "code": {
- "description": "错误码描述",
- "type": "integer"
- },
- "data": {
- "$ref": "#/definitions/SimpleTasksResp",
- "type": "object"
- },
- "message": {
- "description": "错误码文本描述",
- "type": "string"
- },
- "ttl": {
- "description": "客户端限速时间",
- "type": "integer",
- "format": "int64"
- }
- }
- }
- }
- }
- }
- },
- "/ep/admin/saga/v1/user": {
- "get": {
- "operationId": "/ep/admin/saga/v1/user",
- "responses": {
- "200": {
- "description": "服务成功响应内容",
- "schema": {
- "type": "object",
- "properties": {
- "code": {
- "description": "错误码描述",
- "type": "integer"
- },
- "data": {
- "$ref": "#/definitions/User",
- "type": "object"
- },
- "message": {
- "description": "错误码文本描述",
- "type": "string"
- },
- "ttl": {
- "description": "客户端限速时间",
- "type": "integer",
- "format": "int64"
- }
- }
- }
- }
- }
- }
- }
- },
- "definitions": {
- "EmptyResp": {
- "title": "EmptyResp",
- "description": "EmptyResp resp for response without data",
- "type": "object"
- },
- "FavoriteProjectsResp": {
- "title": "FavoriteProjectsResp",
- "description": "FavoriteProjectsResp resp for favorite projects",
- "type": "object",
- "properties": {
- "projects": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Project",
- "type": "object"
- }
- }
- }
- },
- "MyProject": {
- "title": "MyProject",
- "description": "MyProject mask as star",
- "required": [
- "is_star"
- ],
- "type": "object",
- "properties": {
- "is_star": {
- "type": "boolean"
- }
- }
- },
- "Project": {
- "title": "Project",
- "description": "Project def",
- "required": [
- "name",
- "description",
- "web_url",
- "avatar_url",
- "git_ssh_url",
- "git_http_url",
- "namespace",
- "visibility_level",
- "path_with_namespace",
- "default_branch",
- "homepage",
- "url",
- "ssh_url",
- "http_url"
- ],
- "type": "object",
- "properties": {
- "avatar_url": {
- "type": "string"
- },
- "default_branch": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "git_http_url": {
- "type": "string"
- },
- "git_ssh_url": {
- "type": "string"
- },
- "homepage": {
- "type": "string"
- },
- "http_url": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "namespace": {
- "type": "string"
- },
- "path_with_namespace": {
- "type": "string"
- },
- "ssh_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "visibility_level": {
- "type": "integer",
- "format": "int64"
- },
- "web_url": {
- "type": "string"
- }
- }
- },
- "ProjectsResp": {
- "title": "ProjectsResp",
- "description": "ProjectsResp resp for query projects with start mark",
- "required": [
- "projects"
- ],
- "type": "object",
- "properties": {
- "projects": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/MyProject",
- "type": "object"
- }
- }
- }
- },
- "SimpleProject": {
- "title": "SimpleProject",
- "description": "SimpleProject with project id, project name and tasks",
- "required": [
- "proj_id",
- "proj_name",
- "tasks"
- ],
- "type": "object",
- "properties": {
- "proj_id": {
- "type": "integer",
- "format": "int64"
- },
- "proj_name": {
- "type": "string"
- },
- "tasks": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/SimpleTask",
- "type": "object"
- }
- }
- }
- },
- "SimpleTasksResp": {
- "title": "SimpleTasksResp",
- "description": "SimpleTasksResp resp for simple tasks",
- "required": [
- "projects"
- ],
- "type": "object",
- "properties": {
- "projects": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/SimpleProject",
- "type": "object"
- }
- }
- }
- },
- "Task": {
- "title": "Task",
- "description": "Task def",
- "type": "object",
- "properties": {
- "author": {
- "type": "string"
- },
- "event_type": {
- "type": "string"
- },
- "id": {
- "type": "integer",
- "format": "int64"
- },
- "mr_id": {
- "type": "integer",
- "format": "int64"
- },
- "proj_id": {
- "type": "integer",
- "format": "int64"
- },
- "source_branch": {
- "type": "string"
- },
- "status": {
- "type": "integer",
- "format": "int64"
- },
- "target_branch": {
- "type": "string"
- },
- "task_details": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "url": {
- "type": "string"
- }
- }
- },
- "TasksResp": {
- "title": "TasksResp",
- "description": "TasksResp resp for tasks",
- "type": "object",
- "properties": {
- "tasks": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Task",
- "type": "object"
- }
- }
- }
- },
- "User": {
- "title": "User",
- "description": "User def",
- "required": [
- "name",
- "username",
- "avatar_url"
- ],
- "type": "object",
- "properties": {
- "avatar_url": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "username": {
- "type": "string"
- }
- }
- }
- }
- }
|