From e5058e124e2f763920fdb7f89068add48982054a Mon Sep 17 00:00:00 2001 From: "jixing.ma" Date: Thu, 16 Jan 2020 16:21:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=8E=B7=E5=8F=96=E9=82=AE?= =?UTF-8?q?=E7=AE=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .classpath | 8 - .gitignore | 35 +- .project | 23 - .settings/org.eclipse.buildship.core.prefs | 2 - README.md | 21 +- build.gradle | 4 +- build.sbt | 4 +- config.json | 4 +- docs/BranchProtectionPutParam.md | 10 + docs/Email.md | 12 + docs/EmailsApi.md | 54 + docs/RepoPatchParam.md | 17 + docs/RepositoriesApi.md | 30 +- pom.xml | 6 +- settings.gradle | 2 +- src/main/java/com/gitee/ApiException.java | 2 +- src/main/java/com/gitee/Configuration.java | 2 +- src/main/java/com/gitee/Pair.java | 2 +- src/main/java/com/gitee/StringUtil.java | 2 +- src/main/java/com/gitee/api/EmailsApi.java | 176 + .../java/com/gitee/api/RepositoriesApi.java | 115 +- src/main/java/com/gitee/auth/ApiKeyAuth.java | 2 +- src/main/java/com/gitee/auth/OAuth.java | 2 +- src/main/java/com/gitee/model/BasicInfo.java | 2 +- src/main/java/com/gitee/model/Blob.java | 2 +- src/main/java/com/gitee/model/Branch.java | 2 +- .../gitee/model/BranchProtectionPutParam.java | 94 + src/main/java/com/gitee/model/Code.java | 2 +- .../java/com/gitee/model/CodeComment.java | 2 +- src/main/java/com/gitee/model/CodeForks.java | 2 +- .../com/gitee/model/CodeForksHistory.java | 2 +- src/main/java/com/gitee/model/Commit.java | 2 +- .../java/com/gitee/model/CommitContent.java | 2 +- src/main/java/com/gitee/model/Compare.java | 2 +- .../java/com/gitee/model/CompleteBranch.java | 2 +- src/main/java/com/gitee/model/Content.java | 2 +- .../java/com/gitee/model/ContentBasic.java | 2 +- .../java/com/gitee/model/Contributor.java | 2 +- src/main/java/com/gitee/model/Email.java | 150 + .../java/com/gitee/model/EnterpriseBasic.java | 2 +- .../com/gitee/model/EnterpriseMember.java | 2 +- src/main/java/com/gitee/model/Event.java | 2 +- src/main/java/com/gitee/model/Group.java | 2 +- .../java/com/gitee/model/GroupDetail.java | 2 +- .../java/com/gitee/model/GroupMember.java | 2 +- src/main/java/com/gitee/model/Hook.java | 2 +- src/main/java/com/gitee/model/Issue.java | 2 +- .../gitee/model/IssueCommentPostParam.java | 2 +- .../com/gitee/model/IssueUpdateParam.java | 2 +- src/main/java/com/gitee/model/Label.java | 2 +- src/main/java/com/gitee/model/Milestone.java | 2 +- src/main/java/com/gitee/model/Namespace.java | 2 +- .../java/com/gitee/model/NamespaceMini.java | 2 +- src/main/java/com/gitee/model/Note.java | 2 +- src/main/java/com/gitee/model/OperateLog.java | 2 +- .../java/com/gitee/model/ProgramBasic.java | 2 +- src/main/java/com/gitee/model/Project.java | 2 +- .../java/com/gitee/model/ProjectBasic.java | 2 +- .../java/com/gitee/model/ProjectMember.java | 2 +- .../gitee/model/ProjectMemberPermission.java | 2 +- .../gitee/model/ProjectMemberPutParam.java | 2 +- .../java/com/gitee/model/PullRequest.java | 2 +- .../model/PullRequestCommentPostParam.java | 2 +- .../com/gitee/model/PullRequestComments.java | 2 +- .../com/gitee/model/PullRequestCommits.java | 2 +- .../com/gitee/model/PullRequestFiles.java | 2 +- .../gitee/model/PullRequestMergePutParam.java | 2 +- .../gitee/model/PullRequestUpdateParam.java | 2 +- src/main/java/com/gitee/model/Release.java | 2 +- src/main/java/com/gitee/model/RepoCommit.java | 2 +- .../java/com/gitee/model/RepoPatchParam.java | 255 + .../com/gitee/model/RepositoryPostParam.java | 2 +- src/main/java/com/gitee/model/SSHKey.java | 2 +- .../java/com/gitee/model/SSHKeyBasic.java | 2 +- src/main/java/com/gitee/model/Tag.java | 2 +- src/main/java/com/gitee/model/Tree.java | 2 +- src/main/java/com/gitee/model/User.java | 2 +- src/main/java/com/gitee/model/UserBasic.java | 2 +- .../java/com/gitee/model/UserMessage.java | 2 +- .../java/com/gitee/model/UserMessageList.java | 2 +- src/main/java/com/gitee/model/UserMini.java | 2 +- .../com/gitee/model/UserNotification.java | 2 +- .../gitee/model/UserNotificationCount.java | 2 +- .../com/gitee/model/UserNotificationList.java | 2 +- .../model/UserNotificationNamespace.java | 2 +- .../gitee/model/UserNotificationSubject.java | 2 +- src/main/java/com/gitee/model/WeekReport.java | 2 +- .../java/com/gitee/api/EmailsApiTest.java | 51 + .../com/gitee/api/RepositoriesApiTest.java | 17 +- swagger.yaml | 32166 ++++++++-------- 90 files changed, 17091 insertions(+), 16299 deletions(-) delete mode 100644 .classpath delete mode 100644 .project delete mode 100644 .settings/org.eclipse.buildship.core.prefs create mode 100644 docs/BranchProtectionPutParam.md create mode 100644 docs/Email.md create mode 100644 docs/EmailsApi.md create mode 100644 docs/RepoPatchParam.md create mode 100644 src/main/java/com/gitee/api/EmailsApi.java create mode 100644 src/main/java/com/gitee/model/BranchProtectionPutParam.java create mode 100644 src/main/java/com/gitee/model/Email.java create mode 100644 src/main/java/com/gitee/model/RepoPatchParam.java create mode 100644 src/test/java/com/gitee/api/EmailsApiTest.java diff --git a/.classpath b/.classpath deleted file mode 100644 index 9f084aa..0000000 --- a/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/.gitignore b/.gitignore index c0c4b83..71fa2ad 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,3 @@ -<<<<<<< HEAD -*.class - -======= # Compiled class file *.class @@ -11,28 +7,25 @@ # BlueJ files *.ctxt ->>>>>>> 4730ca1b0292a9466e774fdeb9c9a5962a6abd4f # Mobile Tools for Java (J2ME) .mtj.tmp/ +# IntelliJ +*.iml +*.ipr +*.iws +.idea/ +out/ +.settings +.swagger-codegen +.classpath +.project +.swagger-codegen-ignore +.travis.yml + # Package Files # *.jar *.war -<<<<<<< HEAD -*.ear - -# exclude jar for gradle wrapper -!gradle/wrapper/*.jar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - -# build files -**/target -target -.gradle -build -======= *.nar *.ear *.zip @@ -41,4 +34,4 @@ build # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* ->>>>>>> 4730ca1b0292a9466e774fdeb9c9a5962a6abd4f + diff --git a/.project b/.project deleted file mode 100644 index 193b87b..0000000 --- a/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - swagger-java-client - Project java-gitee created by Buildship. - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - - org.eclipse.buildship.core.gradleprojectnature - org.eclipse.jdt.core.javanature - - diff --git a/.settings/org.eclipse.buildship.core.prefs b/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index e889521..0000000 --- a/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,2 +0,0 @@ -connection.project.dir= -eclipse.preferences.version=1 diff --git a/README.md b/README.md index fc71047..2789fca 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# gitee +# gitee-java-sdk ## Requirements @@ -25,12 +25,17 @@ Refer to the [official documentation](https://maven.apache.org/plugins/maven-dep Add this dependency to your project's POM: ```xml + + + jitpack.io + https://jitpack.io + + - com.gitee - gitee - 1.0.0 - compile - + com.gitee.openkylin + java-gitee + master-SNAPSHOT + ``` ### Gradle users @@ -38,7 +43,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.gitee:gitee:1.0.0" +compile "com.gitee.openkylin:gitee-java-sdk:1.0.0" ``` ### Others @@ -49,7 +54,7 @@ At first generate the JAR by executing: Then manually install the following JARs: -* target/gitee-1.0.0.jar +* target/gitee-java-sdk-1.0.0.jar * target/lib/*.jar ## Getting Started diff --git a/build.gradle b/build.gradle index d76e354..af8cf61 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'idea' apply plugin: 'eclipse' -group = 'com.gitee' +group = 'com.gitee.openkylin' version = '1.0.0' buildscript { @@ -83,7 +83,7 @@ if(hasProperty('target') && target == 'android') { install { repositories.mavenInstaller { - pom.artifactId = 'gitee' + pom.artifactId = 'gitee-java-sdk' } } diff --git a/build.sbt b/build.sbt index f2f1952..a913dc2 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ lazy val root = (project in file(".")). settings( - organization := "com.gitee", - name := "gitee", + organization := "com.gitee.openkylin", + name := "gitee-java-sdk", version := "1.0.0", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), diff --git a/config.json b/config.json index 45d4eab..31e0fac 100644 --- a/config.json +++ b/config.json @@ -1,6 +1,6 @@ { "modelPackage":"com.gitee.model", "apiPackage":"com.gitee.api", - "groupId":"com.gitee", - "artifactId":"gitee" + "groupId":"com.gitee.openkylin", + "artifactId":"gitee-java-sdk" } diff --git a/docs/BranchProtectionPutParam.md b/docs/BranchProtectionPutParam.md new file mode 100644 index 0000000..b401611 --- /dev/null +++ b/docs/BranchProtectionPutParam.md @@ -0,0 +1,10 @@ + +# BranchProtectionPutParam + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accessToken** | **String** | 用户授权码 | [optional] + + + diff --git a/docs/Email.md b/docs/Email.md new file mode 100644 index 0000000..29dcad4 --- /dev/null +++ b/docs/Email.md @@ -0,0 +1,12 @@ + +# Email + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | | [optional] +**state** | **String** | | [optional] +**scope** | **List<String>** | | [optional] + + + diff --git a/docs/EmailsApi.md b/docs/EmailsApi.md new file mode 100644 index 0000000..81cee24 --- /dev/null +++ b/docs/EmailsApi.md @@ -0,0 +1,54 @@ +# EmailsApi + +All URIs are relative to *https://gitee.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getV5Emails**](EmailsApi.md#getV5Emails) | **GET** /v5/emails | 获取授权用户的所有邮箱 + + + +# **getV5Emails** +> List<Email> getV5Emails(accessToken) + +获取授权用户的所有邮箱 + +获取授权用户的所有邮箱 + +### Example +```java +// Import classes: +//import com.gitee.ApiException; +//import com.gitee.api.EmailsApi; + + +EmailsApi apiInstance = new EmailsApi(); +String accessToken = "accessToken_example"; // String | 用户授权码 +try { + List result = apiInstance.getV5Emails(accessToken); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling EmailsApi#getV5Emails"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accessToken** | **String**| 用户授权码 | [optional] + +### Return type + +[**List<Email>**](Email.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, multipart/form-data + - **Accept**: application/json + diff --git a/docs/RepoPatchParam.md b/docs/RepoPatchParam.md new file mode 100644 index 0000000..285da57 --- /dev/null +++ b/docs/RepoPatchParam.md @@ -0,0 +1,17 @@ + +# RepoPatchParam + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accessToken** | **String** | 用户授权码 | [optional] +**name** | **String** | 仓库名称 | [optional] +**description** | **String** | 仓库描述 | [optional] +**homepage** | **String** | 主页(eg: https://gitee.com) | [optional] +**hasIssues** | **String** | 允许提Issue与否。默认: 允许(true) | [optional] +**hasWiki** | **String** | 提供Wiki与否。默认: 提供(true) | [optional] +**_private** | **String** | 仓库公开或私有。 | [optional] +**defaultBranch** | **String** | 更新默认分支 | [optional] + + + diff --git a/docs/RepositoriesApi.md b/docs/RepositoriesApi.md index a025f9b..9c2b6fe 100644 --- a/docs/RepositoriesApi.md +++ b/docs/RepositoriesApi.md @@ -1991,7 +1991,7 @@ No authorization required # **patchV5ReposOwnerRepo** -> Project patchV5ReposOwnerRepo(owner, repo, name, accessToken, description, homepage, hasIssues, hasWiki, _private, defaultBranch) +> Project patchV5ReposOwnerRepo(owner, repo, body) 更新仓库设置 @@ -2007,16 +2007,9 @@ No authorization required RepositoriesApi apiInstance = new RepositoriesApi(); String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path) String repo = "repo_example"; // String | 仓库路径(path) -String name = "name_example"; // String | 仓库名称 -String accessToken = "accessToken_example"; // String | 用户授权码 -String description = "description_example"; // String | 仓库描述 -String homepage = "homepage_example"; // String | 主页(eg: https://gitee.com) -Boolean hasIssues = true; // Boolean | 允许提Issue与否。默认: 允许(true) -Boolean hasWiki = true; // Boolean | 提供Wiki与否。默认: 提供(true) -Boolean _private = true; // Boolean | 仓库公开或私有。 -String defaultBranch = "defaultBranch_example"; // String | 更新默认分支 +RepoPatchParam body = new RepoPatchParam(); // RepoPatchParam | repo patch param try { - Project result = apiInstance.patchV5ReposOwnerRepo(owner, repo, name, accessToken, description, homepage, hasIssues, hasWiki, _private, defaultBranch); + Project result = apiInstance.patchV5ReposOwnerRepo(owner, repo, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling RepositoriesApi#patchV5ReposOwnerRepo"); @@ -2030,14 +2023,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| 仓库所属空间地址(企业、组织或个人的地址path) | **repo** | **String**| 仓库路径(path) | - **name** | **String**| 仓库名称 | - **accessToken** | **String**| 用户授权码 | [optional] - **description** | **String**| 仓库描述 | [optional] - **homepage** | **String**| 主页(eg: https://gitee.com) | [optional] - **hasIssues** | **Boolean**| 允许提Issue与否。默认: 允许(true) | [optional] [default to true] - **hasWiki** | **Boolean**| 提供Wiki与否。默认: 提供(true) | [optional] [default to true] - **_private** | **Boolean**| 仓库公开或私有。 | [optional] - **defaultBranch** | **String**| 更新默认分支 | [optional] + **body** | [**RepoPatchParam**](RepoPatchParam.md)| repo patch param | ### Return type @@ -2733,7 +2719,7 @@ No authorization required # **putV5ReposOwnerRepoBranchesBranchProtection** -> CompleteBranch putV5ReposOwnerRepoBranchesBranchProtection(owner, repo, branch, accessToken) +> CompleteBranch putV5ReposOwnerRepoBranchesBranchProtection(owner, repo, branch, body) 设置分支保护 @@ -2750,9 +2736,9 @@ RepositoriesApi apiInstance = new RepositoriesApi(); String owner = "owner_example"; // String | 仓库所属空间地址(企业、组织或个人的地址path) String repo = "repo_example"; // String | 仓库路径(path) String branch = "branch_example"; // String | 分支名称 -String accessToken = "accessToken_example"; // String | 用户授权码 +BranchProtectionPutParam body = new BranchProtectionPutParam(); // BranchProtectionPutParam | 设置分支保护参数 try { - CompleteBranch result = apiInstance.putV5ReposOwnerRepoBranchesBranchProtection(owner, repo, branch, accessToken); + CompleteBranch result = apiInstance.putV5ReposOwnerRepoBranchesBranchProtection(owner, repo, branch, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling RepositoriesApi#putV5ReposOwnerRepoBranchesBranchProtection"); @@ -2767,7 +2753,7 @@ Name | Type | Description | Notes **owner** | **String**| 仓库所属空间地址(企业、组织或个人的地址path) | **repo** | **String**| 仓库路径(path) | **branch** | **String**| 分支名称 | - **accessToken** | **String**| 用户授权码 | [optional] + **body** | [**BranchProtectionPutParam**](BranchProtectionPutParam.md)| 设置分支保护参数 | ### Return type diff --git a/pom.xml b/pom.xml index 6ef301e..9c7d435 100644 --- a/pom.xml +++ b/pom.xml @@ -1,10 +1,10 @@ 4.0.0 - com.gitee - gitee + com.gitee.openkylin + gitee-java-sdk jar - gitee + gitee-java-sdk 1.0.0 https://github.com/swagger-api/swagger-codegen Swagger Java diff --git a/settings.gradle b/settings.gradle index 590e201..24697dc 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1 @@ -rootProject.name = "gitee" \ No newline at end of file +rootProject.name = "gitee-java-sdk" \ No newline at end of file diff --git a/src/main/java/com/gitee/ApiException.java b/src/main/java/com/gitee/ApiException.java index f04a47a..8c3f0fd 100644 --- a/src/main/java/com/gitee/ApiException.java +++ b/src/main/java/com/gitee/ApiException.java @@ -16,7 +16,7 @@ package com.gitee; import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/com/gitee/Configuration.java b/src/main/java/com/gitee/Configuration.java index 545e6cc..2fdbd27 100644 --- a/src/main/java/com/gitee/Configuration.java +++ b/src/main/java/com/gitee/Configuration.java @@ -13,7 +13,7 @@ package com.gitee; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class Configuration { private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/com/gitee/Pair.java b/src/main/java/com/gitee/Pair.java index 4c5278c..fcf28b0 100644 --- a/src/main/java/com/gitee/Pair.java +++ b/src/main/java/com/gitee/Pair.java @@ -13,7 +13,7 @@ package com.gitee; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/com/gitee/StringUtil.java b/src/main/java/com/gitee/StringUtil.java index 5047d6f..b481725 100644 --- a/src/main/java/com/gitee/StringUtil.java +++ b/src/main/java/com/gitee/StringUtil.java @@ -13,7 +13,7 @@ package com.gitee; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/com/gitee/api/EmailsApi.java b/src/main/java/com/gitee/api/EmailsApi.java new file mode 100644 index 0000000..581ef5e --- /dev/null +++ b/src/main/java/com/gitee/api/EmailsApi.java @@ -0,0 +1,176 @@ +/* + * 码云 Open API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 5.3.2 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package com.gitee.api; + +import com.gitee.ApiCallback; +import com.gitee.ApiClient; +import com.gitee.ApiException; +import com.gitee.ApiResponse; +import com.gitee.Configuration; +import com.gitee.Pair; +import com.gitee.ProgressRequestBody; +import com.gitee.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.gitee.model.Email; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class EmailsApi { + private ApiClient apiClient; + + public EmailsApi() { + this(Configuration.getDefaultApiClient()); + } + + public EmailsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Build call for getV5Emails + * @param accessToken 用户授权码 (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getV5EmailsCall(String accessToken, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v5/emails"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (accessToken != null) + localVarQueryParams.addAll(apiClient.parameterToPair("access_token", accessToken)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getV5EmailsValidateBeforeCall(String accessToken, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = getV5EmailsCall(accessToken, progressListener, progressRequestListener); + return call; + + } + + /** + * 获取授权用户的所有邮箱 + * 获取授权用户的所有邮箱 + * @param accessToken 用户授权码 (optional) + * @return List<Email> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List getV5Emails(String accessToken) throws ApiException { + ApiResponse> resp = getV5EmailsWithHttpInfo(accessToken); + return resp.getData(); + } + + /** + * 获取授权用户的所有邮箱 + * 获取授权用户的所有邮箱 + * @param accessToken 用户授权码 (optional) + * @return ApiResponse<List<Email>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> getV5EmailsWithHttpInfo(String accessToken) throws ApiException { + com.squareup.okhttp.Call call = getV5EmailsValidateBeforeCall(accessToken, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * 获取授权用户的所有邮箱 (asynchronously) + * 获取授权用户的所有邮箱 + * @param accessToken 用户授权码 (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getV5EmailsAsync(String accessToken, final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getV5EmailsValidateBeforeCall(accessToken, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } +} diff --git a/src/main/java/com/gitee/api/RepositoriesApi.java b/src/main/java/com/gitee/api/RepositoriesApi.java index b8504da..4d2c3f3 100644 --- a/src/main/java/com/gitee/api/RepositoriesApi.java +++ b/src/main/java/com/gitee/api/RepositoriesApi.java @@ -28,6 +28,7 @@ import java.io.IOException; import com.gitee.model.Branch; +import com.gitee.model.BranchProtectionPutParam; import com.gitee.model.CommitContent; import com.gitee.model.Compare; import com.gitee.model.CompleteBranch; @@ -40,6 +41,7 @@ import com.gitee.model.ProjectMemberPermission; import com.gitee.model.ProjectMemberPutParam; import com.gitee.model.Release; import com.gitee.model.RepoCommit; +import com.gitee.model.RepoPatchParam; import com.gitee.model.RepositoryPostParam; import com.gitee.model.SSHKey; import com.gitee.model.SSHKeyBasic; @@ -5619,21 +5621,14 @@ public class RepositoriesApi { * Build call for patchV5ReposOwnerRepo * @param owner 仓库所属空间地址(企业、组织或个人的地址path) (required) * @param repo 仓库路径(path) (required) - * @param name 仓库名称 (required) - * @param accessToken 用户授权码 (optional) - * @param description 仓库描述 (optional) - * @param homepage 主页(eg: https://gitee.com) (optional) - * @param hasIssues 允许提Issue与否。默认: 允许(true) (optional, default to true) - * @param hasWiki 提供Wiki与否。默认: 提供(true) (optional, default to true) - * @param _private 仓库公开或私有。 (optional) - * @param defaultBranch 更新默认分支 (optional) + * @param body repo patch param (required) * @param progressListener Progress listener * @param progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public com.squareup.okhttp.Call patchV5ReposOwnerRepoCall(String owner, String repo, String name, String accessToken, String description, String homepage, Boolean hasIssues, Boolean hasWiki, Boolean _private, String defaultBranch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + public com.squareup.okhttp.Call patchV5ReposOwnerRepoCall(String owner, String repo, RepoPatchParam body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; // create path and map variables String localVarPath = "/v5/repos/{owner}/{repo}" @@ -5646,22 +5641,6 @@ public class RepositoriesApi { Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (accessToken != null) - localVarFormParams.put("access_token", accessToken); - if (name != null) - localVarFormParams.put("name", name); - if (description != null) - localVarFormParams.put("description", description); - if (homepage != null) - localVarFormParams.put("homepage", homepage); - if (hasIssues != null) - localVarFormParams.put("has_issues", hasIssues); - if (hasWiki != null) - localVarFormParams.put("has_wiki", hasWiki); - if (_private != null) - localVarFormParams.put("private", _private); - if (defaultBranch != null) - localVarFormParams.put("default_branch", defaultBranch); final String[] localVarAccepts = { "application/json" @@ -5692,7 +5671,7 @@ public class RepositoriesApi { } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call patchV5ReposOwnerRepoValidateBeforeCall(String owner, String repo, String name, String accessToken, String description, String homepage, Boolean hasIssues, Boolean hasWiki, Boolean _private, String defaultBranch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call patchV5ReposOwnerRepoValidateBeforeCall(String owner, String repo, RepoPatchParam body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'owner' is set if (owner == null) { @@ -5704,13 +5683,13 @@ public class RepositoriesApi { throw new ApiException("Missing the required parameter 'repo' when calling patchV5ReposOwnerRepo(Async)"); } - // verify the required parameter 'name' is set - if (name == null) { - throw new ApiException("Missing the required parameter 'name' when calling patchV5ReposOwnerRepo(Async)"); + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling patchV5ReposOwnerRepo(Async)"); } - com.squareup.okhttp.Call call = patchV5ReposOwnerRepoCall(owner, repo, name, accessToken, description, homepage, hasIssues, hasWiki, _private, defaultBranch, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = patchV5ReposOwnerRepoCall(owner, repo, body, progressListener, progressRequestListener); return call; } @@ -5720,19 +5699,12 @@ public class RepositoriesApi { * 更新仓库设置 * @param owner 仓库所属空间地址(企业、组织或个人的地址path) (required) * @param repo 仓库路径(path) (required) - * @param name 仓库名称 (required) - * @param accessToken 用户授权码 (optional) - * @param description 仓库描述 (optional) - * @param homepage 主页(eg: https://gitee.com) (optional) - * @param hasIssues 允许提Issue与否。默认: 允许(true) (optional, default to true) - * @param hasWiki 提供Wiki与否。默认: 提供(true) (optional, default to true) - * @param _private 仓库公开或私有。 (optional) - * @param defaultBranch 更新默认分支 (optional) + * @param body repo patch param (required) * @return Project * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public Project patchV5ReposOwnerRepo(String owner, String repo, String name, String accessToken, String description, String homepage, Boolean hasIssues, Boolean hasWiki, Boolean _private, String defaultBranch) throws ApiException { - ApiResponse resp = patchV5ReposOwnerRepoWithHttpInfo(owner, repo, name, accessToken, description, homepage, hasIssues, hasWiki, _private, defaultBranch); + public Project patchV5ReposOwnerRepo(String owner, String repo, RepoPatchParam body) throws ApiException { + ApiResponse resp = patchV5ReposOwnerRepoWithHttpInfo(owner, repo, body); return resp.getData(); } @@ -5741,19 +5713,12 @@ public class RepositoriesApi { * 更新仓库设置 * @param owner 仓库所属空间地址(企业、组织或个人的地址path) (required) * @param repo 仓库路径(path) (required) - * @param name 仓库名称 (required) - * @param accessToken 用户授权码 (optional) - * @param description 仓库描述 (optional) - * @param homepage 主页(eg: https://gitee.com) (optional) - * @param hasIssues 允许提Issue与否。默认: 允许(true) (optional, default to true) - * @param hasWiki 提供Wiki与否。默认: 提供(true) (optional, default to true) - * @param _private 仓库公开或私有。 (optional) - * @param defaultBranch 更新默认分支 (optional) + * @param body repo patch param (required) * @return ApiResponse<Project> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse patchV5ReposOwnerRepoWithHttpInfo(String owner, String repo, String name, String accessToken, String description, String homepage, Boolean hasIssues, Boolean hasWiki, Boolean _private, String defaultBranch) throws ApiException { - com.squareup.okhttp.Call call = patchV5ReposOwnerRepoValidateBeforeCall(owner, repo, name, accessToken, description, homepage, hasIssues, hasWiki, _private, defaultBranch, null, null); + public ApiResponse patchV5ReposOwnerRepoWithHttpInfo(String owner, String repo, RepoPatchParam body) throws ApiException { + com.squareup.okhttp.Call call = patchV5ReposOwnerRepoValidateBeforeCall(owner, repo, body, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -5763,19 +5728,12 @@ public class RepositoriesApi { * 更新仓库设置 * @param owner 仓库所属空间地址(企业、组织或个人的地址path) (required) * @param repo 仓库路径(path) (required) - * @param name 仓库名称 (required) - * @param accessToken 用户授权码 (optional) - * @param description 仓库描述 (optional) - * @param homepage 主页(eg: https://gitee.com) (optional) - * @param hasIssues 允许提Issue与否。默认: 允许(true) (optional, default to true) - * @param hasWiki 提供Wiki与否。默认: 提供(true) (optional, default to true) - * @param _private 仓库公开或私有。 (optional) - * @param defaultBranch 更新默认分支 (optional) + * @param body repo patch param (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public com.squareup.okhttp.Call patchV5ReposOwnerRepoAsync(String owner, String repo, String name, String accessToken, String description, String homepage, Boolean hasIssues, Boolean hasWiki, Boolean _private, String defaultBranch, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call patchV5ReposOwnerRepoAsync(String owner, String repo, RepoPatchParam body, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -5796,7 +5754,7 @@ public class RepositoriesApi { }; } - com.squareup.okhttp.Call call = patchV5ReposOwnerRepoValidateBeforeCall(owner, repo, name, accessToken, description, homepage, hasIssues, hasWiki, _private, defaultBranch, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = patchV5ReposOwnerRepoValidateBeforeCall(owner, repo, body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; @@ -7834,14 +7792,14 @@ public class RepositoriesApi { * @param owner 仓库所属空间地址(企业、组织或个人的地址path) (required) * @param repo 仓库路径(path) (required) * @param branch 分支名称 (required) - * @param accessToken 用户授权码 (optional) + * @param body 设置分支保护参数 (required) * @param progressListener Progress listener * @param progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public com.squareup.okhttp.Call putV5ReposOwnerRepoBranchesBranchProtectionCall(String owner, String repo, String branch, String accessToken, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + public com.squareup.okhttp.Call putV5ReposOwnerRepoBranchesBranchProtectionCall(String owner, String repo, String branch, BranchProtectionPutParam body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; // create path and map variables String localVarPath = "/v5/repos/{owner}/{repo}/branches/{branch}/protection" @@ -7855,8 +7813,6 @@ public class RepositoriesApi { Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (accessToken != null) - localVarFormParams.put("access_token", accessToken); final String[] localVarAccepts = { "application/json" @@ -7887,7 +7843,7 @@ public class RepositoriesApi { } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call putV5ReposOwnerRepoBranchesBranchProtectionValidateBeforeCall(String owner, String repo, String branch, String accessToken, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call putV5ReposOwnerRepoBranchesBranchProtectionValidateBeforeCall(String owner, String repo, String branch, BranchProtectionPutParam body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'owner' is set if (owner == null) { @@ -7904,8 +7860,13 @@ public class RepositoriesApi { throw new ApiException("Missing the required parameter 'branch' when calling putV5ReposOwnerRepoBranchesBranchProtection(Async)"); } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling putV5ReposOwnerRepoBranchesBranchProtection(Async)"); + } + - com.squareup.okhttp.Call call = putV5ReposOwnerRepoBranchesBranchProtectionCall(owner, repo, branch, accessToken, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = putV5ReposOwnerRepoBranchesBranchProtectionCall(owner, repo, branch, body, progressListener, progressRequestListener); return call; } @@ -7916,12 +7877,12 @@ public class RepositoriesApi { * @param owner 仓库所属空间地址(企业、组织或个人的地址path) (required) * @param repo 仓库路径(path) (required) * @param branch 分支名称 (required) - * @param accessToken 用户授权码 (optional) + * @param body 设置分支保护参数 (required) * @return CompleteBranch * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public CompleteBranch putV5ReposOwnerRepoBranchesBranchProtection(String owner, String repo, String branch, String accessToken) throws ApiException { - ApiResponse resp = putV5ReposOwnerRepoBranchesBranchProtectionWithHttpInfo(owner, repo, branch, accessToken); + public CompleteBranch putV5ReposOwnerRepoBranchesBranchProtection(String owner, String repo, String branch, BranchProtectionPutParam body) throws ApiException { + ApiResponse resp = putV5ReposOwnerRepoBranchesBranchProtectionWithHttpInfo(owner, repo, branch, body); return resp.getData(); } @@ -7931,12 +7892,12 @@ public class RepositoriesApi { * @param owner 仓库所属空间地址(企业、组织或个人的地址path) (required) * @param repo 仓库路径(path) (required) * @param branch 分支名称 (required) - * @param accessToken 用户授权码 (optional) + * @param body 设置分支保护参数 (required) * @return ApiResponse<CompleteBranch> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse putV5ReposOwnerRepoBranchesBranchProtectionWithHttpInfo(String owner, String repo, String branch, String accessToken) throws ApiException { - com.squareup.okhttp.Call call = putV5ReposOwnerRepoBranchesBranchProtectionValidateBeforeCall(owner, repo, branch, accessToken, null, null); + public ApiResponse putV5ReposOwnerRepoBranchesBranchProtectionWithHttpInfo(String owner, String repo, String branch, BranchProtectionPutParam body) throws ApiException { + com.squareup.okhttp.Call call = putV5ReposOwnerRepoBranchesBranchProtectionValidateBeforeCall(owner, repo, branch, body, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -7947,12 +7908,12 @@ public class RepositoriesApi { * @param owner 仓库所属空间地址(企业、组织或个人的地址path) (required) * @param repo 仓库路径(path) (required) * @param branch 分支名称 (required) - * @param accessToken 用户授权码 (optional) + * @param body 设置分支保护参数 (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public com.squareup.okhttp.Call putV5ReposOwnerRepoBranchesBranchProtectionAsync(String owner, String repo, String branch, String accessToken, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call putV5ReposOwnerRepoBranchesBranchProtectionAsync(String owner, String repo, String branch, BranchProtectionPutParam body, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -7973,7 +7934,7 @@ public class RepositoriesApi { }; } - com.squareup.okhttp.Call call = putV5ReposOwnerRepoBranchesBranchProtectionValidateBeforeCall(owner, repo, branch, accessToken, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = putV5ReposOwnerRepoBranchesBranchProtectionValidateBeforeCall(owner, repo, branch, body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; diff --git a/src/main/java/com/gitee/auth/ApiKeyAuth.java b/src/main/java/com/gitee/auth/ApiKeyAuth.java index e9b6310..c04f9b0 100644 --- a/src/main/java/com/gitee/auth/ApiKeyAuth.java +++ b/src/main/java/com/gitee/auth/ApiKeyAuth.java @@ -18,7 +18,7 @@ import com.gitee.Pair; import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/com/gitee/auth/OAuth.java b/src/main/java/com/gitee/auth/OAuth.java index f80c1aa..7c9b0a5 100644 --- a/src/main/java/com/gitee/auth/OAuth.java +++ b/src/main/java/com/gitee/auth/OAuth.java @@ -18,7 +18,7 @@ import com.gitee.Pair; import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class OAuth implements Authentication { private String accessToken; diff --git a/src/main/java/com/gitee/model/BasicInfo.java b/src/main/java/com/gitee/model/BasicInfo.java index ba38266..5a03993 100644 --- a/src/main/java/com/gitee/model/BasicInfo.java +++ b/src/main/java/com/gitee/model/BasicInfo.java @@ -29,7 +29,7 @@ import java.io.IOException; * basic information */ @ApiModel(description = "basic information") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class BasicInfo { @SerializedName("label") private String label = null; diff --git a/src/main/java/com/gitee/model/Blob.java b/src/main/java/com/gitee/model/Blob.java index ec096eb..d797b60 100644 --- a/src/main/java/com/gitee/model/Blob.java +++ b/src/main/java/com/gitee/model/Blob.java @@ -27,7 +27,7 @@ import java.io.IOException; * 获取文件Blob */ @ApiModel(description = "获取文件Blob") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class Blob { @SerializedName("sha") private String sha = null; diff --git a/src/main/java/com/gitee/model/Branch.java b/src/main/java/com/gitee/model/Branch.java index d3831ae..c616386 100644 --- a/src/main/java/com/gitee/model/Branch.java +++ b/src/main/java/com/gitee/model/Branch.java @@ -27,7 +27,7 @@ import java.io.IOException; * 获取所有分支 */ @ApiModel(description = "获取所有分支") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class Branch { @SerializedName("name") private String name = null; diff --git a/src/main/java/com/gitee/model/BranchProtectionPutParam.java b/src/main/java/com/gitee/model/BranchProtectionPutParam.java new file mode 100644 index 0000000..879818e --- /dev/null +++ b/src/main/java/com/gitee/model/BranchProtectionPutParam.java @@ -0,0 +1,94 @@ +/* + * 码云 Open API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 5.3.2 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package com.gitee.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * branch protection parameter + */ +@ApiModel(description = "branch protection parameter") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") +public class BranchProtectionPutParam { + @SerializedName("access_token") + private String accessToken = null; + + public BranchProtectionPutParam accessToken(String accessToken) { + this.accessToken = accessToken; + return this; + } + + /** + * 用户授权码 + * @return accessToken + **/ + @ApiModelProperty(value = "用户授权码") + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BranchProtectionPutParam branchProtectionPutParam = (BranchProtectionPutParam) o; + return Objects.equals(this.accessToken, branchProtectionPutParam.accessToken); + } + + @Override + public int hashCode() { + return Objects.hash(accessToken); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BranchProtectionPutParam {\n"); + + sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/gitee/model/Code.java b/src/main/java/com/gitee/model/Code.java index 89e6ef9..194f2e5 100644 --- a/src/main/java/com/gitee/model/Code.java +++ b/src/main/java/com/gitee/model/Code.java @@ -27,7 +27,7 @@ import java.io.IOException; * 搜索代码片段 */ @ApiModel(description = "搜索代码片段") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class Code { @SerializedName("url") private String url = null; diff --git a/src/main/java/com/gitee/model/CodeComment.java b/src/main/java/com/gitee/model/CodeComment.java index 710d311..e17c76f 100644 --- a/src/main/java/com/gitee/model/CodeComment.java +++ b/src/main/java/com/gitee/model/CodeComment.java @@ -27,7 +27,7 @@ import java.io.IOException; * 修改代码片段的评论 */ @ApiModel(description = "修改代码片段的评论") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class CodeComment { @SerializedName("id") private String id = null; diff --git a/src/main/java/com/gitee/model/CodeForks.java b/src/main/java/com/gitee/model/CodeForks.java index e7cc678..458a8f6 100644 --- a/src/main/java/com/gitee/model/CodeForks.java +++ b/src/main/java/com/gitee/model/CodeForks.java @@ -27,7 +27,7 @@ import java.io.IOException; * 获取 Fork 了指定代码片段的列表 */ @ApiModel(description = "获取 Fork 了指定代码片段的列表") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class CodeForks { @SerializedName("user") private String user = null; diff --git a/src/main/java/com/gitee/model/CodeForksHistory.java b/src/main/java/com/gitee/model/CodeForksHistory.java index a7510df..884d703 100644 --- a/src/main/java/com/gitee/model/CodeForksHistory.java +++ b/src/main/java/com/gitee/model/CodeForksHistory.java @@ -27,7 +27,7 @@ import java.io.IOException; * 获取代码片段的commit */ @ApiModel(description = "获取代码片段的commit") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class CodeForksHistory { @SerializedName("url") private String url = null; diff --git a/src/main/java/com/gitee/model/Commit.java b/src/main/java/com/gitee/model/Commit.java index a1fe20f..7774e50 100644 --- a/src/main/java/com/gitee/model/Commit.java +++ b/src/main/java/com/gitee/model/Commit.java @@ -30,7 +30,7 @@ import org.threeten.bp.OffsetDateTime; /** * Commit */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class Commit { @SerializedName("id") private String id = null; diff --git a/src/main/java/com/gitee/model/CommitContent.java b/src/main/java/com/gitee/model/CommitContent.java index d8f04c9..dc8d871 100644 --- a/src/main/java/com/gitee/model/CommitContent.java +++ b/src/main/java/com/gitee/model/CommitContent.java @@ -29,7 +29,7 @@ import java.io.IOException; * 删除文件 */ @ApiModel(description = "删除文件") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class CommitContent { @SerializedName("content") private ContentBasic content = null; diff --git a/src/main/java/com/gitee/model/Compare.java b/src/main/java/com/gitee/model/Compare.java index e231d7d..852c613 100644 --- a/src/main/java/com/gitee/model/Compare.java +++ b/src/main/java/com/gitee/model/Compare.java @@ -27,7 +27,7 @@ import java.io.IOException; * 两个Commits之间对比的版本差异 */ @ApiModel(description = "两个Commits之间对比的版本差异") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class Compare { @SerializedName("base_commit") private String baseCommit = null; diff --git a/src/main/java/com/gitee/model/CompleteBranch.java b/src/main/java/com/gitee/model/CompleteBranch.java index 8c2fa6c..ed222ea 100644 --- a/src/main/java/com/gitee/model/CompleteBranch.java +++ b/src/main/java/com/gitee/model/CompleteBranch.java @@ -27,7 +27,7 @@ import java.io.IOException; * 创建分支 */ @ApiModel(description = "创建分支") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class CompleteBranch { @SerializedName("name") private String name = null; diff --git a/src/main/java/com/gitee/model/Content.java b/src/main/java/com/gitee/model/Content.java index 83afdd2..68926b0 100644 --- a/src/main/java/com/gitee/model/Content.java +++ b/src/main/java/com/gitee/model/Content.java @@ -27,7 +27,7 @@ import java.io.IOException; * 获取仓库具体路径下的内容 */ @ApiModel(description = "获取仓库具体路径下的内容") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class Content { @SerializedName("type") private String type = null; diff --git a/src/main/java/com/gitee/model/ContentBasic.java b/src/main/java/com/gitee/model/ContentBasic.java index fdf9075..85e4878 100644 --- a/src/main/java/com/gitee/model/ContentBasic.java +++ b/src/main/java/com/gitee/model/ContentBasic.java @@ -26,7 +26,7 @@ import java.io.IOException; /** * ContentBasic */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class ContentBasic { @SerializedName("name") private String name = null; diff --git a/src/main/java/com/gitee/model/Contributor.java b/src/main/java/com/gitee/model/Contributor.java index 2bdfa74..308bc23 100644 --- a/src/main/java/com/gitee/model/Contributor.java +++ b/src/main/java/com/gitee/model/Contributor.java @@ -27,7 +27,7 @@ import java.io.IOException; * 获取仓库贡献者 */ @ApiModel(description = "获取仓库贡献者") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class Contributor { @SerializedName("email") private String email = null; diff --git a/src/main/java/com/gitee/model/Email.java b/src/main/java/com/gitee/model/Email.java new file mode 100644 index 0000000..9d9feba --- /dev/null +++ b/src/main/java/com/gitee/model/Email.java @@ -0,0 +1,150 @@ +/* + * 码云 Open API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 5.3.2 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package com.gitee.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * 获取授权用户的邮件地址 + */ +@ApiModel(description = "获取授权用户的邮件地址") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") +public class Email { + @SerializedName("email") + private String email = null; + + @SerializedName("state") + private String state = null; + + @SerializedName("scope") + private List scope = null; + + public Email email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @ApiModelProperty(value = "") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public Email state(String state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + **/ + @ApiModelProperty(value = "") + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + public Email scope(List scope) { + this.scope = scope; + return this; + } + + public Email addScopeItem(String scopeItem) { + if (this.scope == null) { + this.scope = new ArrayList(); + } + this.scope.add(scopeItem); + return this; + } + + /** + * Get scope + * @return scope + **/ + @ApiModelProperty(value = "") + public List getScope() { + return scope; + } + + public void setScope(List scope) { + this.scope = scope; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Email email = (Email) o; + return Objects.equals(this.email, email.email) && + Objects.equals(this.state, email.state) && + Objects.equals(this.scope, email.scope); + } + + @Override + public int hashCode() { + return Objects.hash(email, state, scope); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Email {\n"); + + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/gitee/model/EnterpriseBasic.java b/src/main/java/com/gitee/model/EnterpriseBasic.java index 09f0f7e..d750c25 100644 --- a/src/main/java/com/gitee/model/EnterpriseBasic.java +++ b/src/main/java/com/gitee/model/EnterpriseBasic.java @@ -27,7 +27,7 @@ import java.io.IOException; * 获取一个企业 */ @ApiModel(description = "获取一个企业") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class EnterpriseBasic { @SerializedName("id") private Integer id = null; diff --git a/src/main/java/com/gitee/model/EnterpriseMember.java b/src/main/java/com/gitee/model/EnterpriseMember.java index d0cd26c..948d9b8 100644 --- a/src/main/java/com/gitee/model/EnterpriseMember.java +++ b/src/main/java/com/gitee/model/EnterpriseMember.java @@ -28,7 +28,7 @@ import java.io.IOException; * 修改企业成员权限或备注 */ @ApiModel(description = "修改企业成员权限或备注") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class EnterpriseMember { @SerializedName("url") private String url = null; diff --git a/src/main/java/com/gitee/model/Event.java b/src/main/java/com/gitee/model/Event.java index 5103857..df4b093 100644 --- a/src/main/java/com/gitee/model/Event.java +++ b/src/main/java/com/gitee/model/Event.java @@ -27,7 +27,7 @@ import java.io.IOException; * 列出仓库的所有公开动态 */ @ApiModel(description = "列出仓库的所有公开动态") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class Event { @SerializedName("id") private Integer id = null; diff --git a/src/main/java/com/gitee/model/Group.java b/src/main/java/com/gitee/model/Group.java index d4c6631..3f00a72 100644 --- a/src/main/java/com/gitee/model/Group.java +++ b/src/main/java/com/gitee/model/Group.java @@ -27,7 +27,7 @@ import java.io.IOException; * 获取一个组织 */ @ApiModel(description = "获取一个组织") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class Group { @SerializedName("id") private Integer id = null; diff --git a/src/main/java/com/gitee/model/GroupDetail.java b/src/main/java/com/gitee/model/GroupDetail.java index c51f0cc..97c0bec 100644 --- a/src/main/java/com/gitee/model/GroupDetail.java +++ b/src/main/java/com/gitee/model/GroupDetail.java @@ -27,7 +27,7 @@ import java.io.IOException; * 更新授权用户所管理的组织资料 */ @ApiModel(description = "更新授权用户所管理的组织资料") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class GroupDetail { @SerializedName("id") private Integer id = null; diff --git a/src/main/java/com/gitee/model/GroupMember.java b/src/main/java/com/gitee/model/GroupMember.java index b191c24..a32094a 100644 --- a/src/main/java/com/gitee/model/GroupMember.java +++ b/src/main/java/com/gitee/model/GroupMember.java @@ -28,7 +28,7 @@ import java.io.IOException; * 增加或更新授权用户所管理组织的成员 */ @ApiModel(description = "增加或更新授权用户所管理组织的成员") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class GroupMember { @SerializedName("url") private String url = null; diff --git a/src/main/java/com/gitee/model/Hook.java b/src/main/java/com/gitee/model/Hook.java index d880243..8229310 100644 --- a/src/main/java/com/gitee/model/Hook.java +++ b/src/main/java/com/gitee/model/Hook.java @@ -27,7 +27,7 @@ import java.io.IOException; * 更新一个仓库WebHook */ @ApiModel(description = "更新一个仓库WebHook") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class Hook { @SerializedName("id") private String id = null; diff --git a/src/main/java/com/gitee/model/Issue.java b/src/main/java/com/gitee/model/Issue.java index c7360bf..0830080 100644 --- a/src/main/java/com/gitee/model/Issue.java +++ b/src/main/java/com/gitee/model/Issue.java @@ -34,7 +34,7 @@ import org.threeten.bp.OffsetDateTime; * 搜索 Issues */ @ApiModel(description = "搜索 Issues") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class Issue { @SerializedName("id") private Integer id = null; diff --git a/src/main/java/com/gitee/model/IssueCommentPostParam.java b/src/main/java/com/gitee/model/IssueCommentPostParam.java index 6deadcc..95b599e 100644 --- a/src/main/java/com/gitee/model/IssueCommentPostParam.java +++ b/src/main/java/com/gitee/model/IssueCommentPostParam.java @@ -26,7 +26,7 @@ import java.io.IOException; /** * IssueCommentPostParam */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class IssueCommentPostParam { @SerializedName("access_token") private String accessToken = null; diff --git a/src/main/java/com/gitee/model/IssueUpdateParam.java b/src/main/java/com/gitee/model/IssueUpdateParam.java index 880a6e1..58d2679 100644 --- a/src/main/java/com/gitee/model/IssueUpdateParam.java +++ b/src/main/java/com/gitee/model/IssueUpdateParam.java @@ -27,7 +27,7 @@ import java.io.IOException; * update issue information */ @ApiModel(description = "update issue information") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class IssueUpdateParam { @SerializedName("access_token") private String accessToken = null; diff --git a/src/main/java/com/gitee/model/Label.java b/src/main/java/com/gitee/model/Label.java index 75b7f3b..bb76e12 100644 --- a/src/main/java/com/gitee/model/Label.java +++ b/src/main/java/com/gitee/model/Label.java @@ -27,7 +27,7 @@ import java.io.IOException; * 获取企业某个标签 */ @ApiModel(description = "获取企业某个标签") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class Label { @SerializedName("id") private Integer id = null; diff --git a/src/main/java/com/gitee/model/Milestone.java b/src/main/java/com/gitee/model/Milestone.java index 6d09157..c8a62c2 100644 --- a/src/main/java/com/gitee/model/Milestone.java +++ b/src/main/java/com/gitee/model/Milestone.java @@ -28,7 +28,7 @@ import org.threeten.bp.OffsetDateTime; * 更新仓库里程碑 */ @ApiModel(description = "更新仓库里程碑") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class Milestone { @SerializedName("url") private String url = null; diff --git a/src/main/java/com/gitee/model/Namespace.java b/src/main/java/com/gitee/model/Namespace.java index bee3b4f..df3f1b9 100644 --- a/src/main/java/com/gitee/model/Namespace.java +++ b/src/main/java/com/gitee/model/Namespace.java @@ -28,7 +28,7 @@ import java.io.IOException; * 获取授权用户的一个 Namespace */ @ApiModel(description = "获取授权用户的一个 Namespace") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class Namespace { @SerializedName("id") private Integer id = null; diff --git a/src/main/java/com/gitee/model/NamespaceMini.java b/src/main/java/com/gitee/model/NamespaceMini.java index 3857f3a..c4a7541 100644 --- a/src/main/java/com/gitee/model/NamespaceMini.java +++ b/src/main/java/com/gitee/model/NamespaceMini.java @@ -26,7 +26,7 @@ import java.io.IOException; /** * NamespaceMini */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class NamespaceMini { @SerializedName("id") private Integer id = null; diff --git a/src/main/java/com/gitee/model/Note.java b/src/main/java/com/gitee/model/Note.java index f766fb6..c37ae38 100644 --- a/src/main/java/com/gitee/model/Note.java +++ b/src/main/java/com/gitee/model/Note.java @@ -28,7 +28,7 @@ import java.io.IOException; * 获取企业某个Issue所有评论 */ @ApiModel(description = "获取企业某个Issue所有评论") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class Note { @SerializedName("id") private Integer id = null; diff --git a/src/main/java/com/gitee/model/OperateLog.java b/src/main/java/com/gitee/model/OperateLog.java index c2b3ce7..3a13625 100644 --- a/src/main/java/com/gitee/model/OperateLog.java +++ b/src/main/java/com/gitee/model/OperateLog.java @@ -27,7 +27,7 @@ import java.io.IOException; * 获取某个Pull Request的操作日志 */ @ApiModel(description = "获取某个Pull Request的操作日志") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class OperateLog { @SerializedName("id") private String id = null; diff --git a/src/main/java/com/gitee/model/ProgramBasic.java b/src/main/java/com/gitee/model/ProgramBasic.java index a0a2897..7138eb9 100644 --- a/src/main/java/com/gitee/model/ProgramBasic.java +++ b/src/main/java/com/gitee/model/ProgramBasic.java @@ -26,7 +26,7 @@ import java.io.IOException; /** * ProgramBasic */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class ProgramBasic { @SerializedName("id") private String id = null; diff --git a/src/main/java/com/gitee/model/Project.java b/src/main/java/com/gitee/model/Project.java index 906d7d1..7136a10 100644 --- a/src/main/java/com/gitee/model/Project.java +++ b/src/main/java/com/gitee/model/Project.java @@ -32,7 +32,7 @@ import java.util.List; * 搜索仓库 */ @ApiModel(description = "搜索仓库") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class Project { @SerializedName("id") private Integer id = null; diff --git a/src/main/java/com/gitee/model/ProjectBasic.java b/src/main/java/com/gitee/model/ProjectBasic.java index 9f1ae8d..023b414 100644 --- a/src/main/java/com/gitee/model/ProjectBasic.java +++ b/src/main/java/com/gitee/model/ProjectBasic.java @@ -27,7 +27,7 @@ import java.io.IOException; /** * ProjectBasic */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class ProjectBasic { @SerializedName("id") private Integer id = null; diff --git a/src/main/java/com/gitee/model/ProjectMember.java b/src/main/java/com/gitee/model/ProjectMember.java index 1f108a9..0d5b650 100644 --- a/src/main/java/com/gitee/model/ProjectMember.java +++ b/src/main/java/com/gitee/model/ProjectMember.java @@ -27,7 +27,7 @@ import java.io.IOException; * 添加仓库成员 */ @ApiModel(description = "添加仓库成员") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class ProjectMember { @SerializedName("id") private Integer id = null; diff --git a/src/main/java/com/gitee/model/ProjectMemberPermission.java b/src/main/java/com/gitee/model/ProjectMemberPermission.java index 02514e1..1769b2f 100644 --- a/src/main/java/com/gitee/model/ProjectMemberPermission.java +++ b/src/main/java/com/gitee/model/ProjectMemberPermission.java @@ -27,7 +27,7 @@ import java.io.IOException; * 查看仓库成员的权限 */ @ApiModel(description = "查看仓库成员的权限") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class ProjectMemberPermission { @SerializedName("id") private Integer id = null; diff --git a/src/main/java/com/gitee/model/ProjectMemberPutParam.java b/src/main/java/com/gitee/model/ProjectMemberPutParam.java index a80072b..ef8a6be 100644 --- a/src/main/java/com/gitee/model/ProjectMemberPutParam.java +++ b/src/main/java/com/gitee/model/ProjectMemberPutParam.java @@ -27,7 +27,7 @@ import java.io.IOException; * create project member */ @ApiModel(description = "create project member") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class ProjectMemberPutParam { @SerializedName("access_token") private String accessToken = null; diff --git a/src/main/java/com/gitee/model/PullRequest.java b/src/main/java/com/gitee/model/PullRequest.java index 33639e7..9fd41ec 100644 --- a/src/main/java/com/gitee/model/PullRequest.java +++ b/src/main/java/com/gitee/model/PullRequest.java @@ -33,7 +33,7 @@ import java.util.List; * 取消用户测试 Pull Request */ @ApiModel(description = "取消用户测试 Pull Request") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class PullRequest { @SerializedName("id") private Integer id = null; diff --git a/src/main/java/com/gitee/model/PullRequestCommentPostParam.java b/src/main/java/com/gitee/model/PullRequestCommentPostParam.java index ffe8aef..07eec96 100644 --- a/src/main/java/com/gitee/model/PullRequestCommentPostParam.java +++ b/src/main/java/com/gitee/model/PullRequestCommentPostParam.java @@ -27,7 +27,7 @@ import java.io.IOException; * create pull request comment */ @ApiModel(description = "create pull request comment") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class PullRequestCommentPostParam { @SerializedName("access_token") private String accessToken = null; diff --git a/src/main/java/com/gitee/model/PullRequestComments.java b/src/main/java/com/gitee/model/PullRequestComments.java index 1116240..9977221 100644 --- a/src/main/java/com/gitee/model/PullRequestComments.java +++ b/src/main/java/com/gitee/model/PullRequestComments.java @@ -28,7 +28,7 @@ import java.io.IOException; * 编辑评论 */ @ApiModel(description = "编辑评论") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class PullRequestComments { @SerializedName("url") private String url = null; diff --git a/src/main/java/com/gitee/model/PullRequestCommits.java b/src/main/java/com/gitee/model/PullRequestCommits.java index b443878..dae67f0 100644 --- a/src/main/java/com/gitee/model/PullRequestCommits.java +++ b/src/main/java/com/gitee/model/PullRequestCommits.java @@ -27,7 +27,7 @@ import java.io.IOException; * 获取某Pull Request的所有Commit信息。最多显示250条Commit */ @ApiModel(description = "获取某Pull Request的所有Commit信息。最多显示250条Commit") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class PullRequestCommits { @SerializedName("url") private String url = null; diff --git a/src/main/java/com/gitee/model/PullRequestFiles.java b/src/main/java/com/gitee/model/PullRequestFiles.java index bf01c74..72d77d7 100644 --- a/src/main/java/com/gitee/model/PullRequestFiles.java +++ b/src/main/java/com/gitee/model/PullRequestFiles.java @@ -27,7 +27,7 @@ import java.io.IOException; * Pull Request Commit文件列表。最多显示300条diff */ @ApiModel(description = "Pull Request Commit文件列表。最多显示300条diff") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class PullRequestFiles { @SerializedName("sha") private String sha = null; diff --git a/src/main/java/com/gitee/model/PullRequestMergePutParam.java b/src/main/java/com/gitee/model/PullRequestMergePutParam.java index 1718254..33d1312 100644 --- a/src/main/java/com/gitee/model/PullRequestMergePutParam.java +++ b/src/main/java/com/gitee/model/PullRequestMergePutParam.java @@ -27,7 +27,7 @@ import java.io.IOException; * merge pull request parameter */ @ApiModel(description = "merge pull request parameter") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class PullRequestMergePutParam { @SerializedName("access_token") private String accessToken = null; diff --git a/src/main/java/com/gitee/model/PullRequestUpdateParam.java b/src/main/java/com/gitee/model/PullRequestUpdateParam.java index 43e0413..d159e0e 100644 --- a/src/main/java/com/gitee/model/PullRequestUpdateParam.java +++ b/src/main/java/com/gitee/model/PullRequestUpdateParam.java @@ -27,7 +27,7 @@ import java.io.IOException; * update pull request information */ @ApiModel(description = "update pull request information") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class PullRequestUpdateParam { @SerializedName("access_token") private String accessToken = null; diff --git a/src/main/java/com/gitee/model/Release.java b/src/main/java/com/gitee/model/Release.java index c3ad1d5..0b9a2f9 100644 --- a/src/main/java/com/gitee/model/Release.java +++ b/src/main/java/com/gitee/model/Release.java @@ -28,7 +28,7 @@ import org.threeten.bp.OffsetDateTime; * 更新仓库Release */ @ApiModel(description = "更新仓库Release") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class Release { @SerializedName("id") private Integer id = null; diff --git a/src/main/java/com/gitee/model/RepoCommit.java b/src/main/java/com/gitee/model/RepoCommit.java index 318ce94..e3377a2 100644 --- a/src/main/java/com/gitee/model/RepoCommit.java +++ b/src/main/java/com/gitee/model/RepoCommit.java @@ -27,7 +27,7 @@ import java.io.IOException; * 仓库的某个提交 */ @ApiModel(description = "仓库的某个提交") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class RepoCommit { @SerializedName("url") private String url = null; diff --git a/src/main/java/com/gitee/model/RepoPatchParam.java b/src/main/java/com/gitee/model/RepoPatchParam.java new file mode 100644 index 0000000..a7320bb --- /dev/null +++ b/src/main/java/com/gitee/model/RepoPatchParam.java @@ -0,0 +1,255 @@ +/* + * 码云 Open API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 5.3.2 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package com.gitee.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * repo patch parameter + */ +@ApiModel(description = "repo patch parameter") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") +public class RepoPatchParam { + @SerializedName("access_token") + private String accessToken = null; + + @SerializedName("name") + private String name = null; + + @SerializedName("description") + private String description = null; + + @SerializedName("homepage") + private String homepage = null; + + @SerializedName("has_issues") + private String hasIssues = "true"; + + @SerializedName("has_wiki") + private String hasWiki = "true"; + + @SerializedName("private") + private String _private = null; + + @SerializedName("default_branch") + private String defaultBranch = null; + + public RepoPatchParam accessToken(String accessToken) { + this.accessToken = accessToken; + return this; + } + + /** + * 用户授权码 + * @return accessToken + **/ + @ApiModelProperty(value = "用户授权码") + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + public RepoPatchParam name(String name) { + this.name = name; + return this; + } + + /** + * 仓库名称 + * @return name + **/ + @ApiModelProperty(value = "仓库名称") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public RepoPatchParam description(String description) { + this.description = description; + return this; + } + + /** + * 仓库描述 + * @return description + **/ + @ApiModelProperty(value = "仓库描述") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public RepoPatchParam homepage(String homepage) { + this.homepage = homepage; + return this; + } + + /** + * 主页(eg: https://gitee.com) + * @return homepage + **/ + @ApiModelProperty(value = "主页(eg: https://gitee.com)") + public String getHomepage() { + return homepage; + } + + public void setHomepage(String homepage) { + this.homepage = homepage; + } + + public RepoPatchParam hasIssues(String hasIssues) { + this.hasIssues = hasIssues; + return this; + } + + /** + * 允许提Issue与否。默认: 允许(true) + * @return hasIssues + **/ + @ApiModelProperty(value = "允许提Issue与否。默认: 允许(true)") + public String getHasIssues() { + return hasIssues; + } + + public void setHasIssues(String hasIssues) { + this.hasIssues = hasIssues; + } + + public RepoPatchParam hasWiki(String hasWiki) { + this.hasWiki = hasWiki; + return this; + } + + /** + * 提供Wiki与否。默认: 提供(true) + * @return hasWiki + **/ + @ApiModelProperty(value = "提供Wiki与否。默认: 提供(true)") + public String getHasWiki() { + return hasWiki; + } + + public void setHasWiki(String hasWiki) { + this.hasWiki = hasWiki; + } + + public RepoPatchParam _private(String _private) { + this._private = _private; + return this; + } + + /** + * 仓库公开或私有。 + * @return _private + **/ + @ApiModelProperty(value = "仓库公开或私有。") + public String getPrivate() { + return _private; + } + + public void setPrivate(String _private) { + this._private = _private; + } + + public RepoPatchParam defaultBranch(String defaultBranch) { + this.defaultBranch = defaultBranch; + return this; + } + + /** + * 更新默认分支 + * @return defaultBranch + **/ + @ApiModelProperty(value = "更新默认分支") + public String getDefaultBranch() { + return defaultBranch; + } + + public void setDefaultBranch(String defaultBranch) { + this.defaultBranch = defaultBranch; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RepoPatchParam repoPatchParam = (RepoPatchParam) o; + return Objects.equals(this.accessToken, repoPatchParam.accessToken) && + Objects.equals(this.name, repoPatchParam.name) && + Objects.equals(this.description, repoPatchParam.description) && + Objects.equals(this.homepage, repoPatchParam.homepage) && + Objects.equals(this.hasIssues, repoPatchParam.hasIssues) && + Objects.equals(this.hasWiki, repoPatchParam.hasWiki) && + Objects.equals(this._private, repoPatchParam._private) && + Objects.equals(this.defaultBranch, repoPatchParam.defaultBranch); + } + + @Override + public int hashCode() { + return Objects.hash(accessToken, name, description, homepage, hasIssues, hasWiki, _private, defaultBranch); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RepoPatchParam {\n"); + + sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" homepage: ").append(toIndentedString(homepage)).append("\n"); + sb.append(" hasIssues: ").append(toIndentedString(hasIssues)).append("\n"); + sb.append(" hasWiki: ").append(toIndentedString(hasWiki)).append("\n"); + sb.append(" _private: ").append(toIndentedString(_private)).append("\n"); + sb.append(" defaultBranch: ").append(toIndentedString(defaultBranch)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/gitee/model/RepositoryPostParam.java b/src/main/java/com/gitee/model/RepositoryPostParam.java index 14a9afb..4167c97 100644 --- a/src/main/java/com/gitee/model/RepositoryPostParam.java +++ b/src/main/java/com/gitee/model/RepositoryPostParam.java @@ -27,7 +27,7 @@ import java.io.IOException; * create repository */ @ApiModel(description = "create repository") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class RepositoryPostParam { @SerializedName("access_token") private String accessToken = null; diff --git a/src/main/java/com/gitee/model/SSHKey.java b/src/main/java/com/gitee/model/SSHKey.java index e992818..35ae0e7 100644 --- a/src/main/java/com/gitee/model/SSHKey.java +++ b/src/main/java/com/gitee/model/SSHKey.java @@ -27,7 +27,7 @@ import java.io.IOException; * 获取一个公钥 */ @ApiModel(description = "获取一个公钥") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class SSHKey { @SerializedName("id") private String id = null; diff --git a/src/main/java/com/gitee/model/SSHKeyBasic.java b/src/main/java/com/gitee/model/SSHKeyBasic.java index 9ea0ad2..0f6bee7 100644 --- a/src/main/java/com/gitee/model/SSHKeyBasic.java +++ b/src/main/java/com/gitee/model/SSHKeyBasic.java @@ -27,7 +27,7 @@ import java.io.IOException; * 列出指定用户的所有公钥 */ @ApiModel(description = "列出指定用户的所有公钥") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class SSHKeyBasic { @SerializedName("id") private String id = null; diff --git a/src/main/java/com/gitee/model/Tag.java b/src/main/java/com/gitee/model/Tag.java index f2b17f2..ac1e901 100644 --- a/src/main/java/com/gitee/model/Tag.java +++ b/src/main/java/com/gitee/model/Tag.java @@ -27,7 +27,7 @@ import java.io.IOException; * 列出仓库所有的tags */ @ApiModel(description = "列出仓库所有的tags") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class Tag { @SerializedName("name") private String name = null; diff --git a/src/main/java/com/gitee/model/Tree.java b/src/main/java/com/gitee/model/Tree.java index 34973a4..8f04ac3 100644 --- a/src/main/java/com/gitee/model/Tree.java +++ b/src/main/java/com/gitee/model/Tree.java @@ -27,7 +27,7 @@ import java.io.IOException; * 获取目录Tree */ @ApiModel(description = "获取目录Tree") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class Tree { @SerializedName("sha") private String sha = null; diff --git a/src/main/java/com/gitee/model/User.java b/src/main/java/com/gitee/model/User.java index c6bccd4..2d89bd4 100644 --- a/src/main/java/com/gitee/model/User.java +++ b/src/main/java/com/gitee/model/User.java @@ -27,7 +27,7 @@ import java.io.IOException; * 搜索用户 */ @ApiModel(description = "搜索用户") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class User { @SerializedName("id") private Integer id = null; diff --git a/src/main/java/com/gitee/model/UserBasic.java b/src/main/java/com/gitee/model/UserBasic.java index 8128f90..90dfd15 100644 --- a/src/main/java/com/gitee/model/UserBasic.java +++ b/src/main/java/com/gitee/model/UserBasic.java @@ -27,7 +27,7 @@ import java.io.IOException; * 列出一个组织的所有成员 */ @ApiModel(description = "列出一个组织的所有成员") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class UserBasic { @SerializedName("id") private Integer id = null; diff --git a/src/main/java/com/gitee/model/UserMessage.java b/src/main/java/com/gitee/model/UserMessage.java index f6a753c..223d28a 100644 --- a/src/main/java/com/gitee/model/UserMessage.java +++ b/src/main/java/com/gitee/model/UserMessage.java @@ -28,7 +28,7 @@ import java.io.IOException; * 获取一条私信 */ @ApiModel(description = "获取一条私信") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class UserMessage { @SerializedName("id") private Integer id = null; diff --git a/src/main/java/com/gitee/model/UserMessageList.java b/src/main/java/com/gitee/model/UserMessageList.java index b36fa69..01f8143 100644 --- a/src/main/java/com/gitee/model/UserMessageList.java +++ b/src/main/java/com/gitee/model/UserMessageList.java @@ -30,7 +30,7 @@ import java.util.List; * 列出授权用户的所有私信 */ @ApiModel(description = "列出授权用户的所有私信") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class UserMessageList { @SerializedName("total_count") private Integer totalCount = null; diff --git a/src/main/java/com/gitee/model/UserMini.java b/src/main/java/com/gitee/model/UserMini.java index 9df200d..f9c76c8 100644 --- a/src/main/java/com/gitee/model/UserMini.java +++ b/src/main/java/com/gitee/model/UserMini.java @@ -26,7 +26,7 @@ import java.io.IOException; /** * UserMini */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class UserMini { @SerializedName("id") private Integer id = null; diff --git a/src/main/java/com/gitee/model/UserNotification.java b/src/main/java/com/gitee/model/UserNotification.java index f34b644..bcf9a46 100644 --- a/src/main/java/com/gitee/model/UserNotification.java +++ b/src/main/java/com/gitee/model/UserNotification.java @@ -33,7 +33,7 @@ import java.util.List; * 获取一条通知 */ @ApiModel(description = "获取一条通知") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class UserNotification { @SerializedName("id") private Integer id = null; diff --git a/src/main/java/com/gitee/model/UserNotificationCount.java b/src/main/java/com/gitee/model/UserNotificationCount.java index e003123..d57b723 100644 --- a/src/main/java/com/gitee/model/UserNotificationCount.java +++ b/src/main/java/com/gitee/model/UserNotificationCount.java @@ -27,7 +27,7 @@ import java.io.IOException; * 获取授权用户的通知数 */ @ApiModel(description = "获取授权用户的通知数") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class UserNotificationCount { @SerializedName("total_count") private Integer totalCount = null; diff --git a/src/main/java/com/gitee/model/UserNotificationList.java b/src/main/java/com/gitee/model/UserNotificationList.java index d98eb35..4992297 100644 --- a/src/main/java/com/gitee/model/UserNotificationList.java +++ b/src/main/java/com/gitee/model/UserNotificationList.java @@ -30,7 +30,7 @@ import java.util.List; * 列出授权用户的所有通知 */ @ApiModel(description = "列出授权用户的所有通知") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class UserNotificationList { @SerializedName("total_count") private Integer totalCount = null; diff --git a/src/main/java/com/gitee/model/UserNotificationNamespace.java b/src/main/java/com/gitee/model/UserNotificationNamespace.java index 199bd08..812c726 100644 --- a/src/main/java/com/gitee/model/UserNotificationNamespace.java +++ b/src/main/java/com/gitee/model/UserNotificationNamespace.java @@ -26,7 +26,7 @@ import java.io.IOException; /** * UserNotificationNamespace */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class UserNotificationNamespace { @SerializedName("name") private String name = null; diff --git a/src/main/java/com/gitee/model/UserNotificationSubject.java b/src/main/java/com/gitee/model/UserNotificationSubject.java index 9d10730..25550da 100644 --- a/src/main/java/com/gitee/model/UserNotificationSubject.java +++ b/src/main/java/com/gitee/model/UserNotificationSubject.java @@ -26,7 +26,7 @@ import java.io.IOException; /** * UserNotificationSubject */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class UserNotificationSubject { @SerializedName("title") private String title = null; diff --git a/src/main/java/com/gitee/model/WeekReport.java b/src/main/java/com/gitee/model/WeekReport.java index 40f42b9..878a631 100644 --- a/src/main/java/com/gitee/model/WeekReport.java +++ b/src/main/java/com/gitee/model/WeekReport.java @@ -28,7 +28,7 @@ import java.io.IOException; * 新建周报 */ @ApiModel(description = "新建周报") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-07T23:29:15.250+08:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-16T10:49:05.393+08:00") public class WeekReport { @SerializedName("id") private Integer id = null; diff --git a/src/test/java/com/gitee/api/EmailsApiTest.java b/src/test/java/com/gitee/api/EmailsApiTest.java new file mode 100644 index 0000000..3edfe84 --- /dev/null +++ b/src/test/java/com/gitee/api/EmailsApiTest.java @@ -0,0 +1,51 @@ +/* + * 码云 Open API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 5.3.2 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package com.gitee.api; + +import com.gitee.ApiException; +import com.gitee.model.Email; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for EmailsApi + */ +@Ignore +public class EmailsApiTest { + + private final EmailsApi api = new EmailsApi(); + + + /** + * 获取授权用户的所有邮箱 + * + * 获取授权用户的所有邮箱 + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getV5EmailsTest() throws ApiException { + String accessToken = null; + List response = api.getV5Emails(accessToken); + + // TODO: test validations + } + +} diff --git a/src/test/java/com/gitee/api/RepositoriesApiTest.java b/src/test/java/com/gitee/api/RepositoriesApiTest.java index 1fe9347..78fbd60 100644 --- a/src/test/java/com/gitee/api/RepositoriesApiTest.java +++ b/src/test/java/com/gitee/api/RepositoriesApiTest.java @@ -15,6 +15,7 @@ package com.gitee.api; import com.gitee.ApiException; import com.gitee.model.Branch; +import com.gitee.model.BranchProtectionPutParam; import com.gitee.model.CommitContent; import com.gitee.model.Compare; import com.gitee.model.CompleteBranch; @@ -27,6 +28,7 @@ import com.gitee.model.ProjectMemberPermission; import com.gitee.model.ProjectMemberPutParam; import com.gitee.model.Release; import com.gitee.model.RepoCommit; +import com.gitee.model.RepoPatchParam; import com.gitee.model.RepositoryPostParam; import com.gitee.model.SSHKey; import com.gitee.model.SSHKeyBasic; @@ -788,15 +790,8 @@ public class RepositoriesApiTest { public void patchV5ReposOwnerRepoTest() throws ApiException { String owner = null; String repo = null; - String name = null; - String accessToken = null; - String description = null; - String homepage = null; - Boolean hasIssues = null; - Boolean hasWiki = null; - Boolean _private = null; - String defaultBranch = null; - Project response = api.patchV5ReposOwnerRepo(owner, repo, name, accessToken, description, homepage, hasIssues, hasWiki, _private, defaultBranch); + RepoPatchParam body = null; + Project response = api.patchV5ReposOwnerRepo(owner, repo, body); // TODO: test validations } @@ -1076,8 +1071,8 @@ public class RepositoriesApiTest { String owner = null; String repo = null; String branch = null; - String accessToken = null; - CompleteBranch response = api.putV5ReposOwnerRepoBranchesBranchProtection(owner, repo, branch, accessToken); + BranchProtectionPutParam body = null; + CompleteBranch response = api.putV5ReposOwnerRepoBranchesBranchProtection(owner, repo, branch, body); // TODO: test validations } diff --git a/swagger.yaml b/swagger.yaml index dad940d..e431ce3 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -1,16050 +1,16116 @@ ---- -swagger: "2.0" -info: - version: "5.3.2" - title: "码云 Open API" -host: "gitee.com" -basePath: "/api" -tags: -- name: "Repositories" - description: "Operations about Repositories" -- name: "Git Data" - description: "Operations about Git Data" -- name: "Issues" - description: "Operations about Issues" -- name: "Labels" - description: "Operations about Labels" -- name: "Milestones" - description: "Operations about Milestones" -- name: "Miscellaneous" - description: "Operations about Miscellaneous" -- name: "Pull Requests" - description: "Operations about Pull Requests" -- name: "Webhooks" - description: "Operations about Webhooks" -- name: "Activity" - description: "Operations about Activities" -- name: "Users" - description: "Operations about Users" -- name: "Organizations" - description: "Operations about Organizations" -- name: "Enterprises" - description: "Operations about Enterprises" -- name: "Gists" - description: "Operations about Gists" -- name: "Search" - description: "Operations about Searches" -produces: -- "application/json" -- "text/plain" -paths: - /v5/repos/{owner}/{repo}/branches: - get: - tags: - - "Repositories" - summary: "获取所有分支" - description: "获取所有分支" - operationId: "getV5ReposOwnerRepoBranches" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Branch" - post: - tags: - - "Repositories" - summary: "创建分支" - description: "创建分支" - operationId: "postV5ReposOwnerRepoBranches" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "refs" - in: "formData" - description: "起点名称, 默认:master" - required: true - type: "string" - default: "master" - x-exportParamName: "Refs" - - name: "branch_name" - in: "formData" - description: "新创建的分支名称" - required: true - type: "string" - x-exportParamName: "BranchName" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/CompleteBranch" - /v5/repos/{owner}/{repo}/branches/{branch}: - get: - tags: - - "Repositories" - summary: "获取单个分支" - description: "获取单个分支" - operationId: "getV5ReposOwnerRepoBranchesBranch" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "branch" - in: "path" - description: "分支名称" - required: true - type: "string" - x-exportParamName: "Branch" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/CompleteBranch" - /v5/repos/{owner}/{repo}/branches/{branch}/protection: - put: - tags: - - "Repositories" - summary: "设置分支保护" - description: "设置分支保护" - operationId: "putV5ReposOwnerRepoBranchesBranchProtection" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "branch" - in: "path" - description: "分支名称" - required: true - type: "string" - x-exportParamName: "Branch" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/CompleteBranch" - delete: - tags: - - "Repositories" - summary: "取消保护分支的设置" - description: "取消保护分支的设置" - operationId: "deleteV5ReposOwnerRepoBranchesBranchProtection" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "branch" - in: "path" - description: "分支名称" - required: true - type: "string" - x-exportParamName: "Branch" - responses: - 204: - description: "取消保护分支的设置" - /v5/repos/{owner}/{repo}/commits: - get: - tags: - - "Repositories" - summary: "仓库的所有提交" - description: "仓库的所有提交" - operationId: "getV5ReposOwnerRepoCommits" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "sha" - in: "query" - description: "提交起始的SHA值或者分支名. 默认: 仓库的默认分支" - required: false - type: "string" - x-exportParamName: "Sha" - x-optionalDataType: "String" - - name: "path" - in: "query" - description: "包含该文件的提交" - required: false - type: "string" - x-exportParamName: "Path" - x-optionalDataType: "String" - - name: "author" - in: "query" - description: "提交作者的邮箱或个人空间地址(username/login)" - required: false - type: "string" - x-exportParamName: "Author" - x-optionalDataType: "String" - - name: "since" - in: "query" - description: "提交的起始时间,时间格式为 ISO 8601" - required: false - type: "string" - x-exportParamName: "Since" - x-optionalDataType: "String" - - name: "until" - in: "query" - description: "提交的最后时间,时间格式为 ISO 8601" - required: false - type: "string" - x-exportParamName: "Until" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/RepoCommit" - /v5/repos/{owner}/{repo}/commits/{sha}: - get: - tags: - - "Repositories" - summary: "仓库的某个提交" - description: "仓库的某个提交" - operationId: "getV5ReposOwnerRepoCommitsSha" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "sha" - in: "path" - description: "提交的SHA值或者分支名" - required: true - type: "string" - x-exportParamName: "Sha" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/RepoCommit" - /v5/repos/{owner}/{repo}/compare/{base}...{head}: - get: - tags: - - "Repositories" - summary: "两个Commits之间对比的版本差异" - description: "两个Commits之间对比的版本差异" - operationId: "getV5ReposOwnerRepoCompareBase...Head" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "base" - in: "path" - description: "Commit提交的SHA值或者分支名作为对比起点" - required: true - type: "string" - x-exportParamName: "Base" - - name: "head" - in: "path" - description: "Commit提交的SHA值或者分支名作为对比终点" - required: true - type: "string" - x-exportParamName: "Head" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Compare" - /v5/repos/{owner}/{repo}/keys: - get: - tags: - - "Repositories" - summary: "获取仓库已部署的公钥" - description: "获取仓库已部署的公钥" - operationId: "getV5ReposOwnerRepoKeys" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/SSHKey" - post: - tags: - - "Repositories" - summary: "为仓库添加公钥" - description: "为仓库添加公钥" - operationId: "postV5ReposOwnerRepoKeys" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "key" - in: "formData" - description: "公钥内容" - required: true - type: "string" - x-exportParamName: "Key" - - name: "title" - in: "formData" - description: "公钥名称" - required: true - type: "string" - x-exportParamName: "Title" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/SSHKey" - /v5/repos/{owner}/{repo}/keys/available: - get: - tags: - - "Repositories" - summary: "获取仓库可部署的公钥" - description: "获取仓库可部署的公钥" - operationId: "getV5ReposOwnerRepoKeysAvailable" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/SSHKeyBasic" - /v5/repos/{owner}/{repo}/keys/enable/{id}: - put: - tags: - - "Repositories" - summary: "启用仓库公钥" - description: "启用仓库公钥" - operationId: "putV5ReposOwnerRepoKeysEnableId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "id" - in: "path" - description: "公钥 ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - responses: - 204: - description: "已启用" - 403: - description: "没有启用权限" - delete: - tags: - - "Repositories" - summary: "停用仓库公钥" - description: "停用仓库公钥" - operationId: "deleteV5ReposOwnerRepoKeysEnableId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "id" - in: "path" - description: "公钥 ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - responses: - 204: - description: "已停用" - 404: - description: "没有相关公钥" - /v5/repos/{owner}/{repo}/keys/{id}: - get: - tags: - - "Repositories" - summary: "获取仓库的单个公钥" - description: "获取仓库的单个公钥" - operationId: "getV5ReposOwnerRepoKeysId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "id" - in: "path" - description: "公钥 ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/SSHKey" - delete: - tags: - - "Repositories" - summary: "删除一个仓库公钥" - description: "删除一个仓库公钥" - operationId: "deleteV5ReposOwnerRepoKeysId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "id" - in: "path" - description: "公钥 ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - responses: - 204: - description: "删除一个仓库公钥" - /v5/repos/{owner}/{repo}/readme: - get: - tags: - - "Repositories" - summary: "获取仓库README" - description: "获取仓库README" - operationId: "getV5ReposOwnerRepoReadme" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "ref" - in: "query" - description: "分支、tag或commit。默认: 仓库的默认分支(通常是master)" - required: false - type: "string" - x-exportParamName: "Ref" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Content" - /v5/repos/{owner}/{repo}/contents/{path}: - get: - tags: - - "Repositories" - summary: "获取仓库具体路径下的内容" - description: "获取仓库具体路径下的内容" - operationId: "getV5ReposOwnerRepoContents(Path)" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "path" - in: "path" - description: "文件的路径" - required: true - type: "string" - x-exportParamName: "Path" - - name: "ref" - in: "query" - description: "分支、tag或commit。默认: 仓库的默认分支(通常是master)" - required: false - type: "string" - x-exportParamName: "Ref" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Content" - post: - tags: - - "Repositories" - summary: "新建文件" - description: "新建文件" - operationId: "postV5ReposOwnerRepoContentsPath" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "path" - in: "path" - description: "文件的路径" - required: true - type: "string" - x-exportParamName: "Path" - - name: "content" - in: "formData" - description: "文件内容, 要用 base64 编码" - required: true - type: "string" - x-exportParamName: "Content" - - name: "message" - in: "formData" - description: "提交信息" - required: true - type: "string" - x-exportParamName: "Message" - - name: "branch" - in: "formData" - description: "分支名称。默认为仓库对默认分支" - required: false - type: "string" - x-exportParamName: "Branch" - x-optionalDataType: "String" - - name: "committer[name]" - in: "formData" - description: "Committer的名字,默认为当前用户的名字" - required: false - type: "string" - x-exportParamName: "CommitterName" - x-optionalDataType: "String" - - name: "committer[email]" - in: "formData" - description: "Committer的邮箱,默认为当前用户的邮箱" - required: false - type: "string" - x-exportParamName: "CommitterEmail" - x-optionalDataType: "String" - - name: "author[name]" - in: "formData" - description: "Author的名字,默认为当前用户的名字" - required: false - type: "string" - x-exportParamName: "AuthorName" - x-optionalDataType: "String" - - name: "author[email]" - in: "formData" - description: "Author的邮箱,默认为当前用户的邮箱" - required: false - type: "string" - x-exportParamName: "AuthorEmail" - x-optionalDataType: "String" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/CommitContent" - put: - tags: - - "Repositories" - summary: "更新文件" - description: "更新文件" - operationId: "putV5ReposOwnerRepoContentsPath" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "path" - in: "path" - description: "文件的路径" - required: true - type: "string" - x-exportParamName: "Path" - - name: "content" - in: "formData" - description: "文件内容, 要用 base64 编码" - required: true - type: "string" - x-exportParamName: "Content" - - name: "sha" - in: "formData" - description: "文件的 Blob SHA,可通过 [获取仓库具体路径下的内容] API 获取" - required: true - type: "string" - x-exportParamName: "Sha" - - name: "message" - in: "formData" - description: "提交信息" - required: true - type: "string" - x-exportParamName: "Message" - - name: "branch" - in: "formData" - description: "分支名称。默认为仓库对默认分支" - required: false - type: "string" - x-exportParamName: "Branch" - x-optionalDataType: "String" - - name: "committer[name]" - in: "formData" - description: "Committer的名字,默认为当前用户的名字" - required: false - type: "string" - x-exportParamName: "CommitterName" - x-optionalDataType: "String" - - name: "committer[email]" - in: "formData" - description: "Committer的邮箱,默认为当前用户的邮箱" - required: false - type: "string" - x-exportParamName: "CommitterEmail" - x-optionalDataType: "String" - - name: "author[name]" - in: "formData" - description: "Author的名字,默认为当前用户的名字" - required: false - type: "string" - x-exportParamName: "AuthorName" - x-optionalDataType: "String" - - name: "author[email]" - in: "formData" - description: "Author的邮箱,默认为当前用户的邮箱" - required: false - type: "string" - x-exportParamName: "AuthorEmail" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/CommitContent" - delete: - tags: - - "Repositories" - summary: "删除文件" - description: "删除文件" - operationId: "deleteV5ReposOwnerRepoContentsPath" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "path" - in: "path" - description: "文件的路径" - required: true - type: "string" - x-exportParamName: "Path" - - name: "sha" - in: "query" - description: "文件的 Blob SHA,可通过 [获取仓库具体路径下的内容] API 获取" - required: true - type: "string" - x-exportParamName: "Sha" - - name: "message" - in: "query" - description: "提交信息" - required: true - type: "string" - x-exportParamName: "Message" - - name: "branch" - in: "query" - description: "分支名称。默认为仓库对默认分支" - required: false - type: "string" - x-exportParamName: "Branch" - x-optionalDataType: "String" - - name: "committer[name]" - in: "query" - description: "Committer的名字,默认为当前用户的名字" - required: false - type: "string" - x-exportParamName: "CommitterName" - x-optionalDataType: "String" - - name: "committer[email]" - in: "query" - description: "Committer的邮箱,默认为当前用户的邮箱" - required: false - type: "string" - x-exportParamName: "CommitterEmail" - x-optionalDataType: "String" - - name: "author[name]" - in: "query" - description: "Author的名字,默认为当前用户的名字" - required: false - type: "string" - x-exportParamName: "AuthorName" - x-optionalDataType: "String" - - name: "author[email]" - in: "query" - description: "Author的邮箱,默认为当前用户的邮箱" - required: false - type: "string" - x-exportParamName: "AuthorEmail" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/CommitContent" - /v5/repos/{owner}/{repo}/git/blobs/{sha}: - get: - tags: - - "Git Data" - summary: "获取文件Blob" - description: "获取文件Blob" - operationId: "getV5ReposOwnerRepoGitBlobsSha" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "sha" - in: "path" - description: "文件的 Blob SHA,可通过 [获取仓库具体路径下的内容] API 获取" - required: true - type: "string" - x-exportParamName: "Sha" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Blob" - 404: - description: "没有相关数据" - /v5/repos/{owner}/{repo}/git/trees/{sha}: - get: - tags: - - "Git Data" - summary: "获取目录Tree" - description: "获取目录Tree" - operationId: "getV5ReposOwnerRepoGitTreesSha" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "sha" - in: "path" - description: "可以是分支名(如master)、Commit或者目录Tree的SHA值" - required: true - type: "string" - x-exportParamName: "Sha" - - name: "recursive" - in: "query" - description: "赋值为1递归获取目录" - required: false - type: "integer" - format: "int32" - x-exportParamName: "Recursive" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Tree" - 404: - description: "没有相关数据" - 422: - description: "SHA值必须为Commit或Tree的" - /v5/repos/{owner}/{repo}/issues: - get: - tags: - - "Issues" - summary: "仓库的所有Issues" - description: "仓库的所有Issues" - operationId: "getV5ReposOwnerRepoIssues" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "state" - in: "query" - description: "Issue的状态: open(开启的), progressing(进行中), closed(关闭的), rejected(\ - 拒绝的)。 默认: open" - required: false - type: "string" - default: "open" - enum: - - "open" - - "progressing" - - "closed" - - "rejected" - - "all" - x-exportParamName: "State" - x-optionalDataType: "String" - - name: "labels" - in: "query" - description: "用逗号分开的标签。如: bug,performance" - required: false - type: "string" - x-exportParamName: "Labels" - x-optionalDataType: "String" - - name: "sort" - in: "query" - description: "排序依据: 创建时间(created),更新时间(updated_at)。默认: created_at" - required: false - type: "string" - default: "created" - enum: - - "created" - - "updated" - x-exportParamName: "Sort" - x-optionalDataType: "String" - - name: "direction" - in: "query" - description: "排序方式: 升序(asc),降序(desc)。默认: desc" - required: false - type: "string" - default: "desc" - enum: - - "asc" - - "desc" - x-exportParamName: "Direction" - x-optionalDataType: "String" - - name: "since" - in: "query" - description: "起始的更新时间,要求时间格式为 ISO 8601" - required: false - type: "string" - x-exportParamName: "Since" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - - name: "schedule" - in: "query" - description: "计划开始日期,格式:20181006T173008+80-20181007T173008+80(区间),或者 -20181007T173008+80(\ - 小于20181007T173008+80),或者 20181006T173008+80-(大于20181006T173008+80),要求时间格\ - 式为20181006T173008+80" - required: false - type: "string" - x-exportParamName: "Schedule" - x-optionalDataType: "String" - - name: "deadline" - in: "query" - description: "计划截止日期,格式同上" - required: false - type: "string" - x-exportParamName: "Deadline" - x-optionalDataType: "String" - - name: "created_at" - in: "query" - description: "任务创建时间,格式同上" - required: false - type: "string" - x-exportParamName: "CreatedAt" - x-optionalDataType: "String" - - name: "finished_at" - in: "query" - description: "任务完成时间,即任务最后一次转为已完成状态的时间点。格式同上" - required: false - type: "string" - x-exportParamName: "FinishedAt" - x-optionalDataType: "String" - - name: "milestone" - in: "query" - description: "根据里程碑标题。none为没里程碑的,*为所有带里程碑的" - required: false - type: "string" - x-exportParamName: "Milestone" - x-optionalDataType: "String" - - name: "assignee" - in: "query" - description: "用户的username。 none为没指派者, *为所有带有指派者的" - required: false - type: "string" - x-exportParamName: "Assignee" - x-optionalDataType: "String" - - name: "creator" - in: "query" - description: "创建Issues的用户username" - required: false - type: "string" - x-exportParamName: "Creator" - x-optionalDataType: "String" - - name: "program" - in: "query" - description: "所属项目名称。none为没有所属项目,*为所有带所属项目的" - required: false - type: "string" - x-exportParamName: "Program" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Issue" - /v5/repos/{owner}/{repo}/issues/{number}: - get: - tags: - - "Issues" - summary: "仓库的某个Issue" - description: "仓库的某个Issue" - operationId: "getV5ReposOwnerRepoIssuesNumber" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "Issue 编号(区分大小写,无需添加 # 号)" - required: true - type: "string" - x-exportParamName: "Number" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Issue" - /v5/repos/{owner}/issues: - post: - tags: - - "Issues" - summary: "创建Issue" - description: "创建Issue" - operationId: "postV5ReposOwnerIssues" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "formData" - description: "仓库路径(path)" - required: false - type: "string" - x-exportParamName: "Repo" - x-optionalDataType: "String" - - name: "title" - in: "formData" - description: "Issue标题" - required: true - type: "string" - x-exportParamName: "Title" - - name: "issue_type" - in: "formData" - description: "企业自定义任务类型,非企业默认任务类型为“任务”" - required: false - type: "string" - x-exportParamName: "IssueType" - x-optionalDataType: "String" - - name: "body" - in: "formData" - description: "Issue描述" - required: false - type: "string" - x-exportParamName: "Body" - x-optionalDataType: "String" - - name: "assignee" - in: "formData" - description: "Issue负责人的username" - required: false - type: "string" - x-exportParamName: "Assignee" - x-optionalDataType: "String" - - name: "milestone" - in: "formData" - description: "里程碑序号" - required: false - type: "integer" - format: "int32" - x-exportParamName: "Milestone" - x-optionalDataType: "Int32" - - name: "labels" - in: "formData" - description: "用逗号分开的标签,名称要求长度在 2-20 之间且非特殊字符。如: bug,performance" - required: false - type: "string" - x-exportParamName: "Labels" - x-optionalDataType: "String" - - name: "program" - in: "formData" - description: "项目ID" - required: false - type: "string" - x-exportParamName: "Program" - x-optionalDataType: "String" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/Issue" - /v5/repos/{owner}/issues/{number}: - patch: - tags: - - "Issues" - summary: "更新Issue" - description: "更新Issue" - operationId: "patchV5ReposOwnerIssuesNumber" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "number" - in: "path" - description: "Issue 编号(区分大小写,无需添加 # 号)" - required: true - type: "string" - x-exportParamName: "Number" - - in: "body" - name: "body" - description: "可选。Issue 内容" - required: true - schema: - $ref: "#/definitions/IssueUpdateParam" - x-exportParamName: "Body" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Issue" - /v5/repos/{owner}/issues/{number}/operate_logs: - get: - tags: - - "Issues" - summary: "获取某个Issue下的操作日志" - description: "获取某个Issue下的操作日志" - operationId: "getV5ReposOwnerIssuesNumberOperateLogs" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "query" - description: "仓库路径(path)" - required: false - type: "string" - x-exportParamName: "Repo" - x-optionalDataType: "String" - - name: "number" - in: "path" - description: "Issue 编号(区分大小写,无需添加 # 号)" - required: true - type: "string" - x-exportParamName: "Number" - - name: "sort" - in: "query" - description: "按递增(asc)或递减(desc)排序,默认:递减" - required: false - type: "string" - default: "desc" - enum: - - "desc" - - "asc" - x-exportParamName: "Sort" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/OperateLog" - /v5/repos/{owner}/{repo}/labels: - get: - tags: - - "Labels" - summary: "获取仓库所有任务标签" - description: "获取仓库所有任务标签" - operationId: "getV5ReposOwnerRepoLabels" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Label" - post: - tags: - - "Labels" - summary: "创建仓库任务标签" - description: "创建仓库任务标签" - operationId: "postV5ReposOwnerRepoLabels" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "name" - in: "formData" - description: "标签名称" - required: true - type: "string" - x-exportParamName: "Name" - - name: "color" - in: "formData" - description: "标签颜色。为6位的数字,如: 000000" - required: true - type: "string" - x-exportParamName: "Color" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/Label" - /v5/repos/{owner}/{repo}/labels/{name}: - get: - tags: - - "Labels" - summary: "根据标签名称获取单个标签" - description: "根据标签名称获取单个标签" - operationId: "getV5ReposOwnerRepoLabelsName" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "name" - in: "path" - description: "标签名称" - required: true - type: "string" - x-exportParamName: "Name" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Label" - delete: - tags: - - "Labels" - summary: "删除一个仓库任务标签" - description: "删除一个仓库任务标签" - operationId: "deleteV5ReposOwnerRepoLabelsName" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "name" - in: "path" - description: "标签名称" - required: true - type: "string" - x-exportParamName: "Name" - responses: - 204: - description: "删除一个仓库任务标签" - /v5/repos/{owner}/{repo}/labels/{original_name}: - patch: - tags: - - "Labels" - summary: "更新一个仓库任务标签" - description: "更新一个仓库任务标签" - operationId: "patchV5ReposOwnerRepoLabelsOriginalName" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "original_name" - in: "path" - description: "标签原有名称" - required: true - type: "string" - x-exportParamName: "OriginalName" - - name: "name" - in: "formData" - description: "标签新名称" - required: false - type: "string" - x-exportParamName: "Name" - x-optionalDataType: "String" - - name: "color" - in: "formData" - description: "标签新颜色" - required: false - type: "string" - x-exportParamName: "Color" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Label" - /v5/repos/{owner}/{repo}/issues/{number}/labels: - get: - tags: - - "Labels" - summary: "获取仓库任务的所有标签" - description: "获取仓库任务的所有标签" - operationId: "getV5ReposOwnerRepoIssuesNumberLabels" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "Issue 编号(区分大小写,无需添加 # 号)" - required: true - type: "string" - x-exportParamName: "Number" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Label" - post: - tags: - - "Labels" - summary: "创建Issue标签" - description: "创建Issue标签\n 需要在请求的body里填上数组,元素为标签的名字。如: [\"performance\", \"bug\"\ - ]" - operationId: "postV5ReposOwnerRepoIssuesNumberLabels" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "Issue 编号(区分大小写,无需添加 # 号)" - required: true - type: "string" - x-exportParamName: "Number" - - name: "body" - in: "formData" - description: "标签名数组,如: [\"feat\", \"bug\"]" - required: false - type: "array" - items: - type: "string" - collectionFormat: "multi" - x-exportParamName: "Body" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/Label" - put: - tags: - - "Labels" - summary: "替换Issue所有标签" - description: "替换Issue所有标签\n 需要在请求的body里填上数组,元素为标签的名字。如: [\"performance\", \"\ - bug\"]" - operationId: "putV5ReposOwnerRepoIssuesNumberLabels" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "Issue 编号(区分大小写,无需添加 # 号)" - required: true - type: "string" - x-exportParamName: "Number" - - name: "body" - in: "formData" - description: "标签名数组,如: [\"feat\", \"bug\"]" - required: false - type: "array" - items: - type: "string" - collectionFormat: "multi" - x-exportParamName: "Body" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Label" - delete: - tags: - - "Labels" - summary: "删除Issue所有标签" - description: "删除Issue所有标签" - operationId: "deleteV5ReposOwnerRepoIssuesNumberLabels" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "Issue 编号(区分大小写,无需添加 # 号)" - required: true - type: "string" - x-exportParamName: "Number" - responses: - 204: - description: "删除Issue所有标签" - /v5/repos/{owner}/{repo}/issues/{number}/labels/{name}: - delete: - tags: - - "Labels" - summary: "删除Issue标签" - description: "删除Issue标签" - operationId: "deleteV5ReposOwnerRepoIssuesNumberLabelsName" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "Issue 编号(区分大小写,无需添加 # 号)" - required: true - type: "string" - x-exportParamName: "Number" - - name: "name" - in: "path" - description: "标签名称" - required: true - type: "string" - x-exportParamName: "Name" - responses: - 204: - description: "删除Issue标签" - /v5/repos/{owner}/{repo}/milestones: - get: - tags: - - "Milestones" - summary: "获取仓库所有里程碑" - description: "获取仓库所有里程碑" - operationId: "getV5ReposOwnerRepoMilestones" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "state" - in: "query" - description: "里程碑状态: open, closed, all。默认: open" - required: false - type: "string" - default: "open" - enum: - - "open" - - "closed" - - "all" - x-exportParamName: "State" - x-optionalDataType: "String" - - name: "sort" - in: "query" - description: "排序方式: due_on" - required: false - type: "string" - default: "due_on" - enum: - - "due_on" - x-exportParamName: "Sort" - x-optionalDataType: "String" - - name: "direction" - in: "query" - description: "升序(asc)或是降序(desc)。默认: asc" - required: false - type: "string" - x-exportParamName: "Direction" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Milestone" - post: - tags: - - "Milestones" - summary: "创建仓库里程碑" - description: "创建仓库里程碑" - operationId: "postV5ReposOwnerRepoMilestones" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "title" - in: "formData" - description: "里程碑标题" - required: true - type: "string" - x-exportParamName: "Title" - - name: "state" - in: "formData" - description: "里程碑状态: open, closed, all。默认: open" - required: false - type: "string" - default: "open" - enum: - - "open" - - "closed" - - "all" - x-exportParamName: "State" - x-optionalDataType: "String" - - name: "description" - in: "formData" - description: "里程碑具体描述" - required: false - type: "string" - x-exportParamName: "Description" - x-optionalDataType: "String" - - name: "due_on" - in: "formData" - description: "里程碑的截止日期" - required: true - type: "string" - x-exportParamName: "DueOn" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/Milestone" - /v5/repos/{owner}/{repo}/milestones/{number}: - get: - tags: - - "Milestones" - summary: "获取仓库单个里程碑" - description: "获取仓库单个里程碑" - operationId: "getV5ReposOwnerRepoMilestonesNumber" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "里程碑序号(id)" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Number" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Milestone" - delete: - tags: - - "Milestones" - summary: "删除仓库单个里程碑" - description: "删除仓库单个里程碑" - operationId: "deleteV5ReposOwnerRepoMilestonesNumber" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "里程碑序号(id)" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Number" - responses: - 204: - description: "删除仓库单个里程碑" - patch: - tags: - - "Milestones" - summary: "更新仓库里程碑" - description: "更新仓库里程碑" - operationId: "patchV5ReposOwnerRepoMilestonesNumber" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "里程碑序号(id)" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Number" - - name: "title" - in: "formData" - description: "里程碑标题" - required: true - type: "string" - x-exportParamName: "Title" - - name: "state" - in: "formData" - description: "里程碑状态: open, closed, all。默认: open" - required: false - type: "string" - default: "open" - enum: - - "open" - - "closed" - - "all" - x-exportParamName: "State" - x-optionalDataType: "String" - - name: "description" - in: "formData" - description: "里程碑具体描述" - required: false - type: "string" - x-exportParamName: "Description" - x-optionalDataType: "String" - - name: "due_on" - in: "formData" - description: "里程碑的截止日期" - required: true - type: "string" - x-exportParamName: "DueOn" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Milestone" - /v5/repos/{owner}/{repo}/license: - get: - tags: - - "Miscellaneous" - summary: "获取一个仓库使用的开源许可协议" - description: "获取一个仓库使用的开源许可协议" - operationId: "getV5ReposOwnerRepoLicense" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - responses: - 200: - description: "获取一个仓库使用的开源许可协议" - 404: - description: "没有相关数据" - /v5/repos/{owner}/{repo}/comments: - get: - tags: - - "Repositories" - summary: "获取仓库的Commit评论" - description: "获取仓库的Commit评论" - operationId: "getV5ReposOwnerRepoComments" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Note" - /v5/repos/{owner}/{repo}/commits/{ref}/comments: - get: - tags: - - "Repositories" - summary: "获取单个Commit的评论" - description: "获取单个Commit的评论" - operationId: "getV5ReposOwnerRepoCommitsRefComments" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "ref" - in: "path" - description: "Commit的Reference" - required: true - type: "string" - x-exportParamName: "Ref" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Note" - 404: - description: "没有相关数据" - /v5/repos/{owner}/{repo}/comments/{id}: - get: - tags: - - "Repositories" - summary: "获取仓库的某条Commit评论" - description: "获取仓库的某条Commit评论" - operationId: "getV5ReposOwnerRepoCommentsId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "id" - in: "path" - description: "评论的ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Note" - 404: - description: "没有相关数据" - delete: - tags: - - "Repositories" - summary: "删除Commit评论" - description: "删除Commit评论" - operationId: "deleteV5ReposOwnerRepoCommentsId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "id" - in: "path" - description: "评论的ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - responses: - 204: - description: "删除Commit评论" - patch: - tags: - - "Repositories" - summary: "更新Commit评论" - description: "更新Commit评论" - operationId: "patchV5ReposOwnerRepoCommentsId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "id" - in: "path" - description: "评论的ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - - name: "body" - in: "formData" - description: "评论的内容" - required: true - type: "string" - x-exportParamName: "Body" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Note" - 404: - description: "没有相关数据" - /v5/repos/{owner}/{repo}/commits/{sha}/comments: - post: - tags: - - "Repositories" - summary: "创建Commit评论" - description: "创建Commit评论" - operationId: "postV5ReposOwnerRepoCommitsShaComments" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "sha" - in: "path" - description: "评论的sha值" - required: true - type: "string" - x-exportParamName: "Sha" - - name: "body" - in: "formData" - description: "评论的内容" - required: true - type: "string" - x-exportParamName: "Body" - - name: "path" - in: "formData" - description: "文件的相对路径" - required: false - type: "string" - x-exportParamName: "Path" - x-optionalDataType: "String" - - name: "position" - in: "formData" - description: "Diff的相对行数" - required: false - type: "integer" - format: "int32" - x-exportParamName: "Position" - x-optionalDataType: "Int32" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/Note" - 404: - description: "没有相关数据" - /v5/repos/{owner}/{repo}/issues/comments: - get: - tags: - - "Issues" - summary: "获取仓库所有Issue的评论" - description: "获取仓库所有Issue的评论" - operationId: "getV5ReposOwnerRepoIssuesComments" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "sort" - in: "query" - description: "Either created or updated. Default: created" - required: false - type: "string" - default: "created" - enum: - - "created" - - "updated" - x-exportParamName: "Sort" - x-optionalDataType: "String" - - name: "direction" - in: "query" - description: "Either asc or desc. Ignored without the sort parameter." - required: false - type: "string" - default: "asc" - enum: - - "asc" - - "desc" - x-exportParamName: "Direction" - x-optionalDataType: "String" - - name: "since" - in: "query" - description: "Only comments updated at or after this time are returned.\n\ - \ This is a timestamp in ISO\ - \ 8601 format: YYYY-MM-DDTHH:MM:SSZ" - required: false - type: "string" - x-exportParamName: "Since" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Note" - /v5/repos/{owner}/{repo}/issues/{number}/comments: - get: - tags: - - "Issues" - summary: "获取仓库某个Issue所有的评论" - description: "获取仓库某个Issue所有的评论" - operationId: "getV5ReposOwnerRepoIssuesNumberComments" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "Issue 编号(区分大小写,无需添加 # 号)" - required: true - type: "string" - x-exportParamName: "Number" - - name: "since" - in: "query" - description: "Only comments updated at or after this time are returned.\n\ - \ This is a timestamp in ISO\ - \ 8601 format: YYYY-MM-DDTHH:MM:SSZ" - required: false - type: "string" - x-exportParamName: "Since" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Note" - 404: - description: "没有相关数据" - post: - tags: - - "Issues" - summary: "创建某个Issue评论" - description: "创建某个Issue评论" - operationId: "postV5ReposOwnerRepoIssuesNumberComments" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "Issue 编号(区分大小写,无需添加 # 号)" - required: true - type: "string" - x-exportParamName: "Number" - - in: "body" - name: "body" - description: "Issue comment内容" - required: true - schema: - $ref: "#/definitions/IssueCommentPostParam" - x-exportParamName: "Body" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/Note" - /v5/repos/{owner}/{repo}/issues/comments/{id}: - get: - tags: - - "Issues" - summary: "获取仓库Issue某条评论" - description: "获取仓库Issue某条评论" - operationId: "getV5ReposOwnerRepoIssuesCommentsId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "id" - in: "path" - description: "评论的ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Note" - 404: - description: "没有相关数据" - delete: - tags: - - "Issues" - summary: "删除Issue某条评论" - description: "删除Issue某条评论" - operationId: "deleteV5ReposOwnerRepoIssuesCommentsId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "id" - in: "path" - description: "评论的ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - responses: - 204: - description: "删除Issue某条评论" - patch: - tags: - - "Issues" - summary: "更新Issue某条评论" - description: "更新Issue某条评论" - operationId: "patchV5ReposOwnerRepoIssuesCommentsId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "id" - in: "path" - description: "评论的ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - - name: "body" - in: "formData" - description: "The contents of the comment." - required: true - type: "string" - x-exportParamName: "Body" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Note" - /v5/repos/{owner}/{repo}/pages: - get: - tags: - - "Repositories" - summary: "获取Pages信息" - description: "获取Pages信息" - operationId: "getV5ReposOwnerRepoPages" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - responses: - 200: - description: "获取Pages信息" - /v5/repos/{owner}/{repo}/pages/builds: - post: - tags: - - "Repositories" - summary: "请求建立Pages" - description: "请求建立Pages" - operationId: "postV5ReposOwnerRepoPagesBuilds" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - responses: - 201: - description: "请求建立Pages" - /v5/repos/{owner}/{repo}: - get: - tags: - - "Repositories" - summary: "获取用户的某个仓库" - description: "获取用户的某个仓库" - operationId: "getV5ReposOwnerRepo" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Project" - delete: - tags: - - "Repositories" - summary: "删除一个仓库" - description: "删除一个仓库" - operationId: "deleteV5ReposOwnerRepo" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - responses: - 204: - description: "删除一个仓库" - patch: - tags: - - "Repositories" - summary: "更新仓库设置" - description: "更新仓库设置" - operationId: "patchV5ReposOwnerRepo" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "name" - in: "formData" - description: "仓库名称" - required: true - type: "string" - x-exportParamName: "Name" - - name: "description" - in: "formData" - description: "仓库描述" - required: false - type: "string" - x-exportParamName: "Description" - x-optionalDataType: "String" - - name: "homepage" - in: "formData" - description: "主页(eg: https://gitee.com)" - required: false - type: "string" - x-exportParamName: "Homepage" - x-optionalDataType: "String" - - name: "has_issues" - in: "formData" - description: "允许提Issue与否。默认: 允许(true)" - required: false - type: "boolean" - default: true - x-exportParamName: "HasIssues" - x-optionalDataType: "Bool" - - name: "has_wiki" - in: "formData" - description: "提供Wiki与否。默认: 提供(true)" - required: false - type: "boolean" - default: true - x-exportParamName: "HasWiki" - x-optionalDataType: "Bool" - - name: "private" - in: "formData" - description: "仓库公开或私有。" - required: false - type: "boolean" - x-exportParamName: "Private" - x-optionalDataType: "Bool" - - name: "default_branch" - in: "formData" - description: "更新默认分支" - required: false - type: "string" - x-exportParamName: "DefaultBranch" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Project" - /v5/repos/{owner}/{repo}/contributors: - get: - tags: - - "Repositories" - summary: "获取仓库贡献者" - description: "获取仓库贡献者" - operationId: "getV5ReposOwnerRepoContributors" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Contributor" - /v5/repos/{owner}/{repo}/tags: - get: - tags: - - "Repositories" - summary: "列出仓库所有的tags" - description: "列出仓库所有的tags" - operationId: "getV5ReposOwnerRepoTags" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Tag" - /v5/repos/{owner}/{repo}/clear: - put: - tags: - - "Repositories" - summary: "清空一个仓库" - description: "清空一个仓库" - operationId: "putV5ReposOwnerRepoClear" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - responses: - 204: - description: "清空仓库成功" - /v5/repos/{owner}/{repo}/collaborators: - get: - tags: - - "Repositories" - summary: "获取仓库的所有成员" - description: "获取仓库的所有成员" - operationId: "getV5ReposOwnerRepoCollaborators" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/ProjectMember" - /v5/repos/{owner}/{repo}/collaborators/{username}: - get: - tags: - - "Repositories" - summary: "判断用户是否为仓库成员" - description: "判断用户是否为仓库成员" - operationId: "getV5ReposOwnerRepoCollaboratorsUsername" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - responses: - 204: - description: "用户为仓库成员" - put: - tags: - - "Repositories" - summary: "添加仓库成员" - description: "添加仓库成员" - operationId: "putV5ReposOwnerRepoCollaboratorsUsername" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - - in: "body" - name: "body" - description: "仓库成员内容" - required: true - schema: - $ref: "#/definitions/ProjectMemberPutParam" - x-exportParamName: "Body" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/ProjectMember" - delete: - tags: - - "Repositories" - summary: "移除仓库成员" - description: "移除仓库成员" - operationId: "deleteV5ReposOwnerRepoCollaboratorsUsername" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - responses: - 204: - description: "移除仓库成员" - /v5/repos/{owner}/{repo}/collaborators/{username}/permission: - get: - tags: - - "Repositories" - summary: "查看仓库成员的权限" - description: "查看仓库成员的权限" - operationId: "getV5ReposOwnerRepoCollaboratorsUsernamePermission" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/ProjectMemberPermission" - /v5/repos/{owner}/{repo}/forks: - get: - tags: - - "Repositories" - summary: "查看仓库的Forks" - description: "查看仓库的Forks" - operationId: "getV5ReposOwnerRepoForks" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "sort" - in: "query" - description: "排序方式: fork的时间(newest, oldest),star的人数(stargazers)" - required: false - type: "string" - default: "newest" - enum: - - "newest" - - "oldest" - - "stargazers" - x-exportParamName: "Sort" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Project" - 403: - description: "没有权限" - 404: - description: "没有相关数据" - post: - tags: - - "Repositories" - summary: "Fork一个仓库" - description: "Fork一个仓库" - operationId: "postV5ReposOwnerRepoForks" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "organization" - in: "formData" - description: "组织空间地址,不填写默认Fork到用户个人空间地址" - required: false - type: "string" - x-exportParamName: "Organization" - x-optionalDataType: "String" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/Project" - /v5/repos/{owner}/{repo}/pulls: - get: - tags: - - "Pull Requests" - summary: "获取Pull Request列表" - description: "获取Pull Request列表" - operationId: "getV5ReposOwnerRepoPulls" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "state" - in: "query" - description: "可选。Pull Request 状态" - required: false - type: "string" - default: "open" - enum: - - "open" - - "closed" - - "merged" - - "all" - x-exportParamName: "State" - x-optionalDataType: "String" - - name: "head" - in: "query" - description: "可选。Pull Request 提交的源分支。格式:branch 或者:username:branch" - required: false - type: "string" - x-exportParamName: "Head" - x-optionalDataType: "String" - - name: "base" - in: "query" - description: "可选。Pull Request 提交目标分支的名称。" - required: false - type: "string" - x-exportParamName: "Base" - x-optionalDataType: "String" - - name: "sort" - in: "query" - description: "可选。排序字段,默认按创建时间" - required: false - type: "string" - default: "created" - enum: - - "created" - - "updated" - - "popularity" - - "long-running" - x-exportParamName: "Sort" - x-optionalDataType: "String" - - name: "direction" - in: "query" - description: "可选。升序/降序" - required: false - type: "string" - default: "desc" - enum: - - "asc" - - "desc" - x-exportParamName: "Direction" - x-optionalDataType: "String" - - name: "milestone_number" - in: "query" - description: "可选。里程碑序号(id)" - required: false - type: "integer" - format: "int32" - x-exportParamName: "MilestoneNumber" - x-optionalDataType: "Int32" - - name: "labels" - in: "query" - description: "用逗号分开的标签。如: bug,performance" - required: false - type: "string" - x-exportParamName: "Labels" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/PullRequest" - post: - tags: - - "Pull Requests" - summary: "创建Pull Request" - description: "创建Pull Request" - operationId: "postV5ReposOwnerRepoPulls" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "title" - in: "formData" - description: "必填。Pull Request 标题" - required: true - type: "string" - x-exportParamName: "Title" - - name: "head" - in: "formData" - description: "必填。Pull Request 提交的源分支。格式:branch 或者:username:branch" - required: true - type: "string" - x-exportParamName: "Head" - - name: "base" - in: "formData" - description: "必填。Pull Request 提交目标分支的名称" - required: true - type: "string" - x-exportParamName: "Base" - - name: "body" - in: "formData" - description: "可选。Pull Request 内容" - required: false - type: "string" - x-exportParamName: "Body" - x-optionalDataType: "String" - - name: "milestone_number" - in: "formData" - description: "可选。里程碑序号(id)" - required: false - type: "integer" - format: "int32" - x-exportParamName: "MilestoneNumber" - x-optionalDataType: "Int32" - - name: "labels" - in: "formData" - description: "用逗号分开的标签,名称要求长度在 2-20 之间且非特殊字符。如: bug,performance" - required: false - type: "string" - x-exportParamName: "Labels" - x-optionalDataType: "String" - - name: "issue" - in: "formData" - description: "可选。Pull Request的标题和内容可以根据指定的Issue Id自动填充" - required: false - type: "string" - x-exportParamName: "Issue" - x-optionalDataType: "String" - - name: "assignees" - in: "formData" - description: "可选。审查人员username,可多个,半角逗号分隔,如:(username1,username2)" - required: false - type: "string" - x-exportParamName: "Assignees" - x-optionalDataType: "String" - - name: "testers" - in: "formData" - description: "可选。测试人员username,可多个,半角逗号分隔,如:(username1,username2)" - required: false - type: "string" - x-exportParamName: "Testers" - x-optionalDataType: "String" - - name: "prune_source_branch" - in: "formData" - description: "可选。合并PR后是否删除源分支,默认false(不删除)" - required: false - type: "boolean" - x-exportParamName: "PruneSourceBranch" - x-optionalDataType: "Bool" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/PullRequest" - /v5/repos/{owner}/{repo}/pulls/comments: - get: - tags: - - "Pull Requests" - summary: "获取该仓库下的所有Pull Request评论" - description: "获取该仓库下的所有Pull Request评论" - operationId: "getV5ReposOwnerRepoPullsComments" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "sort" - in: "query" - description: "可选。按创建时间/更新时间排序" - required: false - type: "string" - default: "created" - enum: - - "created" - - "updated" - x-exportParamName: "Sort" - x-optionalDataType: "String" - - name: "direction" - in: "query" - description: "可选。升序/降序" - required: false - type: "string" - default: "desc" - enum: - - "asc" - - "desc" - x-exportParamName: "Direction" - x-optionalDataType: "String" - - name: "since" - in: "query" - description: "起始的更新时间,要求时间格式为 ISO 8601" - required: false - type: "string" - x-exportParamName: "Since" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/PullRequestComments" - /v5/repos/{owner}/{repo}/pulls/{number}: - get: - tags: - - "Pull Requests" - summary: "获取单个Pull Request" - description: "获取单个Pull Request" - operationId: "getV5ReposOwnerRepoPullsNumber" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "第几个PR,即本仓库PR的序数" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Number" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/PullRequest" - patch: - tags: - - "Pull Requests" - summary: "更新Pull Request信息" - description: "更新Pull Request信息" - operationId: "patchV5ReposOwnerRepoPullsNumber" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "第几个PR,即本仓库PR的序数" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Number" - - in: "body" - name: "body" - description: "可选。Pull Request 内容" - required: true - schema: - $ref: "#/definitions/PullRequestUpdateParam" - x-exportParamName: "Body" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/PullRequest" - /v5/repos/{owner}/{repo}/pulls/{number}/operate_logs: - get: - tags: - - "Pull Requests" - summary: "获取某个Pull Request的操作日志" - description: "获取某个Pull Request的操作日志" - operationId: "getV5ReposOwnerRepoPullsNumberOperateLogs" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "第几个PR,即本仓库PR的序数" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Number" - - name: "sort" - in: "query" - description: "按递增(asc)或递减(desc)排序,默认:递减" - required: false - type: "string" - default: "desc" - enum: - - "desc" - - "asc" - x-exportParamName: "Sort" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/OperateLog" - /v5/repos/{owner}/{repo}/pulls/{number}/commits: - get: - tags: - - "Pull Requests" - summary: "获取某Pull Request的所有Commit信息。最多显示250条Commit" - description: "获取某Pull Request的所有Commit信息。最多显示250条Commit" - operationId: "getV5ReposOwnerRepoPullsNumberCommits" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "第几个PR,即本仓库PR的序数" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Number" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/PullRequestCommits" - /v5/repos/{owner}/{repo}/pulls/{number}/files: - get: - tags: - - "Pull Requests" - summary: "Pull Request Commit文件列表。最多显示300条diff" - description: "Pull Request Commit文件列表。最多显示300条diff" - operationId: "getV5ReposOwnerRepoPullsNumberFiles" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "第几个PR,即本仓库PR的序数" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Number" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/PullRequestFiles" - /v5/repos/{owner}/{repo}/pulls/{number}/merge: - get: - tags: - - "Pull Requests" - summary: "判断Pull Request是否已经合并" - description: "判断Pull Request是否已经合并" - operationId: "getV5ReposOwnerRepoPullsNumberMerge" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "第几个PR,即本仓库PR的序数" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Number" - responses: - 204: - description: "Pull Request已经合并" - 404: - description: "Pull Request未合并或不存在" - put: - tags: - - "Pull Requests" - summary: "合并Pull Request" - description: "合并Pull Request" - operationId: "putV5ReposOwnerRepoPullsNumberMerge" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "第几个PR,即本仓库PR的序数" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Number" - - in: "body" - name: "body" - description: "PullRequest合入参数" - required: true - schema: - $ref: "#/definitions/PullRequestMergePutParam" - x-exportParamName: "Body" - responses: - 200: - description: "合并Pull Request" - /v5/repos/{owner}/{repo}/pulls/{number}/assignees: - post: - tags: - - "Pull Requests" - summary: "指派用户审查 Pull Request" - description: "指派用户审查 Pull Request" - operationId: "postV5ReposOwnerRepoPullsNumberAssignees" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "第几个PR,即本仓库PR的序数" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Number" - - name: "assignees" - in: "formData" - description: "用户的个人空间地址, 以 , 分隔" - required: true - type: "string" - x-exportParamName: "Assignees" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/PullRequest" - delete: - tags: - - "Pull Requests" - summary: "取消用户审查 Pull Request" - description: "取消用户审查 Pull Request" - operationId: "deleteV5ReposOwnerRepoPullsNumberAssignees" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "第几个PR,即本仓库PR的序数" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Number" - - name: "assignees" - in: "query" - description: "用户的个人空间地址, 以 , 分隔" - required: true - type: "string" - x-exportParamName: "Assignees" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/PullRequest" - /v5/repos/{owner}/{repo}/pulls/{number}/testers: - post: - tags: - - "Pull Requests" - summary: "指派用户测试 Pull Request" - description: "指派用户测试 Pull Request" - operationId: "postV5ReposOwnerRepoPullsNumberTesters" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "第几个PR,即本仓库PR的序数" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Number" - - name: "testers" - in: "formData" - description: "用户的个人空间地址, 以 , 分隔" - required: true - type: "string" - x-exportParamName: "Testers" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/PullRequest" - delete: - tags: - - "Pull Requests" - summary: "取消用户测试 Pull Request" - description: "取消用户测试 Pull Request" - operationId: "deleteV5ReposOwnerRepoPullsNumberTesters" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "第几个PR,即本仓库PR的序数" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Number" - - name: "testers" - in: "query" - description: "用户的个人空间地址, 以 , 分隔" - required: true - type: "string" - x-exportParamName: "Testers" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/PullRequest" - /v5/repos/{owner}/{repo}/pulls/{number}/comments: - get: - tags: - - "Pull Requests" - summary: "获取某个Pull Request的所有评论" - description: "获取某个Pull Request的所有评论" - operationId: "getV5ReposOwnerRepoPullsNumberComments" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "第几个PR,即本仓库PR的序数" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Number" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/PullRequestComments" - post: - tags: - - "Pull Requests" - summary: "提交Pull Request评论" - description: "提交Pull Request评论" - operationId: "postV5ReposOwnerRepoPullsNumberComments" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "number" - in: "path" - description: "第几个PR,即本仓库PR的序数" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Number" - - in: "body" - name: "body" - description: "评论内容" - required: true - schema: - $ref: "#/definitions/PullRequestCommentPostParam" - x-exportParamName: "Body" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/PullRequestComments" - /v5/repos/{owner}/{repo}/pulls/comments/{id}: - get: - tags: - - "Pull Requests" - summary: "获取Pull Request的某个评论" - description: "获取Pull Request的某个评论" - operationId: "getV5ReposOwnerRepoPullsCommentsId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "id" - in: "path" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/PullRequestComments" - delete: - tags: - - "Pull Requests" - summary: "删除评论" - description: "删除评论" - operationId: "deleteV5ReposOwnerRepoPullsCommentsId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "id" - in: "path" - description: "评论的ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - responses: - 204: - description: "删除评论" - patch: - tags: - - "Pull Requests" - summary: "编辑评论" - description: "编辑评论" - operationId: "patchV5ReposOwnerRepoPullsCommentsId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "id" - in: "path" - description: "评论的ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - - name: "body" - in: "formData" - description: "必填。评论内容" - required: true - type: "string" - x-exportParamName: "Body" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/PullRequestComments" - /v5/repos/{owner}/{repo}/releases: - get: - tags: - - "Repositories" - summary: "获取仓库的所有Releases" - description: "获取仓库的所有Releases" - operationId: "getV5ReposOwnerRepoReleases" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Release" - post: - tags: - - "Repositories" - summary: "创建仓库Release" - description: "创建仓库Release" - operationId: "postV5ReposOwnerRepoReleases" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "tag_name" - in: "formData" - description: "Tag 名称, 提倡以v字母为前缀做为Release名称,例如v1.0或者v2.3.4" - required: true - type: "string" - x-exportParamName: "TagName" - - name: "name" - in: "formData" - description: "Release 名称" - required: true - type: "string" - x-exportParamName: "Name" - - name: "body" - in: "formData" - description: "Release 描述" - required: true - type: "string" - x-exportParamName: "Body" - - name: "prerelease" - in: "formData" - description: "是否为预览版本。默认: false(非预览版本)" - required: false - type: "boolean" - x-exportParamName: "Prerelease" - x-optionalDataType: "Bool" - - name: "target_commitish" - in: "formData" - description: "分支名称或者commit SHA, 默认是当前默认分支" - required: true - type: "string" - x-exportParamName: "TargetCommitish" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/Release" - /v5/repos/{owner}/{repo}/releases/{id}: - get: - tags: - - "Repositories" - summary: "获取仓库的单个Releases" - description: "获取仓库的单个Releases" - operationId: "getV5ReposOwnerRepoReleasesId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "id" - in: "path" - description: "发行版本的ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Release" - delete: - tags: - - "Repositories" - summary: "删除仓库Release" - description: "删除仓库Release" - operationId: "deleteV5ReposOwnerRepoReleasesId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "id" - in: "path" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - responses: - 204: - description: "删除仓库Release" - patch: - tags: - - "Repositories" - summary: "更新仓库Release" - description: "更新仓库Release" - operationId: "patchV5ReposOwnerRepoReleasesId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "tag_name" - in: "formData" - description: "Tag 名称, 提倡以v字母为前缀做为Release名称,例如v1.0或者v2.3.4" - required: true - type: "string" - x-exportParamName: "TagName" - - name: "name" - in: "formData" - description: "Release 名称" - required: true - type: "string" - x-exportParamName: "Name" - - name: "body" - in: "formData" - description: "Release 描述" - required: true - type: "string" - x-exportParamName: "Body" - - name: "prerelease" - in: "formData" - description: "是否为预览版本。默认: false(非预览版本)" - required: false - type: "boolean" - x-exportParamName: "Prerelease" - x-optionalDataType: "Bool" - - name: "id" - in: "path" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Release" - /v5/repos/{owner}/{repo}/releases/latest: - get: - tags: - - "Repositories" - summary: "获取仓库的最后更新的Release" - description: "获取仓库的最后更新的Release" - operationId: "getV5ReposOwnerRepoReleasesLatest" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Release" - /v5/repos/{owner}/{repo}/releases/tags/{tag}: - get: - tags: - - "Repositories" - summary: "根据Tag名称获取仓库的Release" - description: "根据Tag名称获取仓库的Release" - operationId: "getV5ReposOwnerRepoReleasesTagsTag" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "tag" - in: "path" - description: "Tag 名称" - required: true - type: "string" - x-exportParamName: "Tag" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Release" - /v5/repos/{owner}/{repo}/hooks: - get: - tags: - - "Webhooks" - summary: "列出仓库的WebHooks" - description: "列出仓库的WebHooks" - operationId: "getV5ReposOwnerRepoHooks" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Hook" - post: - tags: - - "Webhooks" - summary: "创建一个仓库WebHook" - description: "创建一个仓库WebHook" - operationId: "postV5ReposOwnerRepoHooks" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "url" - in: "formData" - description: "远程HTTP URL" - required: true - type: "string" - x-exportParamName: "Url" - - name: "password" - in: "formData" - description: "请求URL时会带上该密码,防止URL被恶意请求" - required: false - type: "string" - x-exportParamName: "Password" - x-optionalDataType: "String" - - name: "push_events" - in: "formData" - description: "Push代码到仓库" - required: false - type: "boolean" - default: true - x-exportParamName: "PushEvents" - x-optionalDataType: "Bool" - - name: "tag_push_events" - in: "formData" - description: "提交Tag到仓库" - required: false - type: "boolean" - x-exportParamName: "TagPushEvents" - x-optionalDataType: "Bool" - - name: "issues_events" - in: "formData" - description: "创建/关闭Issue" - required: false - type: "boolean" - x-exportParamName: "IssuesEvents" - x-optionalDataType: "Bool" - - name: "note_events" - in: "formData" - description: "评论了Issue/代码等等" - required: false - type: "boolean" - x-exportParamName: "NoteEvents" - x-optionalDataType: "Bool" - - name: "merge_requests_events" - in: "formData" - description: "合并请求和合并后" - required: false - type: "boolean" - x-exportParamName: "MergeRequestsEvents" - x-optionalDataType: "Bool" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/Hook" - /v5/repos/{owner}/{repo}/hooks/{id}: - get: - tags: - - "Webhooks" - summary: "获取仓库单个WebHook" - description: "获取仓库单个WebHook" - operationId: "getV5ReposOwnerRepoHooksId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "id" - in: "path" - description: "Webhook的ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Hook" - delete: - tags: - - "Webhooks" - summary: "删除一个仓库WebHook" - description: "删除一个仓库WebHook" - operationId: "deleteV5ReposOwnerRepoHooksId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "id" - in: "path" - description: "Webhook的ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - responses: - 204: - description: "删除一个仓库WebHook" - patch: - tags: - - "Webhooks" - summary: "更新一个仓库WebHook" - description: "更新一个仓库WebHook" - operationId: "patchV5ReposOwnerRepoHooksId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "id" - in: "path" - description: "Webhook的ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - - name: "url" - in: "formData" - description: "远程HTTP URL" - required: true - type: "string" - x-exportParamName: "Url" - - name: "password" - in: "formData" - description: "请求URL时会带上该密码,防止URL被恶意请求" - required: false - type: "string" - x-exportParamName: "Password" - x-optionalDataType: "String" - - name: "push_events" - in: "formData" - description: "Push代码到仓库" - required: false - type: "boolean" - default: true - x-exportParamName: "PushEvents" - x-optionalDataType: "Bool" - - name: "tag_push_events" - in: "formData" - description: "提交Tag到仓库" - required: false - type: "boolean" - x-exportParamName: "TagPushEvents" - x-optionalDataType: "Bool" - - name: "issues_events" - in: "formData" - description: "创建/关闭Issue" - required: false - type: "boolean" - x-exportParamName: "IssuesEvents" - x-optionalDataType: "Bool" - - name: "note_events" - in: "formData" - description: "评论了Issue/代码等等" - required: false - type: "boolean" - x-exportParamName: "NoteEvents" - x-optionalDataType: "Bool" - - name: "merge_requests_events" - in: "formData" - description: "合并请求和合并后" - required: false - type: "boolean" - x-exportParamName: "MergeRequestsEvents" - x-optionalDataType: "Bool" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Hook" - /v5/repos/{owner}/{repo}/hooks/{id}/tests: - post: - tags: - - "Webhooks" - summary: "测试WebHook是否发送成功" - description: "测试WebHook是否发送成功" - operationId: "postV5ReposOwnerRepoHooksIdTests" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "id" - in: "path" - description: "Webhook的ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - responses: - 204: - description: "测试发送成功" - /v5/repos/{owner}/{repo}/stargazers: - get: - tags: - - "Activity" - summary: "列出 star 了仓库的用户" - description: "列出 star 了仓库的用户" - operationId: "getV5ReposOwnerRepoStargazers" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/UserBasic" - 403: - description: "没有权限" - 404: - description: "没有相关数据" - /v5/repos/{owner}/{repo}/subscribers: - get: - tags: - - "Activity" - summary: "列出 watch 了仓库的用户" - description: "列出 watch 了仓库的用户" - operationId: "getV5ReposOwnerRepoSubscribers" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/UserBasic" - 403: - description: "没有权限" - 404: - description: "没有相关数据" - /v5/repos/{owner}/{repo}/events: - get: - tags: - - "Activity" - summary: "列出仓库的所有动态" - description: "列出仓库的所有动态" - operationId: "getV5ReposOwnerRepoEvents" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Event" - 403: - description: "没有权限" - 404: - description: "没有相关数据" - /v5/repos/{owner}/{repo}/notifications: - get: - tags: - - "Activity" - summary: "列出一个仓库里的通知" - description: "列出一个仓库里的通知" - operationId: "getV5ReposOwnerRepoNotifications" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "unread" - in: "query" - description: "是否只获取未读消息,默认:否" - required: false - type: "boolean" - x-exportParamName: "Unread" - x-optionalDataType: "Bool" - - name: "participating" - in: "query" - description: "是否只获取自己直接参与的消息,默认:否" - required: false - type: "boolean" - x-exportParamName: "Participating" - x-optionalDataType: "Bool" - - name: "type" - in: "query" - description: "筛选指定类型的通知,all:所有,event:事件通知,referer:@ 通知" - required: false - type: "string" - default: "all" - enum: - - "all" - - "event" - - "referer" - x-exportParamName: "Type_" - x-optionalDataType: "String" - - name: "since" - in: "query" - description: "只获取在给定时间后更新的消息,要求时间格式为 ISO 8601" - required: false - type: "string" - x-exportParamName: "Since" - x-optionalDataType: "String" - - name: "before" - in: "query" - description: "只获取在给定时间前更新的消息,要求时间格式为 ISO 8601" - required: false - type: "string" - x-exportParamName: "Before" - x-optionalDataType: "String" - - name: "ids" - in: "query" - description: "指定一组通知 ID,以 , 分隔" - required: false - type: "string" - x-exportParamName: "Ids" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/UserNotificationList" - 403: - description: "没有权限" - 404: - description: "没有相关数据" - put: - tags: - - "Activity" - summary: "标记一个仓库里的通知为已读" - description: "标记一个仓库里的通知为已读" - operationId: "putV5ReposOwnerRepoNotifications" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "ids" - in: "formData" - description: "指定一组通知 ID,以 , 分隔" - required: false - type: "string" - x-exportParamName: "Ids" - x-optionalDataType: "String" - responses: - 205: - description: "执行成功" - 403: - description: "没有权限" - /v5/user/keys: - get: - tags: - - "Users" - summary: "列出授权用户的所有公钥" - description: "列出授权用户的所有公钥" - operationId: "getV5UserKeys" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/SSHKey" - post: - tags: - - "Users" - summary: "添加一个公钥" - description: "添加一个公钥" - operationId: "postV5UserKeys" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "key" - in: "formData" - description: "公钥内容" - required: true - type: "string" - x-exportParamName: "Key" - - name: "title" - in: "formData" - description: "公钥名称" - required: true - type: "string" - x-exportParamName: "Title" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/SSHKey" - 400: - description: "数据不合法" - /v5/user/keys/{id}: - get: - tags: - - "Users" - summary: "获取一个公钥" - description: "获取一个公钥" - operationId: "getV5UserKeysId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "id" - in: "path" - description: "公钥 ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/SSHKey" - 404: - description: "没有相关数据" - delete: - tags: - - "Users" - summary: "删除一个公钥" - description: "删除一个公钥" - operationId: "deleteV5UserKeysId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "id" - in: "path" - description: "公钥 ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - responses: - 204: - description: "执行成功" - 404: - description: "没有相关数据" - /v5/user/orgs: - get: - tags: - - "Organizations" - summary: "列出授权用户所属的组织" - description: "列出授权用户所属的组织" - operationId: "getV5UserOrgs" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - - name: "admin" - in: "query" - description: "只列出授权用户管理的组织" - required: false - type: "boolean" - x-exportParamName: "Admin" - x-optionalDataType: "Bool" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Group" - /v5/user/issues: - get: - tags: - - "Issues" - summary: "获取授权用户的所有Issues" - description: "获取授权用户的所有Issues" - operationId: "getV5UserIssues" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "filter" - in: "query" - description: "筛选参数: 授权用户负责的(assigned),授权用户创建的(created),包含前两者的(all)。默认: assigned" - required: false - type: "string" - default: "assigned" - enum: - - "assigned" - - "created" - - "all" - x-exportParamName: "Filter" - x-optionalDataType: "String" - - name: "state" - in: "query" - description: "Issue的状态: open(开启的), progressing(进行中), closed(关闭的), rejected(\ - 拒绝的)。 默认: open" - required: false - type: "string" - default: "open" - enum: - - "open" - - "progressing" - - "closed" - - "rejected" - - "all" - x-exportParamName: "State" - x-optionalDataType: "String" - - name: "labels" - in: "query" - description: "用逗号分开的标签。如: bug,performance" - required: false - type: "string" - x-exportParamName: "Labels" - x-optionalDataType: "String" - - name: "sort" - in: "query" - description: "排序依据: 创建时间(created),更新时间(updated_at)。默认: created_at" - required: false - type: "string" - default: "created" - enum: - - "created" - - "updated" - x-exportParamName: "Sort" - x-optionalDataType: "String" - - name: "direction" - in: "query" - description: "排序方式: 升序(asc),降序(desc)。默认: desc" - required: false - type: "string" - default: "desc" - enum: - - "asc" - - "desc" - x-exportParamName: "Direction" - x-optionalDataType: "String" - - name: "since" - in: "query" - description: "起始的更新时间,要求时间格式为 ISO 8601" - required: false - type: "string" - x-exportParamName: "Since" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - - name: "schedule" - in: "query" - description: "计划开始日期,格式:20181006T173008+80-20181007T173008+80(区间),或者 -20181007T173008+80(\ - 小于20181007T173008+80),或者 20181006T173008+80-(大于20181006T173008+80),要求时间格\ - 式为20181006T173008+80" - required: false - type: "string" - x-exportParamName: "Schedule" - x-optionalDataType: "String" - - name: "deadline" - in: "query" - description: "计划截止日期,格式同上" - required: false - type: "string" - x-exportParamName: "Deadline" - x-optionalDataType: "String" - - name: "created_at" - in: "query" - description: "任务创建时间,格式同上" - required: false - type: "string" - x-exportParamName: "CreatedAt" - x-optionalDataType: "String" - - name: "finished_at" - in: "query" - description: "任务完成时间,即任务最后一次转为已完成状态的时间点。格式同上" - required: false - type: "string" - x-exportParamName: "FinishedAt" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Issue" - /v5/user/repos: - get: - tags: - - "Repositories" - summary: "列出授权用户的所有仓库" - description: "列出授权用户的所有仓库" - operationId: "getV5UserRepos" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "visibility" - in: "query" - description: "公开(public)、私有(private)或者所有(all),默认: 所有(all)" - required: false - type: "string" - enum: - - "private" - - "public" - - "all" - x-exportParamName: "Visibility" - x-optionalDataType: "String" - - name: "affiliation" - in: "query" - description: "owner(授权用户拥有的仓库)、collaborator(授权用户为仓库成员)、organization_member(授\ - 权用户为仓库所在组织并有访问仓库权限)、enterprise_member(授权用户所在企业并有访问仓库权限)、admin(所有有权限的,包括所\ - 管理的组织中所有仓库、所管理的企业的所有仓库)。\n 可以用逗号分隔符组合。如: owner, organization_member\ - \ 或 owner, collaborator, organization_member" - required: false - type: "string" - x-exportParamName: "Affiliation" - x-optionalDataType: "String" - - name: "type" - in: "query" - description: "筛选用户仓库: 其创建(owner)、个人(personal)、其为成员(member)、公开(public)、私有(private),\ - 不能与 visibility 或 affiliation 参数一并使用,否则会报 422 错误" - required: false - type: "string" - enum: - - "all" - - "owner" - - "personal" - - "member" - - "public" - - "private" - x-exportParamName: "Type_" - x-optionalDataType: "String" - - name: "sort" - in: "query" - description: "排序方式: 创建时间(created),更新时间(updated),最后推送时间(pushed),仓库所属与名称(full_name)。\ - 默认: full_name" - required: false - type: "string" - default: "full_name" - enum: - - "created" - - "updated" - - "pushed" - - "full_name" - x-exportParamName: "Sort" - x-optionalDataType: "String" - - name: "direction" - in: "query" - description: "如果sort参数为full_name,用升序(asc)。否则降序(desc)" - required: false - type: "string" - enum: - - "asc" - - "desc" - x-exportParamName: "Direction" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Project" - post: - tags: - - "Repositories" - summary: "创建一个仓库" - description: "创建一个仓库" - operationId: "postV5UserRepos" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "name" - in: "formData" - description: "仓库名称" - required: true - type: "string" - x-exportParamName: "Name" - - name: "description" - in: "formData" - description: "仓库描述" - required: false - type: "string" - x-exportParamName: "Description" - x-optionalDataType: "String" - - name: "homepage" - in: "formData" - description: "主页(eg: https://gitee.com)" - required: false - type: "string" - x-exportParamName: "Homepage" - x-optionalDataType: "String" - - name: "has_issues" - in: "formData" - description: "允许提Issue与否。默认: 允许(true)" - required: false - type: "boolean" - default: true - x-exportParamName: "HasIssues" - x-optionalDataType: "Bool" - - name: "has_wiki" - in: "formData" - description: "提供Wiki与否。默认: 提供(true)" - required: false - type: "boolean" - default: true - x-exportParamName: "HasWiki" - x-optionalDataType: "Bool" - - name: "auto_init" - in: "formData" - description: "值为true时则会用README初始化仓库。默认: 不初始化(false)" - required: false - type: "boolean" - x-exportParamName: "AutoInit" - x-optionalDataType: "Bool" - - name: "gitignore_template" - in: "formData" - description: "Git Ingore模版" - required: false - type: "string" - enum: - - "Actionscript" - - "Ada" - - "Agda" - - "Android" - - "AppEngine" - - "AppceleratorTitanium" - - "ArchLinuxPackages" - - "Autotools" - - "C" - - "C++" - - "CFWheels" - - "CMake" - - "CUDA" - - "CakePHP" - - "ChefCookbook" - - "Clojure" - - "CodeIgniter" - - "CommonLisp" - - "Composer" - - "Concrete5" - - "Coq" - - "CraftCMS" - - "D" - - "DM" - - "Dart" - - "Delphi" - - "Drupal" - - "EPiServer" - - "Eagle" - - "Elisp" - - "Elixir" - - "Elm" - - "Erlang" - - "ExpressionEngine" - - "ExtJs" - - "Fancy" - - "Finale" - - "Flutter" - - "ForceDotCom" - - "Fortran" - - "FuelPHP" - - "GWT" - - "Gcov" - - "GitBook" - - "Global/Anjuta" - - "Global/Ansible" - - "Global/Archives" - - "Global/Backup" - - "Global/Bazaar" - - "Global/BricxCC" - - "Global/CVS" - - "Global/Calabash" - - "Global/Cloud9" - - "Global/CodeKit" - - "Global/DartEditor" - - "Global/Diff" - - "Global/Dreamweaver" - - "Global/Dropbox" - - "Global/Eclipse" - - "Global/EiffelStudio" - - "Global/Emacs" - - "Global/Ensime" - - "Global/Espresso" - - "Global/FlexBuilder" - - "Global/GPG" - - "Global/Images" - - "Global/JDeveloper" - - "Global/JEnv" - - "Global/JetBrains" - - "Global/KDevelop4" - - "Global/Kate" - - "Global/Lazarus" - - "Global/LibreOffice" - - "Global/Linux" - - "Global/LyX" - - "Global/MATLAB" - - "Global/Mercurial" - - "Global/MicrosoftOffice" - - "Global/ModelSim" - - "Global/Momentics" - - "Global/MonoDevelop" - - "Global/NetBeans" - - "Global/Ninja" - - "Global/NotepadPP" - - "Global/Octave" - - "Global/Otto" - - "Global/PSoCCreator" - - "Global/Patch" - - "Global/PuTTY" - - "Global/Redcar" - - "Global/Redis" - - "Global/SBT" - - "Global/SVN" - - "Global/SlickEdit" - - "Global/Stata" - - "Global/SublimeText" - - "Global/SynopsysVCS" - - "Global/Tags" - - "Global/TextMate" - - "Global/TortoiseGit" - - "Global/Vagrant" - - "Global/Vim" - - "Global/VirtualEnv" - - "Global/Virtuoso" - - "Global/VisualStudioCode" - - "Global/WebMethods" - - "Global/Windows" - - "Global/Xcode" - - "Global/XilinxISE" - - "Global/macOS" - - "Go" - - "Godot" - - "Gradle" - - "Grails" - - "Haskell" - - "IGORPro" - - "Idris" - - "JBoss" - - "Java" - - "Jekyll" - - "Joomla" - - "Julia" - - "KiCad" - - "Kohana" - - "Kotlin" - - "LabVIEW" - - "Laravel" - - "Leiningen" - - "LemonStand" - - "Lilypond" - - "Lithium" - - "Lua" - - "Magento" - - "Maven" - - "Mercury" - - "MetaProgrammingSystem" - - "MiniProgram" - - "Nanoc" - - "Nim" - - "Node" - - "OCaml" - - "Objective-C" - - "Opa" - - "OpenCart" - - "OracleForms" - - "Packer" - - "Perl" - - "Perl6" - - "Phalcon" - - "PlayFramework" - - "Plone" - - "Prestashop" - - "Processing" - - "PureScript" - - "Python" - - "Qooxdoo" - - "Qt" - - "R" - - "ROS" - - "Rails" - - "RhodesRhomobile" - - "Ruby" - - "Rust" - - "SCons" - - "Sass" - - "Scala" - - "Scheme" - - "Scrivener" - - "Sdcc" - - "SeamGen" - - "SketchUp" - - "Smalltalk" - - "Stella" - - "SugarCRM" - - "Swift" - - "Symfony" - - "SymphonyCMS" - - "TeX" - - "Terraform" - - "Textpattern" - - "TurboGears2" - - "Typo3" - - "Umbraco" - - "Unity" - - "UnrealEngine" - - "VVVV" - - "VisualStudio" - - "Waf" - - "WordPress" - - "Xojo" - - "Yeoman" - - "Yii" - - "ZendFramework" - - "Zephir" - x-exportParamName: "GitignoreTemplate" - x-optionalDataType: "String" - - name: "license_template" - in: "formData" - description: "License模版" - required: false - type: "string" - enum: - - "MulanPSL-1.0" - - "AFL-3.0" - - "AGPL-3.0" - - "Apache-2.0" - - "Artistic-2.0" - - "BSD-2-Clause" - - "BSD-3-Clause" - - "BSD-3-Clause-Clear" - - "BSL-1.0" - - "CC-BY-4.0" - - "CC-BY-SA-4.0" - - "CC0-1.0" - - "ECL-2.0" - - "EPL-1.0" - - "EUPL-1.1" - - "GPL-2.0" - - "GPL-3.0" - - "ISC" - - "LGPL-2.1" - - "LGPL-3.0" - - "LPPL-1.3c" - - "MIT" - - "MPL-2.0" - - "MS-PL" - - "MS-RL" - - "NCSA" - - "OFL-1.1" - - "OSL-3.0" - - "PostgreSQL" - - "Unlicense" - - "WTFPL" - - "Zlib" - x-exportParamName: "LicenseTemplate" - x-optionalDataType: "String" - - name: "private" - in: "formData" - description: "仓库公开或私有。默认: 公开(false)" - required: false - type: "boolean" - x-exportParamName: "Private" - x-optionalDataType: "Bool" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/Project" - /v5/user: - get: - tags: - - "Users" - summary: "获取授权用户的资料" - description: "获取授权用户的资料" - operationId: "getV5User" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/User" - 404: - description: "没有相关数据" - patch: - tags: - - "Users" - summary: "更新授权用户的资料" - description: "更新授权用户的资料" - operationId: "patchV5User" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "name" - in: "formData" - description: "昵称" - required: false - type: "string" - x-exportParamName: "Name" - x-optionalDataType: "String" - - name: "blog" - in: "formData" - description: "微博链接" - required: false - type: "string" - x-exportParamName: "Blog" - x-optionalDataType: "String" - - name: "weibo" - in: "formData" - description: "博客站点" - required: false - type: "string" - x-exportParamName: "Weibo" - x-optionalDataType: "String" - - name: "bio" - in: "formData" - description: "自我介绍" - required: false - type: "string" - x-exportParamName: "Bio" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/User" - /v5/user/followers: - get: - tags: - - "Users" - summary: "列出授权用户的关注者" - description: "列出授权用户的关注者" - operationId: "getV5UserFollowers" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/UserBasic" - /v5/user/following: - get: - tags: - - "Users" - summary: "列出授权用户正关注的用户" - description: "列出授权用户正关注的用户" - operationId: "getV5UserFollowing" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/UserBasic" - /v5/user/namespaces: - get: - tags: - - "Users" - summary: "列出授权用户所有的 Namespace" - description: "列出授权用户所有的 Namespace" - operationId: "getV5UserNamespaces" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "mode" - in: "query" - description: "参与方式: project(所有参与仓库的namepsce)、intrant(所加入的namespace)、all(包含\ - 前两者),默认(intrant)" - required: false - type: "string" - enum: - - "project" - - "intrant" - - "all" - x-exportParamName: "Mode" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Namespace" - /v5/user/namespace: - get: - tags: - - "Users" - summary: "获取授权用户的一个 Namespace" - description: "获取授权用户的一个 Namespace" - operationId: "getV5UserNamespace" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "path" - in: "query" - description: "Namespace path" - required: true - type: "string" - x-exportParamName: "Path" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Namespace" - /v5/user/starred: - get: - tags: - - "Activity" - summary: "列出授权用户 star 了的仓库" - description: "列出授权用户 star 了的仓库" - operationId: "getV5UserStarred" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "sort" - in: "query" - description: "根据仓库创建时间(created)或最后推送时间(updated)进行排序,默认:创建时间" - required: false - type: "string" - default: "created" - enum: - - "created" - - "last_push" - x-exportParamName: "Sort" - x-optionalDataType: "String" - - name: "direction" - in: "query" - description: "按递增(asc)或递减(desc)排序,默认:递减" - required: false - type: "string" - default: "desc" - enum: - - "asc" - - "desc" - x-exportParamName: "Direction" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Project" - 404: - description: "没有相关数据" - /v5/user/subscriptions: - get: - tags: - - "Activity" - summary: "列出授权用户 watch 了的仓库" - description: "列出授权用户 watch 了的仓库" - operationId: "getV5UserSubscriptions" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "sort" - in: "query" - description: "根据仓库创建时间(created)或最后推送时间(updated)进行排序,默认:创建时间" - required: false - type: "string" - default: "created" - enum: - - "created" - - "last_push" - x-exportParamName: "Sort" - x-optionalDataType: "String" - - name: "direction" - in: "query" - description: "按递增(asc)或递减(desc)排序,默认:递减" - required: false - type: "string" - default: "desc" - enum: - - "asc" - - "desc" - x-exportParamName: "Direction" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Project" - /v5/user/enterprises: - get: - tags: - - "Enterprises" - summary: "列出授权用户所属的企业" - description: "列出授权用户所属的企业" - operationId: "getV5UserEnterprises" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - - name: "admin" - in: "query" - description: "只列出授权用户管理的企业" - required: false - type: "boolean" - default: true - x-exportParamName: "Admin" - x-optionalDataType: "Bool" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/EnterpriseBasic" - /v5/user/memberships/orgs: - get: - tags: - - "Organizations" - summary: "列出授权用户在所属组织的成员资料" - description: "列出授权用户在所属组织的成员资料" - operationId: "getV5UserMembershipsOrgs" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "active" - in: "query" - description: "根据成员是否已激活进行筛选资料,缺省返回所有资料" - required: false - type: "boolean" - x-exportParamName: "Active" - x-optionalDataType: "Bool" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/GroupMember" - /v5/user/memberships/orgs/{org}: - get: - tags: - - "Organizations" - summary: "获取授权用户在一个组织的成员资料" - description: "获取授权用户在一个组织的成员资料" - operationId: "getV5UserMembershipsOrgsOrg" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "org" - in: "path" - description: "组织的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Org" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/GroupMember" - 403: - description: "没有权限" - 404: - description: "没有相关数据" - delete: - tags: - - "Organizations" - summary: "退出一个组织" - description: "退出一个组织" - operationId: "deleteV5UserMembershipsOrgsOrg" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "org" - in: "path" - description: "组织的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Org" - responses: - 204: - description: "执行成功" - 404: - description: "没有相关数据" - patch: - tags: - - "Organizations" - summary: "更新授权用户在一个组织的成员资料" - description: "更新授权用户在一个组织的成员资料" - operationId: "patchV5UserMembershipsOrgsOrg" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "org" - in: "path" - description: "组织的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Org" - - name: "remark" - in: "formData" - description: "在组织中的备注信息" - required: false - type: "string" - x-exportParamName: "Remark" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/GroupMember" - 403: - description: "没有权限" - 404: - description: "没有相关数据" - /v5/user/following/{username}: - get: - tags: - - "Users" - summary: "检查授权用户是否关注了一个用户" - description: "检查授权用户是否关注了一个用户" - operationId: "getV5UserFollowingUsername" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - responses: - 204: - description: "已关注" - 404: - description: "没有相关数据" - put: - tags: - - "Users" - summary: "关注一个用户" - description: "关注一个用户" - operationId: "putV5UserFollowingUsername" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - responses: - 204: - description: "执行成功" - delete: - tags: - - "Users" - summary: "取消关注一个用户" - description: "取消关注一个用户" - operationId: "deleteV5UserFollowingUsername" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - responses: - 204: - description: "执行成功" - /v5/user/starred/{owner}/{repo}: - get: - tags: - - "Activity" - summary: "检查授权用户是否 star 了一个仓库" - description: "检查授权用户是否 star 了一个仓库" - operationId: "getV5UserStarredOwnerRepo" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - responses: - 204: - description: "已经 star 了仓库" - 404: - description: "没有相关数据" - put: - tags: - - "Activity" - summary: "star 一个仓库" - description: "star 一个仓库" - operationId: "putV5UserStarredOwnerRepo" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - responses: - 204: - description: "执行成功" - 400: - description: "数据不合法" - delete: - tags: - - "Activity" - summary: "取消 star 一个仓库" - description: "取消 star 一个仓库" - operationId: "deleteV5UserStarredOwnerRepo" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - responses: - 204: - description: "执行成功" - /v5/user/subscriptions/{owner}/{repo}: - get: - tags: - - "Activity" - summary: "检查授权用户是否 watch 了一个仓库" - description: "检查授权用户是否 watch 了一个仓库" - operationId: "getV5UserSubscriptionsOwnerRepo" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - responses: - 204: - description: "已经 watch 了仓库" - 404: - description: "没有相关数据" - put: - tags: - - "Activity" - summary: "watch 一个仓库" - description: "watch 一个仓库" - operationId: "putV5UserSubscriptionsOwnerRepo" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "watch_type" - in: "formData" - description: "watch策略, watching: 关注所有动态, releases_only: 仅关注版本发行动态, ignoring:\ - \ 关注但不提醒动态" - required: true - type: "string" - default: "watching" - enum: - - "watching" - - "releases_only" - - "ignoring" - x-exportParamName: "WatchType" - responses: - 204: - description: "执行成功" - 400: - description: "数据不合法" - delete: - tags: - - "Activity" - summary: "取消 watch 一个仓库" - description: "取消 watch 一个仓库" - operationId: "deleteV5UserSubscriptionsOwnerRepo" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - responses: - 204: - description: "执行成功" - /v5/gists: - get: - tags: - - "Gists" - summary: "获取代码片段" - description: "获取代码片段" - operationId: "getV5Gists" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "since" - in: "query" - description: "起始的更新时间,要求时间格式为 ISO 8601" - required: false - type: "string" - x-exportParamName: "Since" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Code" - post: - tags: - - "Gists" - summary: "创建代码片段" - description: "创建代码片段" - operationId: "postV5Gists" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "files" - in: "formData" - description: "Hash形式的代码片段文件名以及文件内容。如: { \"file1.txt\": { \"content\": \"String\ - \ file contents\" } }" - required: true - type: "file" - x-exportParamName: "Files" - - name: "description" - in: "formData" - description: "代码片段描述,1~30个字符" - required: true - type: "string" - x-exportParamName: "Description" - - name: "public" - in: "formData" - description: "公开/私有,默认: 私有" - required: false - type: "boolean" - x-exportParamName: "Public" - x-optionalDataType: "Bool" - responses: - 201: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/CodeForksHistory" - /v5/gists/public: - get: - tags: - - "Gists" - summary: "获取公开的代码片段" - description: "获取公开的代码片段" - operationId: "getV5GistsPublic" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "since" - in: "query" - description: "起始的更新时间,要求时间格式为 ISO 8601" - required: false - type: "string" - x-exportParamName: "Since" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Code" - /v5/gists/starred: - get: - tags: - - "Gists" - summary: "获取用户Star的代码片段" - description: "获取用户Star的代码片段" - operationId: "getV5GistsStarred" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "since" - in: "query" - description: "起始的更新时间,要求时间格式为 ISO 8601" - required: false - type: "string" - x-exportParamName: "Since" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Code" - /v5/gists/{gist_id}/comments: - get: - tags: - - "Gists" - summary: "获取代码片段的评论" - description: "获取代码片段的评论" - operationId: "getV5GistsGistIdComments" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "gist_id" - in: "path" - description: "代码片段的ID" - required: true - type: "string" - x-exportParamName: "GistId" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/CodeComment" - post: - tags: - - "Gists" - summary: "增加代码片段的评论" - description: "增加代码片段的评论" - operationId: "postV5GistsGistIdComments" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "gist_id" - in: "path" - description: "代码片段的ID" - required: true - type: "string" - x-exportParamName: "GistId" - - name: "body" - in: "formData" - description: "评论内容" - required: true - type: "string" - x-exportParamName: "Body" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/CodeComment" - /v5/gists/{gist_id}/comments/{id}: - get: - tags: - - "Gists" - summary: "获取单条代码片段的评论" - description: "获取单条代码片段的评论" - operationId: "getV5GistsGistIdCommentsId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "gist_id" - in: "path" - description: "代码片段的ID" - required: true - type: "string" - x-exportParamName: "GistId" - - name: "id" - in: "path" - description: "评论的ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/CodeComment" - delete: - tags: - - "Gists" - summary: "删除代码片段的评论" - description: "删除代码片段的评论" - operationId: "deleteV5GistsGistIdCommentsId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "gist_id" - in: "path" - description: "代码片段的ID" - required: true - type: "string" - x-exportParamName: "GistId" - - name: "id" - in: "path" - description: "评论的ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - responses: - 204: - description: "删除代码片段的评论" - patch: - tags: - - "Gists" - summary: "修改代码片段的评论" - description: "修改代码片段的评论" - operationId: "patchV5GistsGistIdCommentsId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "gist_id" - in: "path" - description: "代码片段的ID" - required: true - type: "string" - x-exportParamName: "GistId" - - name: "id" - in: "path" - description: "评论的ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - - name: "body" - in: "formData" - description: "评论内容" - required: true - type: "string" - x-exportParamName: "Body" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/CodeComment" - /v5/gists/{id}: - get: - tags: - - "Gists" - summary: "获取单条代码片段" - description: "获取单条代码片段" - operationId: "getV5GistsId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "id" - in: "path" - description: "代码片段的ID" - required: true - type: "string" - x-exportParamName: "Id" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/CodeForksHistory" - delete: - tags: - - "Gists" - summary: "删除指定代码片段" - description: "删除指定代码片段" - operationId: "deleteV5GistsId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "id" - in: "path" - description: "代码片段的ID" - required: true - type: "string" - x-exportParamName: "Id" - responses: - 204: - description: "删除指定代码片段" - patch: - tags: - - "Gists" - summary: "修改代码片段" - description: "修改代码片段" - operationId: "patchV5GistsId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "id" - in: "path" - description: "代码片段的ID" - required: true - type: "string" - x-exportParamName: "Id" - - name: "files" - in: "formData" - description: "Hash形式的代码片段文件名以及文件内容。如: { \"file1.txt\": { \"content\": \"String\ - \ file contents\" } }" - required: false - type: "file" - x-exportParamName: "Files" - - name: "description" - in: "formData" - description: "代码片段描述,1~30个字符" - required: false - type: "string" - x-exportParamName: "Description" - x-optionalDataType: "String" - - name: "public" - in: "formData" - description: "公开/私有,默认: 私有" - required: false - type: "boolean" - x-exportParamName: "Public" - x-optionalDataType: "Bool" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/CodeForksHistory" - /v5/gists/{id}/commits: - get: - tags: - - "Gists" - summary: "获取代码片段的commit" - description: "获取代码片段的commit" - operationId: "getV5GistsIdCommits" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "id" - in: "path" - description: "代码片段的ID" - required: true - type: "string" - x-exportParamName: "Id" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/CodeForksHistory" - /v5/gists/{id}/star: - get: - tags: - - "Gists" - summary: "判断代码片段是否已Star" - description: "判断代码片段是否已Star" - operationId: "getV5GistsIdStar" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "id" - in: "path" - description: "代码片段的ID" - required: true - type: "string" - x-exportParamName: "Id" - responses: - 204: - description: "判断代码片段是否已Star" - put: - tags: - - "Gists" - summary: "Star代码片段" - description: "Star代码片段" - operationId: "putV5GistsIdStar" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "id" - in: "path" - description: "代码片段的ID" - required: true - type: "string" - x-exportParamName: "Id" - responses: - 204: - description: "Star代码片段" - delete: - tags: - - "Gists" - summary: "取消Star代码片段" - description: "取消Star代码片段" - operationId: "deleteV5GistsIdStar" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "id" - in: "path" - description: "代码片段的ID" - required: true - type: "string" - x-exportParamName: "Id" - responses: - 204: - description: "取消Star代码片段" - /v5/gists/{id}/forks: - get: - tags: - - "Gists" - summary: "获取 Fork 了指定代码片段的列表" - description: "获取 Fork 了指定代码片段的列表" - operationId: "getV5GistsIdForks" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "id" - in: "path" - description: "代码片段的ID" - required: true - type: "string" - x-exportParamName: "Id" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/CodeForks" - post: - tags: - - "Gists" - summary: "Fork代码片段" - description: "Fork代码片段" - operationId: "postV5GistsIdForks" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "id" - in: "path" - description: "代码片段的ID" - required: true - type: "string" - x-exportParamName: "Id" - responses: - 201: - description: "Fork代码片段" - /v5/users/{username}/gists: - get: - tags: - - "Gists" - summary: "获取指定用户的公开代码片段" - description: "获取指定用户的公开代码片段" - operationId: "getV5UsersUsernameGists" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Code" - /v5/users/{username}/orgs: - get: - tags: - - "Organizations" - summary: "列出用户所属的组织" - description: "列出用户所属的组织" - operationId: "getV5UsersUsernameOrgs" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Group" - /v5/users/organization: - post: - tags: - - "Organizations" - summary: "创建组织" - description: "创建组织" - operationId: "postV5UsersOrganization" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "name" - in: "formData" - description: "组织名称" - required: true - type: "string" - x-exportParamName: "Name" - - name: "org" - in: "formData" - description: "组织的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Org" - - name: "description" - in: "formData" - description: "组织描述" - required: false - type: "string" - x-exportParamName: "Description" - x-optionalDataType: "String" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/Group" - 403: - description: "没有权限" - /v5/users/{username}/repos: - get: - tags: - - "Repositories" - summary: "获取某个用户的公开仓库" - description: "获取某个用户的公开仓库" - operationId: "getV5UsersUsernameRepos" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - - name: "type" - in: "query" - description: "用户创建的仓库(owner),用户个人仓库(personal),用户为仓库成员(member),所有(all)。默认:\ - \ 所有(all)" - required: false - type: "string" - default: "all" - enum: - - "all" - - "owner" - - "personal" - - "member" - x-exportParamName: "Type_" - x-optionalDataType: "String" - - name: "sort" - in: "query" - description: "排序方式: 创建时间(created),更新时间(updated),最后推送时间(pushed),仓库所属与名称(full_name)。\ - 默认: full_name" - required: false - type: "string" - default: "full_name" - enum: - - "created" - - "updated" - - "pushed" - - "full_name" - x-exportParamName: "Sort" - x-optionalDataType: "String" - - name: "direction" - in: "query" - description: "如果sort参数为full_name,用升序(asc)。否则降序(desc)" - required: false - type: "string" - enum: - - "asc" - - "desc" - x-exportParamName: "Direction" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Project" - /v5/users/{username}: - get: - tags: - - "Users" - summary: "获取一个用户" - description: "获取一个用户" - operationId: "getV5UsersUsername" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/User" - 404: - description: "没有相关数据" - /v5/users/{username}/followers: - get: - tags: - - "Users" - summary: "列出指定用户的关注者" - description: "列出指定用户的关注者" - operationId: "getV5UsersUsernameFollowers" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/UserBasic" - 404: - description: "没有相关数据" - /v5/users/{username}/following: - get: - tags: - - "Users" - summary: "列出指定用户正在关注的用户" - description: "列出指定用户正在关注的用户" - operationId: "getV5UsersUsernameFollowing" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/UserBasic" - 404: - description: "没有相关数据" - /v5/users/{username}/following/{target_user}: - get: - tags: - - "Users" - summary: "检查指定用户是否关注目标用户" - description: "检查指定用户是否关注目标用户" - operationId: "getV5UsersUsernameFollowingTargetUser" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - - name: "target_user" - in: "path" - description: "目标用户的用户名(username/login)" - required: true - type: "string" - x-exportParamName: "TargetUser" - responses: - 204: - description: "已关注目标用户" - 404: - description: "没有相关数据" - /v5/users/{username}/keys: - get: - tags: - - "Users" - summary: "列出指定用户的所有公钥" - description: "列出指定用户的所有公钥" - operationId: "getV5UsersUsernameKeys" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/SSHKeyBasic" - 404: - description: "没有相关数据" - /v5/users/{username}/starred: - get: - tags: - - "Activity" - summary: "列出用户 star 了的仓库" - description: "列出用户 star 了的仓库" - operationId: "getV5UsersUsernameStarred" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - - name: "sort" - in: "query" - description: "根据仓库创建时间(created)或最后推送时间(updated)进行排序,默认:创建时间" - required: false - type: "string" - default: "created" - enum: - - "created" - - "last_push" - x-exportParamName: "Sort" - x-optionalDataType: "String" - - name: "direction" - in: "query" - description: "按递增(asc)或递减(desc)排序,默认:递减" - required: false - type: "string" - default: "desc" - enum: - - "asc" - - "desc" - x-exportParamName: "Direction" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Project" - 404: - description: "没有相关数据" - /v5/users/{username}/subscriptions: - get: - tags: - - "Activity" - summary: "列出用户 watch 了的仓库" - description: "列出用户 watch 了的仓库" - operationId: "getV5UsersUsernameSubscriptions" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - - name: "sort" - in: "query" - description: "根据仓库创建时间(created)或最后推送时间(updated)进行排序,默认:创建时间" - required: false - type: "string" - default: "created" - enum: - - "created" - - "last_push" - x-exportParamName: "Sort" - x-optionalDataType: "String" - - name: "direction" - in: "query" - description: "按递增(asc)或递减(desc)排序,默认:递减" - required: false - type: "string" - default: "desc" - enum: - - "asc" - - "desc" - x-exportParamName: "Direction" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Project" - 404: - description: "没有相关数据" - /v5/users/{username}/received_events: - get: - tags: - - "Activity" - summary: "列出一个用户收到的动态" - description: "列出一个用户收到的动态" - operationId: "getV5UsersUsernameReceivedEvents" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Event" - 404: - description: "没有相关数据" - /v5/users/{username}/received_events/public: - get: - tags: - - "Activity" - summary: "列出一个用户收到的公开动态" - description: "列出一个用户收到的公开动态" - operationId: "getV5UsersUsernameReceivedEventsPublic" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Event" - 404: - description: "没有相关数据" - /v5/users/{username}/events: - get: - tags: - - "Activity" - summary: "列出用户的动态" - description: "列出用户的动态" - operationId: "getV5UsersUsernameEvents" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Event" - 404: - description: "没有相关数据" - /v5/users/{username}/events/public: - get: - tags: - - "Activity" - summary: "列出用户的公开动态" - description: "列出用户的公开动态" - operationId: "getV5UsersUsernameEventsPublic" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Event" - 404: - description: "没有相关数据" - /v5/users/{username}/events/orgs/{org}: - get: - tags: - - "Activity" - summary: "列出用户所属组织的动态" - description: "列出用户所属组织的动态" - operationId: "getV5UsersUsernameEventsOrgsOrg" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - - name: "org" - in: "path" - description: "组织的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Org" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Event" - 403: - description: "没有权限" - 404: - description: "没有相关数据" - /v5/orgs/{org}: - get: - tags: - - "Organizations" - summary: "获取一个组织" - description: "获取一个组织" - operationId: "getV5OrgsOrg" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "org" - in: "path" - description: "组织的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Org" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Group" - 403: - description: "没有权限" - 404: - description: "没有相关数据" - patch: - tags: - - "Organizations" - summary: "更新授权用户所管理的组织资料" - description: "更新授权用户所管理的组织资料" - operationId: "patchV5OrgsOrg" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "org" - in: "path" - description: "组织的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Org" - - name: "email" - in: "formData" - description: "组织公开的邮箱地址" - required: false - type: "string" - x-exportParamName: "Email" - x-optionalDataType: "String" - - name: "location" - in: "formData" - description: "组织所在地" - required: false - type: "string" - x-exportParamName: "Location" - x-optionalDataType: "String" - - name: "name" - in: "formData" - description: "组织名称" - required: false - type: "string" - x-exportParamName: "Name" - x-optionalDataType: "String" - - name: "description" - in: "formData" - description: "组织简介" - required: false - type: "string" - x-exportParamName: "Description" - x-optionalDataType: "String" - - name: "html_url" - in: "formData" - description: "组织站点" - required: false - type: "string" - x-exportParamName: "HtmlUrl" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/GroupDetail" - 400: - description: "数据不合法" - 403: - description: "没有权限" - 404: - description: "没有相关数据" - /v5/orgs/{org}/members: - get: - tags: - - "Organizations" - summary: "列出一个组织的所有成员" - description: "列出一个组织的所有成员" - operationId: "getV5OrgsOrgMembers" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "org" - in: "path" - description: "组织的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Org" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - - name: "role" - in: "query" - description: "根据角色筛选成员" - required: false - type: "string" - default: "all" - enum: - - "all" - - "admin" - - "member" - x-exportParamName: "Role" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/UserBasic" - 403: - description: "没有权限" - 404: - description: "没有相关数据" - /v5/orgs/{org}/issues: - get: - tags: - - "Issues" - summary: "获取当前用户某个组织的Issues" - description: "获取当前用户某个组织的Issues" - operationId: "getV5OrgsOrgIssues" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "filter" - in: "query" - description: "筛选参数: 授权用户负责的(assigned),授权用户创建的(created),包含前两者的(all)。默认: assigned" - required: false - type: "string" - default: "assigned" - enum: - - "assigned" - - "created" - - "all" - x-exportParamName: "Filter" - x-optionalDataType: "String" - - name: "state" - in: "query" - description: "Issue的状态: open(开启的), progressing(进行中), closed(关闭的), rejected(\ - 拒绝的)。 默认: open" - required: false - type: "string" - default: "open" - enum: - - "open" - - "progressing" - - "closed" - - "rejected" - - "all" - x-exportParamName: "State" - x-optionalDataType: "String" - - name: "labels" - in: "query" - description: "用逗号分开的标签。如: bug,performance" - required: false - type: "string" - x-exportParamName: "Labels" - x-optionalDataType: "String" - - name: "sort" - in: "query" - description: "排序依据: 创建时间(created),更新时间(updated_at)。默认: created_at" - required: false - type: "string" - default: "created" - enum: - - "created" - - "updated" - x-exportParamName: "Sort" - x-optionalDataType: "String" - - name: "direction" - in: "query" - description: "排序方式: 升序(asc),降序(desc)。默认: desc" - required: false - type: "string" - default: "desc" - enum: - - "asc" - - "desc" - x-exportParamName: "Direction" - x-optionalDataType: "String" - - name: "since" - in: "query" - description: "起始的更新时间,要求时间格式为 ISO 8601" - required: false - type: "string" - x-exportParamName: "Since" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - - name: "schedule" - in: "query" - description: "计划开始日期,格式:20181006T173008+80-20181007T173008+80(区间),或者 -20181007T173008+80(\ - 小于20181007T173008+80),或者 20181006T173008+80-(大于20181006T173008+80),要求时间格\ - 式为20181006T173008+80" - required: false - type: "string" - x-exportParamName: "Schedule" - x-optionalDataType: "String" - - name: "deadline" - in: "query" - description: "计划截止日期,格式同上" - required: false - type: "string" - x-exportParamName: "Deadline" - x-optionalDataType: "String" - - name: "created_at" - in: "query" - description: "任务创建时间,格式同上" - required: false - type: "string" - x-exportParamName: "CreatedAt" - x-optionalDataType: "String" - - name: "finished_at" - in: "query" - description: "任务完成时间,即任务最后一次转为已完成状态的时间点。格式同上" - required: false - type: "string" - x-exportParamName: "FinishedAt" - x-optionalDataType: "String" - - name: "org" - in: "path" - description: "组织的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Org" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Issue" - /v5/orgs/{org}/repos: - get: - tags: - - "Repositories" - summary: "获取一个组织的仓库" - description: "获取一个组织的仓库" - operationId: "getV5OrgsOrgRepos" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "org" - in: "path" - description: "组织的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Org" - - name: "type" - in: "query" - description: "筛选仓库的类型,可以是 all, public, private。默认: all" - required: false - type: "string" - default: "all" - enum: - - "all" - - "public" - - "private" - x-exportParamName: "Type_" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Project" - post: - tags: - - "Repositories" - summary: "创建组织仓库" - description: "创建组织仓库" - operationId: "postV5OrgsOrgRepos" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "org" - in: "path" - description: "组织的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Org" - - in: "body" - name: "body" - description: "Repositorie 内容" - required: true - schema: - $ref: "#/definitions/RepositoryPostParam" - x-exportParamName: "Body" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/Project" - /v5/orgs/{org}/memberships/{username}: - get: - tags: - - "Organizations" - summary: "获取授权用户所属组织的一个成员" - description: "获取授权用户所属组织的一个成员" - operationId: "getV5OrgsOrgMembershipsUsername" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "org" - in: "path" - description: "组织的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Org" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/GroupMember" - 404: - description: "没有相关数据" - put: - tags: - - "Organizations" - summary: "增加或更新授权用户所管理组织的成员" - description: "增加或更新授权用户所管理组织的成员" - operationId: "putV5OrgsOrgMembershipsUsername" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "org" - in: "path" - description: "组织的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Org" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - - name: "role" - in: "formData" - description: "设置用户在组织的角色" - required: false - type: "string" - default: "member" - enum: - - "admin" - - "member" - x-exportParamName: "Role" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/GroupMember" - 400: - description: "数据不合法" - 403: - description: "没有权限" - 404: - description: "没有相关数据" - delete: - tags: - - "Organizations" - summary: "移除授权用户所管理组织中的成员" - description: "移除授权用户所管理组织中的成员" - operationId: "deleteV5OrgsOrgMembershipsUsername" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "org" - in: "path" - description: "组织的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Org" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - responses: - 204: - description: "执行成功" - 403: - description: "没有权限" - 404: - description: "没有相关数据" - /v5/orgs/{org}/events: - get: - tags: - - "Activity" - summary: "列出组织的公开动态" - description: "列出组织的公开动态" - operationId: "getV5OrgsOrgEvents" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "org" - in: "path" - description: "组织的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Org" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Event" - 403: - description: "没有权限" - 404: - description: "没有相关数据" - /v5/issues: - get: - tags: - - "Issues" - summary: "获取当前授权用户的所有Issues" - description: "获取当前授权用户的所有Issues" - operationId: "getV5Issues" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "filter" - in: "query" - description: "筛选参数: 授权用户负责的(assigned),授权用户创建的(created),包含前两者的(all)。默认: assigned" - required: false - type: "string" - default: "assigned" - enum: - - "assigned" - - "created" - - "all" - x-exportParamName: "Filter" - x-optionalDataType: "String" - - name: "state" - in: "query" - description: "Issue的状态: open(开启的), progressing(进行中), closed(关闭的), rejected(\ - 拒绝的)。 默认: open" - required: false - type: "string" - default: "open" - enum: - - "open" - - "progressing" - - "closed" - - "rejected" - - "all" - x-exportParamName: "State" - x-optionalDataType: "String" - - name: "labels" - in: "query" - description: "用逗号分开的标签。如: bug,performance" - required: false - type: "string" - x-exportParamName: "Labels" - x-optionalDataType: "String" - - name: "sort" - in: "query" - description: "排序依据: 创建时间(created),更新时间(updated_at)。默认: created_at" - required: false - type: "string" - default: "created" - enum: - - "created" - - "updated" - x-exportParamName: "Sort" - x-optionalDataType: "String" - - name: "direction" - in: "query" - description: "排序方式: 升序(asc),降序(desc)。默认: desc" - required: false - type: "string" - default: "desc" - enum: - - "asc" - - "desc" - x-exportParamName: "Direction" - x-optionalDataType: "String" - - name: "since" - in: "query" - description: "起始的更新时间,要求时间格式为 ISO 8601" - required: false - type: "string" - x-exportParamName: "Since" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - - name: "schedule" - in: "query" - description: "计划开始日期,格式:20181006T173008+80-20181007T173008+80(区间),或者 -20181007T173008+80(\ - 小于20181007T173008+80),或者 20181006T173008+80-(大于20181006T173008+80),要求时间格\ - 式为20181006T173008+80" - required: false - type: "string" - x-exportParamName: "Schedule" - x-optionalDataType: "String" - - name: "deadline" - in: "query" - description: "计划截止日期,格式同上" - required: false - type: "string" - x-exportParamName: "Deadline" - x-optionalDataType: "String" - - name: "created_at" - in: "query" - description: "任务创建时间,格式同上" - required: false - type: "string" - x-exportParamName: "CreatedAt" - x-optionalDataType: "String" - - name: "finished_at" - in: "query" - description: "任务完成时间,即任务最后一次转为已完成状态的时间点。格式同上" - required: false - type: "string" - x-exportParamName: "FinishedAt" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Issue" - /v5/enterprises/{enterprise}/issues: - get: - tags: - - "Issues" - summary: "获取某个企业的所有Issues" - description: "获取某个企业的所有Issues" - operationId: "getV5EnterprisesEnterpriseIssues" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "enterprise" - in: "path" - description: "企业的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Enterprise" - - name: "state" - in: "query" - description: "Issue的状态: open(开启的), progressing(进行中), closed(关闭的), rejected(\ - 拒绝的)。 默认: open" - required: false - type: "string" - default: "open" - enum: - - "open" - - "progressing" - - "closed" - - "rejected" - - "all" - x-exportParamName: "State" - x-optionalDataType: "String" - - name: "labels" - in: "query" - description: "用逗号分开的标签。如: bug,performance" - required: false - type: "string" - x-exportParamName: "Labels" - x-optionalDataType: "String" - - name: "sort" - in: "query" - description: "排序依据: 创建时间(created),更新时间(updated_at)。默认: created_at" - required: false - type: "string" - default: "created" - enum: - - "created" - - "updated" - x-exportParamName: "Sort" - x-optionalDataType: "String" - - name: "direction" - in: "query" - description: "排序方式: 升序(asc),降序(desc)。默认: desc" - required: false - type: "string" - default: "desc" - enum: - - "asc" - - "desc" - x-exportParamName: "Direction" - x-optionalDataType: "String" - - name: "since" - in: "query" - description: "起始的更新时间,要求时间格式为 ISO 8601" - required: false - type: "string" - x-exportParamName: "Since" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - - name: "schedule" - in: "query" - description: "计划开始日期,格式:20181006T173008+80-20181007T173008+80(区间),或者 -20181007T173008+80(\ - 小于20181007T173008+80),或者 20181006T173008+80-(大于20181006T173008+80),要求时间格\ - 式为20181006T173008+80" - required: false - type: "string" - x-exportParamName: "Schedule" - x-optionalDataType: "String" - - name: "deadline" - in: "query" - description: "计划截止日期,格式同上" - required: false - type: "string" - x-exportParamName: "Deadline" - x-optionalDataType: "String" - - name: "created_at" - in: "query" - description: "任务创建时间,格式同上" - required: false - type: "string" - x-exportParamName: "CreatedAt" - x-optionalDataType: "String" - - name: "finished_at" - in: "query" - description: "任务完成时间,即任务最后一次转为已完成状态的时间点。格式同上" - required: false - type: "string" - x-exportParamName: "FinishedAt" - x-optionalDataType: "String" - - name: "milestone" - in: "query" - description: "根据里程碑标题。none为没里程碑的,*为所有带里程碑的" - required: false - type: "string" - x-exportParamName: "Milestone" - x-optionalDataType: "String" - - name: "assignee" - in: "query" - description: "用户的username。 none为没指派者, *为所有带有指派者的" - required: false - type: "string" - x-exportParamName: "Assignee" - x-optionalDataType: "String" - - name: "creator" - in: "query" - description: "创建Issues的用户username" - required: false - type: "string" - x-exportParamName: "Creator" - x-optionalDataType: "String" - - name: "program" - in: "query" - description: "所属项目名称。none为没所属有项目的,*为所有带所属项目的" - required: false - type: "string" - x-exportParamName: "Program" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Issue" - /v5/enterprises/{enterprise}: - get: - tags: - - "Enterprises" - summary: "获取一个企业" - description: "获取一个企业" - operationId: "getV5EnterprisesEnterprise" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "enterprise" - in: "path" - description: "企业的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Enterprise" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/EnterpriseBasic" - 403: - description: "没有权限" - 404: - description: "没有相关数据" - /v5/enterprises/{enterprise}/members: - get: - tags: - - "Enterprises" - summary: "列出企业的所有成员" - description: "列出企业的所有成员" - operationId: "getV5EnterprisesEnterpriseMembers" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "enterprise" - in: "path" - description: "企业的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Enterprise" - - name: "role" - in: "query" - description: "根据角色筛选成员" - required: false - type: "string" - default: "all" - enum: - - "all" - - "admin" - - "member" - x-exportParamName: "Role" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/EnterpriseMember" - 403: - description: "没有权限" - 404: - description: "没有相关数据" - post: - tags: - - "Enterprises" - summary: "添加或邀请企业成员" - description: "添加或邀请企业成员" - operationId: "postV5EnterprisesEnterpriseMembers" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "enterprise" - in: "path" - description: "企业的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Enterprise" - - name: "username" - in: "formData" - description: "需要邀请的码云用户名(username/login),username,email至少填写一个" - required: false - type: "string" - x-exportParamName: "Username" - x-optionalDataType: "String" - - name: "email" - in: "formData" - description: "要添加邮箱地址,若该邮箱未注册则自动创建帐号。username,email至少填写一个" - required: false - type: "string" - x-exportParamName: "Email" - x-optionalDataType: "String" - - name: "outsourced" - in: "formData" - description: "是否企业外包成员,默认:否" - required: false - type: "boolean" - x-exportParamName: "Outsourced" - x-optionalDataType: "Bool" - - name: "role" - in: "formData" - description: "企业角色,默认普通成员" - required: false - type: "string" - default: "member" - enum: - - "admin" - - "member" - x-exportParamName: "Role" - x-optionalDataType: "String" - - name: "name" - in: "formData" - description: "企业成员真实姓名(备注)" - required: false - type: "string" - x-exportParamName: "Name" - x-optionalDataType: "String" - responses: - 204: - description: "执行成功" - 403: - description: "没有权限" - 404: - description: "没有相关数据" - /v5/enterprises/{enterprise}/week_reports/{id}/comments: - get: - tags: - - "Enterprises" - summary: "某个周报评论列表" - description: "某个周报评论列表" - operationId: "getV5EnterprisesEnterpriseWeekReportsIdComments" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "enterprise" - in: "path" - description: "企业的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Enterprise" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - - name: "id" - in: "path" - description: "周报ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Note" - /v5/enterprises/{enterprise}/week_reports/{id}/comment: - post: - tags: - - "Enterprises" - summary: "评论周报" - description: "评论周报" - operationId: "postV5EnterprisesEnterpriseWeekReportsIdComment" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "enterprise" - in: "path" - description: "企业的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Enterprise" - - name: "id" - in: "path" - description: "周报ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - - name: "body" - in: "formData" - description: "评论的内容" - required: true - type: "string" - x-exportParamName: "Body" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/Note" - /v5/enterprises/{enterprise}/week_reports/{report_id}/comments/{id}: - delete: - tags: - - "Enterprises" - summary: "删除周报某个评论" - description: "删除周报某个评论" - operationId: "deleteV5EnterprisesEnterpriseWeekReportsReportIdCommentsId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "enterprise" - in: "path" - description: "企业的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Enterprise" - - name: "report_id" - in: "path" - description: "周报ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "ReportId" - - name: "id" - in: "path" - description: "评论ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - responses: - 204: - description: "删除周报某个评论" - /v5/enterprises/{enterprise}/users/{username}/week_reports: - get: - tags: - - "Enterprises" - summary: "个人周报列表" - description: "个人周报列表" - operationId: "getV5EnterprisesEnterpriseUsersUsernameWeekReports" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "enterprise" - in: "path" - description: "企业的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Enterprise" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/WeekReport" - /v5/enterprises/{enterprise}/week_reports: - get: - tags: - - "Enterprises" - summary: "企业成员周报列表" - description: "企业成员周报列表" - operationId: "getV5EnterprisesEnterpriseWeekReports" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "enterprise" - in: "path" - description: "企业的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Enterprise" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - - name: "username" - in: "query" - description: "用户名(username/login)" - required: false - type: "string" - x-exportParamName: "Username" - x-optionalDataType: "String" - - name: "year" - in: "query" - description: "周报所属年" - required: false - type: "integer" - format: "int32" - x-exportParamName: "Year" - x-optionalDataType: "Int32" - - name: "week_index" - in: "query" - description: "周报所属周" - required: false - type: "integer" - format: "int32" - x-exportParamName: "WeekIndex" - x-optionalDataType: "Int32" - - name: "date" - in: "query" - description: "周报日期(格式:2019-03-25)" - required: false - type: "string" - x-exportParamName: "Date" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/WeekReport" - /v5/enterprises/{enterprise}/week_reports/{id}: - get: - tags: - - "Enterprises" - summary: "周报详情" - description: "周报详情" - operationId: "getV5EnterprisesEnterpriseWeekReportsId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "enterprise" - in: "path" - description: "企业的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Enterprise" - - name: "id" - in: "path" - description: "周报ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/WeekReport" - /v5/enterprises/{enterprise}/week_report/{id}: - patch: - tags: - - "Enterprises" - summary: "编辑周报" - description: "编辑周报" - operationId: "patchV5EnterprisesEnterpriseWeekReportId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "enterprise" - in: "path" - description: "企业的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Enterprise" - - name: "id" - in: "path" - description: "周报ID" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Id" - - name: "content" - in: "formData" - description: "周报内容" - required: true - type: "string" - x-exportParamName: "Content" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/WeekReport" - /v5/enterprises/{enterprise}/week_report: - post: - tags: - - "Enterprises" - summary: "新建周报" - description: "新建周报" - operationId: "postV5EnterprisesEnterpriseWeekReport" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "enterprise" - in: "path" - description: "企业的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Enterprise" - - name: "year" - in: "formData" - description: "周报所属年" - required: true - type: "integer" - format: "int32" - x-exportParamName: "Year" - - name: "content" - in: "formData" - description: "周报内容" - required: true - type: "string" - x-exportParamName: "Content" - - name: "week_index" - in: "formData" - description: "周报所属周" - required: true - type: "integer" - format: "int32" - x-exportParamName: "WeekIndex" - - name: "username" - in: "formData" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - - name: "date" - in: "formData" - description: "周报日期(格式:2019-03-25)" - required: false - type: "string" - x-exportParamName: "Date" - x-optionalDataType: "String" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/WeekReport" - /v5/enterprises/{enterprise}/issues/{number}: - get: - tags: - - "Issues" - summary: "获取企业的某个Issue" - description: "获取企业的某个Issue" - operationId: "getV5EnterprisesEnterpriseIssuesNumber" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "enterprise" - in: "path" - description: "企业的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Enterprise" - - name: "number" - in: "path" - description: "Issue 编号(区分大小写,无需添加 # 号)" - required: true - type: "string" - x-exportParamName: "Number" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Issue" - /v5/enterprises/{enterprise}/issues/{number}/comments: - get: - tags: - - "Issues" - summary: "获取企业某个Issue所有评论" - description: "获取企业某个Issue所有评论" - operationId: "getV5EnterprisesEnterpriseIssuesNumberComments" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "enterprise" - in: "path" - description: "企业的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Enterprise" - - name: "number" - in: "path" - description: "Issue 编号(区分大小写,无需添加 # 号)" - required: true - type: "string" - x-exportParamName: "Number" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Note" - /v5/enterprises/{enterprise}/issues/{number}/labels: - get: - tags: - - "Issues" - summary: "获取企业某个Issue所有标签" - description: "获取企业某个Issue所有标签" - operationId: "getV5EnterprisesEnterpriseIssuesNumberLabels" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "enterprise" - in: "path" - description: "企业的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Enterprise" - - name: "number" - in: "path" - description: "Issue 编号(区分大小写,无需添加 # 号)" - required: true - type: "string" - x-exportParamName: "Number" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Label" - /v5/enterprises/{enterprise}/labels: - get: - tags: - - "Labels" - summary: "获取企业所有标签" - description: "获取企业所有标签" - operationId: "getV5EnterprisesEnterpriseLabels" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "enterprise" - in: "path" - description: "企业的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Enterprise" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Label" - /v5/enterprises/{enterprise}/labels/{name}: - get: - tags: - - "Labels" - summary: "获取企业某个标签" - description: "获取企业某个标签" - operationId: "getV5EnterprisesEnterpriseLabelsName" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "enterprise" - in: "path" - description: "企业的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Enterprise" - - name: "name" - in: "path" - description: "标签名称" - required: true - type: "string" - x-exportParamName: "Name" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Label" - /v5/enterprises/{enterprise}/repos: - get: - tags: - - "Repositories" - summary: "获取企业的所有仓库" - description: "获取企业的所有仓库" - operationId: "getV5EnterprisesEnterpriseRepos" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "enterprise" - in: "path" - description: "企业的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Enterprise" - - name: "type" - in: "query" - description: "筛选仓库的类型,可以是 all, public, internal, private。默认: all" - required: false - type: "string" - default: "all" - enum: - - "all" - - "public" - - "internal" - - "private" - x-exportParamName: "Type_" - x-optionalDataType: "String" - - name: "direct" - in: "query" - description: "只获取直属仓库,默认: false" - required: false - type: "boolean" - x-exportParamName: "Direct" - x-optionalDataType: "Bool" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/Project" - post: - tags: - - "Repositories" - summary: "创建企业仓库" - description: "创建企业仓库" - operationId: "postV5EnterprisesEnterpriseRepos" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "name" - in: "formData" - description: "仓库名称" - required: true - type: "string" - x-exportParamName: "Name" - - name: "description" - in: "formData" - description: "仓库描述" - required: false - type: "string" - x-exportParamName: "Description" - x-optionalDataType: "String" - - name: "homepage" - in: "formData" - description: "主页(eg: https://gitee.com)" - required: false - type: "string" - x-exportParamName: "Homepage" - x-optionalDataType: "String" - - name: "has_issues" - in: "formData" - description: "允许提Issue与否。默认: 允许(true)" - required: false - type: "boolean" - default: true - x-exportParamName: "HasIssues" - x-optionalDataType: "Bool" - - name: "has_wiki" - in: "formData" - description: "提供Wiki与否。默认: 提供(true)" - required: false - type: "boolean" - default: true - x-exportParamName: "HasWiki" - x-optionalDataType: "Bool" - - name: "enterprise" - in: "path" - description: "企业的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Enterprise" - - name: "auto_init" - in: "formData" - description: "值为true时则会用README初始化仓库。默认: 不初始化(false)" - required: false - type: "boolean" - x-exportParamName: "AutoInit" - x-optionalDataType: "Bool" - - name: "gitignore_template" - in: "formData" - description: "Git Ingore模版" - required: false - type: "string" - enum: - - "Actionscript" - - "Ada" - - "Agda" - - "Android" - - "AppEngine" - - "AppceleratorTitanium" - - "ArchLinuxPackages" - - "Autotools" - - "C" - - "C++" - - "CFWheels" - - "CMake" - - "CUDA" - - "CakePHP" - - "ChefCookbook" - - "Clojure" - - "CodeIgniter" - - "CommonLisp" - - "Composer" - - "Concrete5" - - "Coq" - - "CraftCMS" - - "D" - - "DM" - - "Dart" - - "Delphi" - - "Drupal" - - "EPiServer" - - "Eagle" - - "Elisp" - - "Elixir" - - "Elm" - - "Erlang" - - "ExpressionEngine" - - "ExtJs" - - "Fancy" - - "Finale" - - "Flutter" - - "ForceDotCom" - - "Fortran" - - "FuelPHP" - - "GWT" - - "Gcov" - - "GitBook" - - "Global/Anjuta" - - "Global/Ansible" - - "Global/Archives" - - "Global/Backup" - - "Global/Bazaar" - - "Global/BricxCC" - - "Global/CVS" - - "Global/Calabash" - - "Global/Cloud9" - - "Global/CodeKit" - - "Global/DartEditor" - - "Global/Diff" - - "Global/Dreamweaver" - - "Global/Dropbox" - - "Global/Eclipse" - - "Global/EiffelStudio" - - "Global/Emacs" - - "Global/Ensime" - - "Global/Espresso" - - "Global/FlexBuilder" - - "Global/GPG" - - "Global/Images" - - "Global/JDeveloper" - - "Global/JEnv" - - "Global/JetBrains" - - "Global/KDevelop4" - - "Global/Kate" - - "Global/Lazarus" - - "Global/LibreOffice" - - "Global/Linux" - - "Global/LyX" - - "Global/MATLAB" - - "Global/Mercurial" - - "Global/MicrosoftOffice" - - "Global/ModelSim" - - "Global/Momentics" - - "Global/MonoDevelop" - - "Global/NetBeans" - - "Global/Ninja" - - "Global/NotepadPP" - - "Global/Octave" - - "Global/Otto" - - "Global/PSoCCreator" - - "Global/Patch" - - "Global/PuTTY" - - "Global/Redcar" - - "Global/Redis" - - "Global/SBT" - - "Global/SVN" - - "Global/SlickEdit" - - "Global/Stata" - - "Global/SublimeText" - - "Global/SynopsysVCS" - - "Global/Tags" - - "Global/TextMate" - - "Global/TortoiseGit" - - "Global/Vagrant" - - "Global/Vim" - - "Global/VirtualEnv" - - "Global/Virtuoso" - - "Global/VisualStudioCode" - - "Global/WebMethods" - - "Global/Windows" - - "Global/Xcode" - - "Global/XilinxISE" - - "Global/macOS" - - "Go" - - "Godot" - - "Gradle" - - "Grails" - - "Haskell" - - "IGORPro" - - "Idris" - - "JBoss" - - "Java" - - "Jekyll" - - "Joomla" - - "Julia" - - "KiCad" - - "Kohana" - - "Kotlin" - - "LabVIEW" - - "Laravel" - - "Leiningen" - - "LemonStand" - - "Lilypond" - - "Lithium" - - "Lua" - - "Magento" - - "Maven" - - "Mercury" - - "MetaProgrammingSystem" - - "MiniProgram" - - "Nanoc" - - "Nim" - - "Node" - - "OCaml" - - "Objective-C" - - "Opa" - - "OpenCart" - - "OracleForms" - - "Packer" - - "Perl" - - "Perl6" - - "Phalcon" - - "PlayFramework" - - "Plone" - - "Prestashop" - - "Processing" - - "PureScript" - - "Python" - - "Qooxdoo" - - "Qt" - - "R" - - "ROS" - - "Rails" - - "RhodesRhomobile" - - "Ruby" - - "Rust" - - "SCons" - - "Sass" - - "Scala" - - "Scheme" - - "Scrivener" - - "Sdcc" - - "SeamGen" - - "SketchUp" - - "Smalltalk" - - "Stella" - - "SugarCRM" - - "Swift" - - "Symfony" - - "SymphonyCMS" - - "TeX" - - "Terraform" - - "Textpattern" - - "TurboGears2" - - "Typo3" - - "Umbraco" - - "Unity" - - "UnrealEngine" - - "VVVV" - - "VisualStudio" - - "Waf" - - "WordPress" - - "Xojo" - - "Yeoman" - - "Yii" - - "ZendFramework" - - "Zephir" - x-exportParamName: "GitignoreTemplate" - x-optionalDataType: "String" - - name: "license_template" - in: "formData" - description: "License模版" - required: false - type: "string" - enum: - - "MulanPSL-1.0" - - "AFL-3.0" - - "AGPL-3.0" - - "Apache-2.0" - - "Artistic-2.0" - - "BSD-2-Clause" - - "BSD-3-Clause" - - "BSD-3-Clause-Clear" - - "BSL-1.0" - - "CC-BY-4.0" - - "CC-BY-SA-4.0" - - "CC0-1.0" - - "ECL-2.0" - - "EPL-1.0" - - "EUPL-1.1" - - "GPL-2.0" - - "GPL-3.0" - - "ISC" - - "LGPL-2.1" - - "LGPL-3.0" - - "LPPL-1.3c" - - "MIT" - - "MPL-2.0" - - "MS-PL" - - "MS-RL" - - "NCSA" - - "OFL-1.1" - - "OSL-3.0" - - "PostgreSQL" - - "Unlicense" - - "WTFPL" - - "Zlib" - x-exportParamName: "LicenseTemplate" - x-optionalDataType: "String" - - name: "private" - in: "formData" - description: "仓库开源类型。0(私有), 1(外部开源), 2(内部开源)。默认: 0" - required: false - type: "integer" - default: 0 - format: "int32" - enum: - - 0 - - 1 - - 2 - x-exportParamName: "Private" - x-optionalDataType: "Int32" - - name: "outsourced" - in: "formData" - description: "值为true值为外包仓库, false值为内部仓库。默认: 内部仓库(false)" - required: false - type: "boolean" - x-exportParamName: "Outsourced" - x-optionalDataType: "Bool" - - name: "project_creator" - in: "formData" - description: "负责人的username" - required: false - type: "string" - x-exportParamName: "ProjectCreator" - x-optionalDataType: "String" - - name: "members" - in: "formData" - description: "用逗号分开的仓库成员。如: member1,member2" - required: false - type: "string" - x-exportParamName: "Members" - x-optionalDataType: "String" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/Project" - /v5/enterprises/{enterprise}/members/{username}: - get: - tags: - - "Enterprises" - summary: "获取企业的一个成员" - description: "获取企业的一个成员" - operationId: "getV5EnterprisesEnterpriseMembersUsername" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "enterprise" - in: "path" - description: "企业的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Enterprise" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/EnterpriseMember" - 404: - description: "没有相关数据" - put: - tags: - - "Enterprises" - summary: "修改企业成员权限或备注" - description: "修改企业成员权限或备注" - operationId: "putV5EnterprisesEnterpriseMembersUsername" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "enterprise" - in: "path" - description: "企业的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Enterprise" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - - name: "outsourced" - in: "formData" - description: "是否企业外包成员,默认:否" - required: false - type: "boolean" - x-exportParamName: "Outsourced" - x-optionalDataType: "Bool" - - name: "role" - in: "formData" - description: "企业角色,默认普通成员" - required: false - type: "string" - default: "member" - enum: - - "admin" - - "member" - x-exportParamName: "Role" - x-optionalDataType: "String" - - name: "active" - in: "formData" - description: "是否可访问企业资源,默认:是。(若选否则禁止该用户访问企业资源)" - required: false - type: "boolean" - default: true - x-exportParamName: "Active" - x-optionalDataType: "Bool" - - name: "name" - in: "formData" - description: "企业成员真实姓名(备注)" - required: false - type: "string" - x-exportParamName: "Name" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/EnterpriseMember" - 400: - description: "数据不合法" - 403: - description: "没有权限" - 404: - description: "没有相关数据" - delete: - tags: - - "Enterprises" - summary: "移除企业成员" - description: "移除企业成员" - operationId: "deleteV5EnterprisesEnterpriseMembersUsername" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "enterprise" - in: "path" - description: "企业的路径(path/login)" - required: true - type: "string" - x-exportParamName: "Enterprise" - - name: "username" - in: "path" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - responses: - 204: - description: "执行成功" - 403: - description: "没有权限" - 404: - description: "没有相关数据" - /v5/gitignore/templates: - get: - tags: - - "Miscellaneous" - summary: "列出可使用的 .gitignore 模板" - description: "列出可使用的 .gitignore 模板" - operationId: "getV5GitignoreTemplates" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - responses: - 200: - description: "列出可使用的 .gitignore 模板" - /v5/gitignore/templates/{name}: - get: - tags: - - "Miscellaneous" - summary: "获取一个 .gitignore 模板" - description: "获取一个 .gitignore 模板" - operationId: "getV5GitignoreTemplatesName" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "name" - in: "path" - description: ".gitignore 模板名" - required: true - type: "string" - enum: - - "Actionscript" - - "Ada" - - "Agda" - - "Android" - - "AppEngine" - - "AppceleratorTitanium" - - "ArchLinuxPackages" - - "Autotools" - - "C" - - "C++" - - "CFWheels" - - "CMake" - - "CUDA" - - "CakePHP" - - "ChefCookbook" - - "Clojure" - - "CodeIgniter" - - "CommonLisp" - - "Composer" - - "Concrete5" - - "Coq" - - "CraftCMS" - - "D" - - "DM" - - "Dart" - - "Delphi" - - "Drupal" - - "EPiServer" - - "Eagle" - - "Elisp" - - "Elixir" - - "Elm" - - "Erlang" - - "ExpressionEngine" - - "ExtJs" - - "Fancy" - - "Finale" - - "Flutter" - - "ForceDotCom" - - "Fortran" - - "FuelPHP" - - "GWT" - - "Gcov" - - "GitBook" - - "Anjuta" - - "Ansible" - - "Archives" - - "Backup" - - "Bazaar" - - "BricxCC" - - "CVS" - - "Calabash" - - "Cloud9" - - "CodeKit" - - "DartEditor" - - "Diff" - - "Dreamweaver" - - "Dropbox" - - "Eclipse" - - "EiffelStudio" - - "Emacs" - - "Ensime" - - "Espresso" - - "FlexBuilder" - - "GPG" - - "Images" - - "JDeveloper" - - "JEnv" - - "JetBrains" - - "KDevelop4" - - "Kate" - - "Lazarus" - - "LibreOffice" - - "Linux" - - "LyX" - - "MATLAB" - - "Mercurial" - - "MicrosoftOffice" - - "ModelSim" - - "Momentics" - - "MonoDevelop" - - "NetBeans" - - "Ninja" - - "NotepadPP" - - "Octave" - - "Otto" - - "PSoCCreator" - - "Patch" - - "PuTTY" - - "Redcar" - - "Redis" - - "SBT" - - "SVN" - - "SlickEdit" - - "Stata" - - "SublimeText" - - "SynopsysVCS" - - "Tags" - - "TextMate" - - "TortoiseGit" - - "Vagrant" - - "Vim" - - "VirtualEnv" - - "Virtuoso" - - "VisualStudioCode" - - "WebMethods" - - "Windows" - - "Xcode" - - "XilinxISE" - - "macOS" - - "Go" - - "Godot" - - "Gradle" - - "Grails" - - "Haskell" - - "IGORPro" - - "Idris" - - "JBoss" - - "Java" - - "Jekyll" - - "Joomla" - - "Julia" - - "KiCad" - - "Kohana" - - "Kotlin" - - "LabVIEW" - - "Laravel" - - "Leiningen" - - "LemonStand" - - "Lilypond" - - "Lithium" - - "Lua" - - "Magento" - - "Maven" - - "Mercury" - - "MetaProgrammingSystem" - - "MiniProgram" - - "Nanoc" - - "Nim" - - "Node" - - "OCaml" - - "Objective-C" - - "Opa" - - "OpenCart" - - "OracleForms" - - "Packer" - - "Perl" - - "Perl6" - - "Phalcon" - - "PlayFramework" - - "Plone" - - "Prestashop" - - "Processing" - - "PureScript" - - "Python" - - "Qooxdoo" - - "Qt" - - "R" - - "ROS" - - "Rails" - - "RhodesRhomobile" - - "Ruby" - - "Rust" - - "SCons" - - "Sass" - - "Scala" - - "Scheme" - - "Scrivener" - - "Sdcc" - - "SeamGen" - - "SketchUp" - - "Smalltalk" - - "Stella" - - "SugarCRM" - - "Swift" - - "Symfony" - - "SymphonyCMS" - - "TeX" - - "Terraform" - - "Textpattern" - - "TurboGears2" - - "Typo3" - - "Umbraco" - - "Unity" - - "UnrealEngine" - - "VVVV" - - "VisualStudio" - - "Waf" - - "WordPress" - - "Xojo" - - "Yeoman" - - "Yii" - - "ZendFramework" - - "Zephir" - x-exportParamName: "Name" - responses: - 200: - description: "获取一个 .gitignore 模板" - /v5/gitignore/templates/{name}/raw: - get: - tags: - - "Miscellaneous" - summary: "获取一个 .gitignore 模板原始文件" - description: "获取一个 .gitignore 模板原始文件" - operationId: "getV5GitignoreTemplatesNameRaw" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "name" - in: "path" - description: ".gitignore 模板名" - required: true - type: "string" - enum: - - "Actionscript" - - "Ada" - - "Agda" - - "Android" - - "AppEngine" - - "AppceleratorTitanium" - - "ArchLinuxPackages" - - "Autotools" - - "C" - - "C++" - - "CFWheels" - - "CMake" - - "CUDA" - - "CakePHP" - - "ChefCookbook" - - "Clojure" - - "CodeIgniter" - - "CommonLisp" - - "Composer" - - "Concrete5" - - "Coq" - - "CraftCMS" - - "D" - - "DM" - - "Dart" - - "Delphi" - - "Drupal" - - "EPiServer" - - "Eagle" - - "Elisp" - - "Elixir" - - "Elm" - - "Erlang" - - "ExpressionEngine" - - "ExtJs" - - "Fancy" - - "Finale" - - "Flutter" - - "ForceDotCom" - - "Fortran" - - "FuelPHP" - - "GWT" - - "Gcov" - - "GitBook" - - "Anjuta" - - "Ansible" - - "Archives" - - "Backup" - - "Bazaar" - - "BricxCC" - - "CVS" - - "Calabash" - - "Cloud9" - - "CodeKit" - - "DartEditor" - - "Diff" - - "Dreamweaver" - - "Dropbox" - - "Eclipse" - - "EiffelStudio" - - "Emacs" - - "Ensime" - - "Espresso" - - "FlexBuilder" - - "GPG" - - "Images" - - "JDeveloper" - - "JEnv" - - "JetBrains" - - "KDevelop4" - - "Kate" - - "Lazarus" - - "LibreOffice" - - "Linux" - - "LyX" - - "MATLAB" - - "Mercurial" - - "MicrosoftOffice" - - "ModelSim" - - "Momentics" - - "MonoDevelop" - - "NetBeans" - - "Ninja" - - "NotepadPP" - - "Octave" - - "Otto" - - "PSoCCreator" - - "Patch" - - "PuTTY" - - "Redcar" - - "Redis" - - "SBT" - - "SVN" - - "SlickEdit" - - "Stata" - - "SublimeText" - - "SynopsysVCS" - - "Tags" - - "TextMate" - - "TortoiseGit" - - "Vagrant" - - "Vim" - - "VirtualEnv" - - "Virtuoso" - - "VisualStudioCode" - - "WebMethods" - - "Windows" - - "Xcode" - - "XilinxISE" - - "macOS" - - "Go" - - "Godot" - - "Gradle" - - "Grails" - - "Haskell" - - "IGORPro" - - "Idris" - - "JBoss" - - "Java" - - "Jekyll" - - "Joomla" - - "Julia" - - "KiCad" - - "Kohana" - - "Kotlin" - - "LabVIEW" - - "Laravel" - - "Leiningen" - - "LemonStand" - - "Lilypond" - - "Lithium" - - "Lua" - - "Magento" - - "Maven" - - "Mercury" - - "MetaProgrammingSystem" - - "MiniProgram" - - "Nanoc" - - "Nim" - - "Node" - - "OCaml" - - "Objective-C" - - "Opa" - - "OpenCart" - - "OracleForms" - - "Packer" - - "Perl" - - "Perl6" - - "Phalcon" - - "PlayFramework" - - "Plone" - - "Prestashop" - - "Processing" - - "PureScript" - - "Python" - - "Qooxdoo" - - "Qt" - - "R" - - "ROS" - - "Rails" - - "RhodesRhomobile" - - "Ruby" - - "Rust" - - "SCons" - - "Sass" - - "Scala" - - "Scheme" - - "Scrivener" - - "Sdcc" - - "SeamGen" - - "SketchUp" - - "Smalltalk" - - "Stella" - - "SugarCRM" - - "Swift" - - "Symfony" - - "SymphonyCMS" - - "TeX" - - "Terraform" - - "Textpattern" - - "TurboGears2" - - "Typo3" - - "Umbraco" - - "Unity" - - "UnrealEngine" - - "VVVV" - - "VisualStudio" - - "Waf" - - "WordPress" - - "Xojo" - - "Yeoman" - - "Yii" - - "ZendFramework" - - "Zephir" - x-exportParamName: "Name" - responses: - 200: - description: "获取一个 .gitignore 模板原始文件" - /v5/licenses: - get: - tags: - - "Miscellaneous" - summary: "列出可使用的开源许可协议" - description: "列出可使用的开源许可协议" - operationId: "getV5Licenses" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - responses: - 200: - description: "列出可使用的开源许可协议" - /v5/licenses/{license}: - get: - tags: - - "Miscellaneous" - summary: "获取一个开源许可协议" - description: "获取一个开源许可协议" - operationId: "getV5LicensesLicense" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "license" - in: "path" - description: "协议名称" - required: true - type: "string" - enum: - - "MulanPSL-1.0" - - "AFL-3.0" - - "AGPL-3.0" - - "Apache-2.0" - - "Artistic-2.0" - - "BSD-2-Clause" - - "BSD-3-Clause" - - "BSD-3-Clause-Clear" - - "BSL-1.0" - - "CC-BY-4.0" - - "CC-BY-SA-4.0" - - "CC0-1.0" - - "ECL-2.0" - - "EPL-1.0" - - "EUPL-1.1" - - "GPL-2.0" - - "GPL-3.0" - - "ISC" - - "LGPL-2.1" - - "LGPL-3.0" - - "LPPL-1.3c" - - "MIT" - - "MPL-2.0" - - "MS-PL" - - "MS-RL" - - "NCSA" - - "OFL-1.1" - - "OSL-3.0" - - "PostgreSQL" - - "Unlicense" - - "WTFPL" - - "Zlib" - x-exportParamName: "License" - responses: - 200: - description: "获取一个开源许可协议" - /v5/licenses/{license}/raw: - get: - tags: - - "Miscellaneous" - summary: "获取一个开源许可协议原始文件" - description: "获取一个开源许可协议原始文件" - operationId: "getV5LicensesLicenseRaw" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "license" - in: "path" - description: "协议名称" - required: true - type: "string" - enum: - - "MulanPSL-1.0" - - "AFL-3.0" - - "AGPL-3.0" - - "Apache-2.0" - - "Artistic-2.0" - - "BSD-2-Clause" - - "BSD-3-Clause" - - "BSD-3-Clause-Clear" - - "BSL-1.0" - - "CC-BY-4.0" - - "CC-BY-SA-4.0" - - "CC0-1.0" - - "ECL-2.0" - - "EPL-1.0" - - "EUPL-1.1" - - "GPL-2.0" - - "GPL-3.0" - - "ISC" - - "LGPL-2.1" - - "LGPL-3.0" - - "LPPL-1.3c" - - "MIT" - - "MPL-2.0" - - "MS-PL" - - "MS-RL" - - "NCSA" - - "OFL-1.1" - - "OSL-3.0" - - "PostgreSQL" - - "Unlicense" - - "WTFPL" - - "Zlib" - x-exportParamName: "License" - responses: - 200: - description: "获取一个开源许可协议原始文件" - /v5/markdown: - post: - tags: - - "Miscellaneous" - summary: "渲染 Markdown 文本" - description: "渲染 Markdown 文本" - operationId: "postV5Markdown" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "text" - in: "formData" - description: "Markdown 文本" - required: true - type: "string" - x-exportParamName: "Text" - responses: - 201: - description: "渲染 Markdown 文本" - /v5/events: - get: - tags: - - "Activity" - summary: "获取站内所有公开动态" - description: "获取站内所有公开动态" - operationId: "getV5Events" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回数据" - schema: - type: "array" - items: - $ref: "#/definitions/Event" - /v5/networks/{owner}/{repo}/events: - get: - tags: - - "Activity" - summary: "列出仓库的所有公开动态" - description: "列出仓库的所有公开动态" - operationId: "getV5NetworksOwnerRepoEvents" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "owner" - in: "path" - description: "仓库所属空间地址(企业、组织或个人的地址path)" - required: true - type: "string" - x-exportParamName: "Owner" - - name: "repo" - in: "path" - description: "仓库路径(path)" - required: true - type: "string" - x-exportParamName: "Repo" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Event" - 403: - description: "没有权限" - 404: - description: "没有相关数据" - /v5/search/repositories: - get: - tags: - - "Search" - summary: "搜索仓库" - description: "搜索仓库" - operationId: "getV5SearchRepositories" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "q" - in: "query" - description: "搜索关键字" - required: true - type: "string" - x-exportParamName: "Q" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - - name: "owner" - in: "query" - description: "筛选指定空间地址(企业、组织或个人的地址 path) 的仓库" - required: false - type: "string" - x-exportParamName: "Owner" - x-optionalDataType: "String" - - name: "fork" - in: "query" - description: "是否搜索含 fork 的仓库,默认:否" - required: false - type: "boolean" - x-exportParamName: "Fork" - x-optionalDataType: "Bool" - - name: "language" - in: "query" - description: "筛选指定语言的仓库" - required: false - type: "string" - enum: - - "Java" - - "JavaScript" - - "PHP" - - "Python" - - "Android" - - "Objective-C" - - "C#" - - "Go" - - "C++" - - "HTML" - - "C" - - "NodeJS" - - "Swift" - - "Ruby" - - "TypeScript" - - "Shell" - - "CSS" - - "Docker" - - "Lua" - - "Dart" - - "Scala" - - "Matlab" - - "Delphi" - - "ASP" - - "TeX/LaTeX" - - "Visual Basic" - - "ActionScript" - - "Groovy" - - "Erlang" - - "R" - - "Rust" - - "Verilog" - - "VimL" - - "Perl" - - "QML" - - "Arduino" - - "Assembly" - - "Pascal" - - "Clojure" - - "Emacs Lisp" - - "FORTRAN" - - "CoffeeScript" - - "PowerShell" - - "AutoHotkey" - - "Elixir" - - "VHDL" - - "D" - - "Haskell" - - "M" - - "Julia" - - "Scheme" - - "Common Lisp" - - "XSLT" - - "Logos" - - "DOT" - - "Racket" - - "OCaml" - - "Puppet" - - "Haxe" - - "Coq" - - "LiveScript" - - "Vala" - - "Nemerle" - - "Prolog" - - "Smalltalk" - - "Eiffel" - - "Standard ML" - - "eC" - - "Ada" - - "Slash" - - "Scilab" - - "Awk" - - "ColdFusion" - - "微信" - - "Crystal" - - "Kotlin" - - "SQL" - - "Lisp" - - "XML" - - "C/C++" - - "HTML/CSS" - - "易语言" - - "汇编" - - "其他" - - "Zephir" - - "Pawn" - x-exportParamName: "Language" - x-optionalDataType: "String" - - name: "sort" - in: "query" - description: "排序字段,created_at(创建时间)、last_push_at(更新时间)、stars_count(收藏数)、forks_count(Fork\ - \ 数)、watches_count(关注数),默认为最佳匹配" - required: false - type: "string" - enum: - - "created_at" - - "last_push_at" - - "stars_count" - - "forks_count" - - "watches_count" - x-exportParamName: "Sort" - x-optionalDataType: "String" - - name: "order" - in: "query" - description: "排序顺序: desc(default)、asc" - required: false - type: "string" - default: "desc" - enum: - - "asc" - - "desc" - x-exportParamName: "Order" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Project" - /v5/search/issues: - get: - tags: - - "Search" - summary: "搜索 Issues" - description: "搜索 Issues" - operationId: "getV5SearchIssues" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "q" - in: "query" - description: "搜索关键字" - required: true - type: "string" - x-exportParamName: "Q" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - - name: "repo" - in: "query" - description: "筛选指定仓库 (path, e.g. oschina/git-osc) 的 issues" - required: false - type: "string" - x-exportParamName: "Repo" - x-optionalDataType: "String" - - name: "language" - in: "query" - description: "筛选指定语言的 issues" - required: false - type: "string" - enum: - - "Java" - - "JavaScript" - - "PHP" - - "Python" - - "Android" - - "Objective-C" - - "C#" - - "Go" - - "C++" - - "HTML" - - "C" - - "NodeJS" - - "Swift" - - "Ruby" - - "TypeScript" - - "Shell" - - "CSS" - - "Docker" - - "Lua" - - "Dart" - - "Scala" - - "Matlab" - - "Delphi" - - "ASP" - - "TeX/LaTeX" - - "Visual Basic" - - "ActionScript" - - "Groovy" - - "Erlang" - - "R" - - "Rust" - - "Verilog" - - "VimL" - - "Perl" - - "QML" - - "Arduino" - - "Assembly" - - "Pascal" - - "Clojure" - - "Emacs Lisp" - - "FORTRAN" - - "CoffeeScript" - - "PowerShell" - - "AutoHotkey" - - "Elixir" - - "VHDL" - - "D" - - "Haskell" - - "M" - - "Julia" - - "Scheme" - - "Common Lisp" - - "XSLT" - - "Logos" - - "DOT" - - "Racket" - - "OCaml" - - "Puppet" - - "Haxe" - - "Coq" - - "LiveScript" - - "Vala" - - "Nemerle" - - "Prolog" - - "Smalltalk" - - "Eiffel" - - "Standard ML" - - "eC" - - "Ada" - - "Slash" - - "Scilab" - - "Awk" - - "ColdFusion" - - "微信" - - "Crystal" - - "Kotlin" - - "SQL" - - "Lisp" - - "XML" - - "C/C++" - - "HTML/CSS" - - "易语言" - - "汇编" - - "其他" - - "Zephir" - - "Pawn" - x-exportParamName: "Language" - x-optionalDataType: "String" - - name: "label" - in: "query" - description: "筛选指定标签的 issues" - required: false - type: "string" - x-exportParamName: "Label" - x-optionalDataType: "String" - - name: "state" - in: "query" - description: "筛选指定状态的 issues, open(开启)、closed(完成)、rejected(拒绝)" - required: false - type: "string" - enum: - - "open" - - "progressing" - - "closed" - - "rejected" - x-exportParamName: "State" - x-optionalDataType: "String" - - name: "author" - in: "query" - description: "筛选指定创建者 (username/login) 的 issues" - required: false - type: "string" - x-exportParamName: "Author" - x-optionalDataType: "String" - - name: "assignee" - in: "query" - description: "筛选指定负责人 (username/login) 的 issues" - required: false - type: "string" - x-exportParamName: "Assignee" - x-optionalDataType: "String" - - name: "sort" - in: "query" - description: "排序字段,created_at(创建时间)、last_push_at(更新时间)、notes_count(评论数),默认\ - 为最佳匹配" - required: false - type: "string" - enum: - - "created_at" - - "updated_at" - - "notes_count" - x-exportParamName: "Sort" - x-optionalDataType: "String" - - name: "order" - in: "query" - description: "排序顺序: desc(default)、asc" - required: false - type: "string" - default: "desc" - enum: - - "asc" - - "desc" - x-exportParamName: "Order" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Issue" - /v5/search/gists: - get: - tags: - - "Search" - summary: "搜索代码片段" - description: "搜索代码片段" - operationId: "getV5SearchGists" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "q" - in: "query" - description: "搜索关键字" - required: true - type: "string" - x-exportParamName: "Q" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - - name: "language" - in: "query" - description: "筛选指定语言的代码片段" - required: false - type: "string" - enum: - - "Java" - - "Zephir" - - "Pawn" - - "PHP" - - "JavaScript" - - "C#" - - "C/C++" - - "Python" - - "Ruby" - - "Go" - - "Perl" - - "ASP" - - "Objective-C" - - "HTML" - - "CSS" - - "TypeScript" - - "Shell" - - "Erlang" - - "Kotlin" - - "Swift" - - "Rust" - - "Lua" - - "Assembly" - - "Pascal" - - "Scala" - - "ActionScript" - - "Groovy" - - "Clojure" - - "Matlab" - - "VimL" - - "R" - - "Lisp" - - "SQL" - - "XML" - - "易语言" - - "Smalltalk" - - "其他" - - "C" - - "CoffeeScript" - - "C++" - - "AutoHotkey" - - "Arduino" - - "Common Lisp" - - "Scheme" - - "FORTRAN" - - "Verilog" - - "Puppet" - - "XSLT" - - "Delphi" - - "eC" - - "D" - - "Haskell" - - "Visual Basic" - - "PowerShell" - - "Emacs Lisp" - - "Racket" - - "OCaml" - - "Vala" - - "Ada" - - "Dart" - - "M" - - "ColdFusion" - - "Awk" - - "LiveScript" - - "Slash" - - "Julia" - - "Nemerle" - - "Elixir" - - "VHDL" - - "TeX/LaTeX" - - "Standard ML" - - "Haxe" - - "Eiffel" - - "DOT" - - "Scilab" - - "Prolog" - - "NodeJS" - - "Android" - - "Coq" - - "Logos" - - "QML" - - "Docker" - - "微信" - - "Crystal" - - "HTML/CSS" - - "汇编" - x-exportParamName: "Language" - x-optionalDataType: "String" - - name: "owner" - in: "query" - description: "筛选所属用户 (username/login) 的代码片段" - required: false - type: "string" - x-exportParamName: "Owner" - x-optionalDataType: "String" - - name: "sort" - in: "query" - description: "排序字段,created_at(创建时间)、updated_at(更新时间)、notes_count(评论数)、stars_count(收\ - 藏数)、forks_count(Fork 数),默认为最佳匹配" - required: false - type: "string" - enum: - - "created_at" - - "updated_at" - - "notes_count" - - "stars_count" - - "forks_count" - x-exportParamName: "Sort" - x-optionalDataType: "String" - - name: "order" - in: "query" - description: "排序顺序: desc(default)、asc" - required: false - type: "string" - default: "desc" - enum: - - "asc" - - "desc" - x-exportParamName: "Order" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/Code" - /v5/search/users: - get: - tags: - - "Search" - summary: "搜索用户" - description: "搜索用户" - operationId: "getV5SearchUsers" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "q" - in: "query" - description: "搜索关键字" - required: true - type: "string" - x-exportParamName: "Q" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - - name: "sort" - in: "query" - description: "排序字段,joined_at(注册时间),默认为最佳匹配" - required: false - type: "string" - enum: - - "joined_at" - x-exportParamName: "Sort" - x-optionalDataType: "String" - - name: "order" - in: "query" - description: "排序顺序: desc(default)、asc" - required: false - type: "string" - default: "desc" - enum: - - "asc" - - "desc" - x-exportParamName: "Order" - x-optionalDataType: "String" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/User" - /v5/notifications/count: - get: - tags: - - "Activity" - summary: "获取授权用户的通知数" - description: "获取授权用户的通知数" - operationId: "getV5NotificationsCount" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "unread" - in: "query" - description: "是否只获取未读消息,默认:否" - required: false - type: "boolean" - x-exportParamName: "Unread" - x-optionalDataType: "Bool" - responses: - 200: - description: "返回数据" - schema: - $ref: "#/definitions/UserNotificationCount" - /v5/notifications/threads: - get: - tags: - - "Activity" - summary: "列出授权用户的所有通知" - description: "列出授权用户的所有通知" - operationId: "getV5NotificationsThreads" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "unread" - in: "query" - description: "是否只获取未读消息,默认:否" - required: false - type: "boolean" - x-exportParamName: "Unread" - x-optionalDataType: "Bool" - - name: "participating" - in: "query" - description: "是否只获取自己直接参与的消息,默认:否" - required: false - type: "boolean" - x-exportParamName: "Participating" - x-optionalDataType: "Bool" - - name: "type" - in: "query" - description: "筛选指定类型的通知,all:所有,event:事件通知,referer:@ 通知" - required: false - type: "string" - default: "all" - enum: - - "all" - - "event" - - "referer" - x-exportParamName: "Type_" - x-optionalDataType: "String" - - name: "since" - in: "query" - description: "只获取在给定时间后更新的消息,要求时间格式为 ISO 8601" - required: false - type: "string" - x-exportParamName: "Since" - x-optionalDataType: "String" - - name: "before" - in: "query" - description: "只获取在给定时间前更新的消息,要求时间格式为 ISO 8601" - required: false - type: "string" - x-exportParamName: "Before" - x-optionalDataType: "String" - - name: "ids" - in: "query" - description: "指定一组通知 ID,以 , 分隔" - required: false - type: "string" - x-exportParamName: "Ids" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回数据" - schema: - type: "array" - items: - $ref: "#/definitions/UserNotificationList" - put: - tags: - - "Activity" - summary: "标记所有通知为已读" - description: "标记所有通知为已读" - operationId: "putV5NotificationsThreads" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "ids" - in: "formData" - description: "指定一组通知 ID,以 , 分隔" - required: false - type: "string" - x-exportParamName: "Ids" - x-optionalDataType: "String" - responses: - 205: - description: "执行成功" - /v5/notifications/threads/{id}: - get: - tags: - - "Activity" - summary: "获取一条通知" - description: "获取一条通知" - operationId: "getV5NotificationsThreadsId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "id" - in: "path" - description: "通知的 ID" - required: true - type: "string" - x-exportParamName: "Id" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/UserNotification" - 404: - description: "没有相关数据" - patch: - tags: - - "Activity" - summary: "标记一条通知为已读" - description: "标记一条通知为已读" - operationId: "patchV5NotificationsThreadsId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "id" - in: "path" - description: "通知的 ID" - required: true - type: "string" - x-exportParamName: "Id" - responses: - 205: - description: "执行成功" - 404: - description: "没有相关数据" - /v5/notifications/messages: - get: - tags: - - "Activity" - summary: "列出授权用户的所有私信" - description: "列出授权用户的所有私信" - operationId: "getV5NotificationsMessages" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "unread" - in: "query" - description: "是否只显示未读私信,默认:否" - required: false - type: "boolean" - x-exportParamName: "Unread" - x-optionalDataType: "Bool" - - name: "since" - in: "query" - description: "只获取在给定时间后更新的私信,要求时间格式为 ISO 8601" - required: false - type: "string" - x-exportParamName: "Since" - x-optionalDataType: "String" - - name: "before" - in: "query" - description: "只获取在给定时间前更新的私信,要求时间格式为 ISO 8601" - required: false - type: "string" - x-exportParamName: "Before" - x-optionalDataType: "String" - - name: "ids" - in: "query" - description: "指定一组私信 ID,以 , 分隔" - required: false - type: "string" - x-exportParamName: "Ids" - x-optionalDataType: "String" - - name: "page" - in: "query" - description: "当前的页码" - required: false - type: "integer" - default: 1 - format: "int32" - x-exportParamName: "Page" - x-optionalDataType: "Int32" - - name: "per_page" - in: "query" - description: "每页的数量,最大为 100" - required: false - type: "integer" - default: 20 - format: "int32" - x-exportParamName: "PerPage" - x-optionalDataType: "Int32" - responses: - 200: - description: "返回格式" - schema: - type: "array" - items: - $ref: "#/definitions/UserMessageList" - post: - tags: - - "Activity" - summary: "发送私信给指定用户" - description: "发送私信给指定用户" - operationId: "postV5NotificationsMessages" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "username" - in: "formData" - description: "用户名(username/login)" - required: true - type: "string" - x-exportParamName: "Username" - - name: "content" - in: "formData" - description: "私信内容" - required: true - type: "string" - x-exportParamName: "Content" - responses: - 201: - description: "返回格式" - schema: - $ref: "#/definitions/UserMessage" - 400: - description: "数据不合法" - 404: - description: "没有相关数据" - put: - tags: - - "Activity" - summary: "标记所有私信为已读" - description: "标记所有私信为已读" - operationId: "putV5NotificationsMessages" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "ids" - in: "formData" - description: "指定一组私信 ID,以 , 分隔" - required: false - type: "string" - x-exportParamName: "Ids" - x-optionalDataType: "String" - responses: - 205: - description: "执行成功" - /v5/notifications/messages/{id}: - get: - tags: - - "Activity" - summary: "获取一条私信" - description: "获取一条私信" - operationId: "getV5NotificationsMessagesId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "id" - in: "path" - description: "私信的 ID" - required: true - type: "string" - x-exportParamName: "Id" - responses: - 200: - description: "返回格式" - schema: - $ref: "#/definitions/UserMessage" - 404: - description: "没有相关数据" - patch: - tags: - - "Activity" - summary: "标记一条私信为已读" - description: "标记一条私信为已读" - operationId: "patchV5NotificationsMessagesId" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "formData" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - - name: "id" - in: "path" - description: "私信的 ID" - required: true - type: "string" - x-exportParamName: "Id" - responses: - 205: - description: "执行成功" - 404: - description: "没有相关数据" - /v5/emojis: - get: - tags: - - "Miscellaneous" - summary: "列出可使用的 Emoji" - description: "列出可使用的 Emoji" - operationId: "getV5Emojis" - consumes: - - "application/json" - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "access_token" - in: "query" - description: "用户授权码" - required: false - type: "string" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - responses: - 200: - description: "列出可使用的 Emoji" -definitions: - Branch: - type: "object" - properties: - name: - type: "string" - commit: - type: "string" - protected: - type: "string" - protection_url: - type: "string" - description: "获取所有分支" - example: - protected: "protected" - name: "name" - commit: "commit" - protection_url: "protection_url" - CompleteBranch: - type: "object" - properties: - name: - type: "string" - commit: - type: "string" - _links: - type: "string" - protected: - type: "string" - protection_url: - type: "string" - description: "创建分支" - example: - protected: "protected" - _links: "_links" - name: "name" - commit: "commit" - protection_url: "protection_url" - RepoCommit: - type: "object" - properties: - url: - type: "string" - sha: - type: "string" - html_url: - type: "string" - comments_url: - type: "string" - commit: - type: "string" - author: - type: "string" - committer: - type: "string" - parents: - type: "string" - stats: - type: "string" - description: "仓库的某个提交" - example: - committer: "committer" - stats: "stats" - author: "author" - html_url: "html_url" - comments_url: "comments_url" - commit: "commit" - sha: "sha" - url: "url" - parents: "parents" - Compare: - type: "object" - properties: - base_commit: - type: "string" - merge_base_commit: - type: "string" - commits: - type: "string" - files: - type: "string" - description: "两个Commits之间对比的版本差异" - example: - base_commit: "base_commit" - commits: "commits" - files: "files" - merge_base_commit: "merge_base_commit" - SSHKey: - type: "object" - properties: - id: - type: "string" - key: - type: "string" - url: - type: "string" - title: - type: "string" - created_at: - type: "string" - description: "获取一个公钥" - example: - created_at: "created_at" - id: "id" - title: "title" - key: "key" - url: "url" - SSHKeyBasic: - type: "object" - properties: - id: - type: "string" - key: - type: "string" - description: "列出指定用户的所有公钥" - example: - id: "id" - key: "key" - Content: - type: "object" - properties: - type: - type: "string" - encoding: - type: "string" - size: - type: "string" - name: - type: "string" - path: - type: "string" - content: - type: "string" - sha: - type: "string" - url: - type: "string" - html_url: - type: "string" - download_url: - type: "string" - _links: - type: "string" - description: "获取仓库具体路径下的内容" - example: - path: "path" - size: "size" - _links: "_links" - html_url: "html_url" - name: "name" - download_url: "download_url" - type: "type" - encoding: "encoding" - sha: "sha" - content: "content" - url: "url" - CommitContent: - type: "object" - properties: - content: - $ref: "#/definitions/ContentBasic" - commit: - $ref: "#/definitions/Commit" - description: "删除文件" - example: - commit: - committer: "committer" - author: "author" - tree: "tree" - message: "message" - sha: "sha" - parents: "parents" - content: - path: "path" - size: "size" - _links: "_links" - html_url: "html_url" - name: "name" - download_url: "download_url" - type: "type" - sha: "sha" - url: "url" - ContentBasic: - type: "object" - properties: - name: - type: "string" - path: - type: "string" - size: - type: "string" - sha: - type: "string" - type: - type: "string" - url: - type: "string" - html_url: - type: "string" - download_url: - type: "string" - _links: - type: "string" - example: - path: "path" - size: "size" - _links: "_links" - html_url: "html_url" - name: "name" - download_url: "download_url" - type: "type" - sha: "sha" - url: "url" - Commit: - type: "object" - properties: - id: - type: "string" - tree_id: - type: "string" - parent_ids: - type: "array" - items: - type: "string" - message: - type: "string" - timestamp: - type: "string" - format: "date-time" - url: - type: "string" - author: - $ref: "#/definitions/UserBasic" - committer: - $ref: "#/definitions/UserBasic" - distinct: - type: "boolean" - added: - type: "array" - items: - type: "string" - removed: - type: "array" - items: - type: "string" - modified: - type: "array" - items: - type: "string" - Blob: - type: "object" - properties: - sha: - type: "string" - size: - type: "string" - url: - type: "string" - content: - type: "string" - encoding: - type: "string" - description: "获取文件Blob" - example: - size: "size" - encoding: "encoding" - sha: "sha" - url: "url" - content: "content" - Tree: - type: "object" - properties: - sha: - type: "string" - url: - type: "string" - tree: - type: "string" - truncated: - type: "string" - description: "获取目录Tree" - example: - tree: "tree" - truncated: "truncated" - sha: "sha" - url: "url" - Issue: - type: "object" - properties: - id: - type: "integer" - format: "int32" - url: - type: "string" - repository_url: - type: "string" - labels_url: - type: "string" - comments_url: - type: "string" - html_url: - type: "string" - parent_url: - type: "string" - number: - type: "string" - state: - type: "string" - title: - type: "string" - body: - type: "string" - body_html: - type: "string" - user: - $ref: "#/definitions/UserBasic" - labels: - type: "array" - items: - $ref: "#/definitions/Label" - assignee: - $ref: "#/definitions/UserBasic" - collaborators: - type: "array" - items: - $ref: "#/definitions/UserBasic" - repository: - type: "string" - milestone: - $ref: "#/definitions/Milestone" - created_at: - type: "string" - format: "date-time" - updated_at: - type: "string" - format: "date-time" - plan_started_at: - type: "string" - format: "date-time" - deadline: - type: "string" - format: "date-time" - finished_at: - type: "string" - format: "date-time" - scheduled_time: - type: "string" - comments: - type: "integer" - format: "int32" - issue_type: - type: "string" - program: - $ref: "#/definitions/ProgramBasic" - description: "搜索 Issues" - example: - body_html: "body_html" - finished_at: "2000-01-23T04:56:07.000+00:00" - created_at: "2000-01-23T04:56:07.000+00:00" - program: - author: "author" - name: "name" - description: "description" - id: "id" - assignee: "assignee" - title: "title" - body: "body" - repository: "repository" - scheduled_time: "scheduled_time" - labels_url: "labels_url" - number: "number" - updated_at: "2000-01-23T04:56:07.000+00:00" - comments_url: "comments_url" - collaborators: - gists_url: "gists_url" - repos_url: "repos_url" - following_url: "following_url" - starred_url: "starred_url" - login: "login" - followers_url: "followers_url" - type: "type" - url: "url" - subscriptions_url: "subscriptions_url" - received_events_url: "received_events_url" - avatar_url: "avatar_url" - events_url: "events_url" - html_url: "html_url" - name: "name" - site_admin: "site_admin" - id: 5 - organizations_url: "organizations_url" - id: 0 - repository_url: "repository_url" - state: "state" - deadline: "2000-01-23T04:56:07.000+00:00" - comments: 3 - issue_type: "issue_type" - url: "url" - labels: - color: "color" - name: "name" - repository_id: 1 - id: 6 - url: "url" - milestone: - number: 5 - updated_at: "2000-01-23T04:56:07.000+00:00" - html_url: "html_url" - description: "description" - created_at: "2000-01-23T04:56:07.000+00:00" - repository_id: 2 - state: "state" - title: "title" - open_issues: 7 - closed_issues: 9 - url: "url" - due_on: "2000-01-23T04:56:07.000+00:00" - parent_url: "parent_url" - plan_started_at: "2000-01-23T04:56:07.000+00:00" - html_url: "html_url" - assignee: - gists_url: "gists_url" - repos_url: "repos_url" - following_url: "following_url" - starred_url: "starred_url" - login: "login" - followers_url: "followers_url" - type: "type" - url: "url" - subscriptions_url: "subscriptions_url" - received_events_url: "received_events_url" - avatar_url: "avatar_url" - events_url: "events_url" - html_url: "html_url" - name: "name" - site_admin: "site_admin" - id: 5 - organizations_url: "organizations_url" - user: "user" - Label: - type: "object" - properties: - id: - type: "integer" - format: "int32" - name: - type: "string" - color: - type: "string" - repository_id: - type: "integer" - format: "int32" - url: - type: "string" - description: "获取企业某个标签" - example: - color: "color" - name: "name" - repository_id: 1 - id: 6 - url: "url" - UserBasic: - type: "object" - properties: - id: - type: "integer" - format: "int32" - login: - type: "string" - name: - type: "string" - avatar_url: - type: "string" - url: - type: "string" - html_url: - type: "string" - followers_url: - type: "string" - following_url: - type: "string" - gists_url: - type: "string" - starred_url: - type: "string" - subscriptions_url: - type: "string" - organizations_url: - type: "string" - repos_url: - type: "string" - events_url: - type: "string" - received_events_url: - type: "string" - type: - type: "string" - site_admin: - type: "boolean" - email: - type: "string" - description: "列出一个组织的所有成员" - example: - gists_url: "gists_url" - repos_url: "repos_url" - following_url: "following_url" - starred_url: "starred_url" - login: "login" - followers_url: "followers_url" - type: "type" - url: "url" - subscriptions_url: "subscriptions_url" - received_events_url: "received_events_url" - avatar_url: "avatar_url" - events_url: "events_url" - html_url: "html_url" - name: "name" - site_admin: "site_admin" - id: 5 - organizations_url: "organizations_url" - Milestone: - type: "object" - properties: - url: - type: "string" - html_url: - type: "string" - number: - type: "integer" - format: "int32" - repository_id: - type: "integer" - format: "int32" - state: - type: "string" - title: - type: "string" - description: - type: "string" - updated_at: - type: "string" - format: "date-time" - created_at: - type: "string" - format: "date-time" - open_issues: - type: "integer" - format: "int32" - closed_issues: - type: "integer" - format: "int32" - due_on: - type: "string" - description: "更新仓库里程碑" - example: - number: 5 - updated_at: "2000-01-23T04:56:07.000+00:00" - html_url: "html_url" - description: "description" - created_at: "2000-01-23T04:56:07.000+00:00" - repository_id: 2 - state: "state" - title: "title" - open_issues: 7 - closed_issues: 9 - url: "url" - due_on: "2000-01-23T04:56:07.000+00:00" - ProgramBasic: - type: "object" - properties: - id: - type: "string" - name: - type: "string" - description: - type: "string" - assignee: - type: "string" - author: - type: "string" - example: - author: "author" - name: "name" - description: "description" - id: "id" - assignee: "assignee" - OperateLog: - type: "object" - properties: - id: - type: "string" - icon: - type: "string" - user: - type: "string" - content: - type: "string" - created_at: - type: "string" - description: "获取某个Pull Request的操作日志" - example: - icon: "icon" - created_at: "created_at" - id: "id" - user: "user" - content: "content" - Note: - type: "object" - properties: - id: - type: "integer" - format: "int32" - body: - type: "string" - body_html: - type: "string" - user: - $ref: "#/definitions/User" - source: - type: "string" - created_at: - type: "string" - target: - type: "string" - description: "获取企业某个Issue所有评论" - example: - body_html: "body_html" - created_at: "created_at" - id: "id" - source: "source" - body: "body" - user: "user" - target: "target" - Project: - type: "object" - properties: - id: - type: "integer" - format: "int32" - full_name: - type: "string" - human_name: - type: "string" - url: - type: "string" - namespace: - $ref: "#/definitions/Namespace" - path: - type: "string" - name: - type: "string" - owner: - $ref: "#/definitions/UserBasic" - description: - type: "string" - private: - type: "boolean" - public: - type: "boolean" - internal: - type: "boolean" - fork: - type: "boolean" - html_url: - type: "string" - ssh_url: - type: "string" - forks_url: - type: "string" - keys_url: - type: "string" - collaborators_url: - type: "string" - hooks_url: - type: "string" - branches_url: - type: "string" - tags_url: - type: "string" - blobs_url: - type: "string" - stargazers_url: - type: "string" - contributors_url: - type: "string" - commits_url: - type: "string" - comments_url: - type: "string" - issue_comment_url: - type: "string" - issues_url: - type: "string" - pulls_url: - type: "string" - milestones_url: - type: "string" - notifications_url: - type: "string" - labels_url: - type: "string" - releases_url: - type: "string" - recommend: - type: "boolean" - homepage: - type: "string" - language: - type: "string" - forks_count: - type: "integer" - format: "int32" - stargazers_count: - type: "integer" - format: "int32" - watchers_count: - type: "integer" - format: "int32" - default_branch: - type: "string" - open_issues_count: - type: "integer" - format: "int32" - has_issues: - type: "boolean" - has_wiki: - type: "boolean" - pull_requests_enabled: - type: "boolean" - has_page: - type: "boolean" - license: - type: "string" - outsourced: - type: "boolean" - project_creator: - type: "string" - members: - type: "array" - items: - type: "string" - pushed_at: - type: "string" - created_at: - type: "string" - updated_at: - type: "string" - parent: - $ref: "#/definitions/Project" - paas: - type: "string" - stared: - type: "string" - watched: - type: "string" - permission: - type: "string" - relation: - type: "string" - description: "搜索仓库" - example: - human_name: "human_name" - stargazers_count: "stargazers_count" - pushed_at: "pushed_at" - language: "language" - branches_url: "branches_url" - issue_comment_url: "issue_comment_url" - relation: "relation" - labels_url: "labels_url" - path: "path" - releases_url: "releases_url" - members: "members" - id: 0 - pull_requests_enabled: "pull_requests_enabled" - forks_url: "forks_url" - project_creator: "project_creator" - ssh_url: "ssh_url" - license: "license" - watched: "watched" - full_name: "full_name" - html_url: "html_url" - collaborators_url: "collaborators_url" - name: "name" - outsourced: "outsourced" - pulls_url: "pulls_url" - default_branch: "default_branch" - hooks_url: "hooks_url" - stared: "stared" - tags_url: "tags_url" - private: "private" - internal: "internal" - contributors_url: "contributors_url" - notifications_url: "notifications_url" - open_issues_count: 6 - description: "description" - created_at: "created_at" - recommend: "recommend" - keys_url: "keys_url" - has_wiki: "has_wiki" - public: "public" - updated_at: "updated_at" - paas: "paas" - comments_url: "comments_url" - stargazers_url: "stargazers_url" - owner: "owner" - commits_url: "commits_url" - blobs_url: "blobs_url" - permission: "permission" - has_issues: "has_issues" - url: "url" - milestones_url: "milestones_url" - fork: "fork" - issues_url: "issues_url" - has_page: "has_page" - namespace: "{}" - watchers_count: "watchers_count" - homepage: "homepage" - forks_count: "forks_count" - Contributor: - type: "object" - properties: - email: - type: "string" - name: - type: "string" - contributions: - type: "string" - description: "获取仓库贡献者" - example: - contributions: "contributions" - name: "name" - email: "email" - Tag: - type: "object" - properties: - name: - type: "string" - commit: - type: "string" - description: "列出仓库所有的tags" - example: - name: "name" - commit: "commit" - ProjectMember: - type: "object" - properties: - id: - type: "integer" - format: "int32" - login: - type: "string" - name: - type: "string" - avatar_url: - type: "string" - url: - type: "string" - html_url: - type: "string" - followers_url: - type: "string" - following_url: - type: "string" - gists_url: - type: "string" - starred_url: - type: "string" - subscriptions_url: - type: "string" - organizations_url: - type: "string" - repos_url: - type: "string" - events_url: - type: "string" - received_events_url: - type: "string" - type: - type: "string" - site_admin: - type: "string" - permissions: - type: "string" - description: "添加仓库成员" - example: - gists_url: "gists_url" - repos_url: "repos_url" - following_url: "following_url" - starred_url: "starred_url" - login: "login" - followers_url: "followers_url" - type: "type" - url: "url" - subscriptions_url: "subscriptions_url" - received_events_url: "received_events_url" - avatar_url: "avatar_url" - events_url: "events_url" - permissions: "permissions" - html_url: "html_url" - name: "name" - site_admin: "site_admin" - id: 0 - organizations_url: "organizations_url" - ProjectMemberPermission: - type: "object" - properties: - id: - type: "integer" - format: "int32" - login: - type: "string" - name: - type: "string" - avatar_url: - type: "string" - url: - type: "string" - html_url: - type: "string" - followers_url: - type: "string" - following_url: - type: "string" - gists_url: - type: "string" - starred_url: - type: "string" - subscriptions_url: - type: "string" - organizations_url: - type: "string" - repos_url: - type: "string" - events_url: - type: "string" - received_events_url: - type: "string" - type: - type: "string" - site_admin: - type: "string" - permission: - type: "string" - description: "查看仓库成员的权限" - example: - gists_url: "gists_url" - repos_url: "repos_url" - following_url: "following_url" - starred_url: "starred_url" - permission: "permission" - login: "login" - followers_url: "followers_url" - type: "type" - url: "url" - subscriptions_url: "subscriptions_url" - received_events_url: "received_events_url" - avatar_url: "avatar_url" - events_url: "events_url" - html_url: "html_url" - name: "name" - site_admin: "site_admin" - id: 0 - organizations_url: "organizations_url" - PullRequest: - type: "object" - properties: - id: - type: "integer" - format: "int32" - url: - type: "string" - html_url: - type: "string" - diff_url: - type: "string" - patch_url: - type: "string" - issue_url: - type: "string" - commits_url: - type: "string" - review_comments_url: - type: "string" - review_comment_url: - type: "string" - comments_url: - type: "string" - statuses_url: - type: "string" - number: - type: "integer" - format: "int32" - state: - type: "string" - title: - type: "string" - body: - type: "string" - body_html: - type: "string" - assignees: - type: "array" - items: - $ref: "#/definitions/UserBasic" - testers: - type: "array" - items: - $ref: "#/definitions/UserBasic" - milestone: - $ref: "#/definitions/Milestone" - labels: - type: "array" - items: - $ref: "#/definitions/Label" - locked: - type: "string" - created_at: - type: "string" - updated_at: - type: "string" - closed_at: - type: "string" - merged_at: - type: "string" - mergeable: - type: "boolean" - head: - $ref: "#/definitions/BasicInfo" - base: - $ref: "#/definitions/BasicInfo" - _links: - type: "string" - user: - $ref: "#/definitions/UserBasic" - comments: - type: "integer" - format: "int32" - commits: - type: "integer" - format: "int32" - additions: - type: "integer" - format: "int32" - deletions: - type: "integer" - format: "int32" - changed_files: - type: "integer" - format: "int32" - description: "取消用户测试 Pull Request" - example: - issue_url: "issue_url" - body_html: "body_html" - _links: "_links" - diff_url: "diff_url" - assignees: - - "assignees" - - "assignees" - created_at: "created_at" - title: "title" - body: "body" - head: "head" - number: "number" - mergeable: "mergeable" - patch_url: "patch_url" - updated_at: "updated_at" - comments_url: "comments_url" - review_comment_url: "review_comment_url" - id: "id" - state: "state" - locked: "locked" - commits_url: "commits_url" - testers: - - "testers" - - "testers" - closed_at: "closed_at" - statuses_url: "statuses_url" - merged_at: "merged_at" - url: "url" - labels: - color: "color" - name: "name" - repository_id: 1 - id: 6 - url: "url" - milestone: - number: 5 - updated_at: "2000-01-23T04:56:07.000+00:00" - html_url: "html_url" - description: "description" - created_at: "2000-01-23T04:56:07.000+00:00" - repository_id: 2 - state: "state" - title: "title" - open_issues: 7 - closed_issues: 9 - url: "url" - due_on: "2000-01-23T04:56:07.000+00:00" - html_url: "html_url" - review_comments_url: "review_comments_url" - user: "user" - base: "base" - PullRequestComments: - type: "object" - properties: - url: - type: "string" - id: - type: "string" - path: - type: "string" - position: - type: "string" - original_position: - type: "string" - commit_id: - type: "string" - original_commit_id: - type: "string" - user: - $ref: "#/definitions/UserBasic" - body: - type: "string" - created_at: - type: "string" - updated_at: - type: "string" - html_url: - type: "string" - pull_request_url: - type: "string" - _links: - type: "string" - description: "编辑评论" - example: - original_commit_id: "original_commit_id" - _links: "_links" - created_at: "created_at" - pull_request_url: "pull_request_url" - body: "body" - url: "url" - path: "path" - original_position: "original_position" - updated_at: "updated_at" - html_url: "html_url" - id: "id" - position: "position" - commit_id: "commit_id" - user: "user" - PullRequestCommits: - type: "object" - properties: - url: - type: "string" - sha: - type: "string" - html_url: - type: "string" - comments_url: - type: "string" - commit: - type: "string" - author: - type: "string" - committer: - type: "string" - parents: - type: "string" - description: "获取某Pull Request的所有Commit信息。最多显示250条Commit" - example: - committer: "committer" - author: "author" - html_url: "html_url" - comments_url: "comments_url" - commit: "commit" - sha: "sha" - url: "url" - parents: "parents" - PullRequestFiles: - type: "object" - properties: - sha: - type: "string" - filename: - type: "string" - status: - type: "string" - additions: - type: "string" - deletions: - type: "string" - blob_url: - type: "string" - raw_url: - type: "string" - patch: - type: "string" - description: "Pull Request Commit文件列表。最多显示300条diff" - example: - patch: "patch" - filename: "filename" - additions: "additions" - deletions: "deletions" - sha: "sha" - blob_url: "blob_url" - raw_url: "raw_url" - status: "status" - Release: - type: "object" - properties: - id: - type: "integer" - format: "int32" - tag_name: - type: "string" - target_commitish: - type: "string" - prerelease: - type: "string" - name: - type: "string" - body: - type: "string" - author: - type: "string" - created_at: - type: "string" - format: "date-time" - assets: - type: "string" - description: "更新仓库Release" - example: - assets: "assets" - tag_name: "tag_name" - prerelease: "prerelease" - author: "author" - target_commitish: "target_commitish" - name: "name" - created_at: "2000-01-23T04:56:07.000+00:00" - id: 0 - body: "body" - Hook: - type: "object" - properties: - id: - type: "string" - url: - type: "string" - created_at: - type: "string" - password: - type: "string" - project_id: - type: "string" - result: - type: "string" - result_code: - type: "string" - push_events: - type: "string" - tag_push_events: - type: "string" - issues_events: - type: "string" - note_events: - type: "string" - merge_requests_events: - type: "string" - description: "更新一个仓库WebHook" - example: - result: "result" - push_events: "push_events" - tag_push_events: "tag_push_events" - password: "password" - project_id: "project_id" - issues_events: "issues_events" - created_at: "created_at" - result_code: "result_code" - merge_requests_events: "merge_requests_events" - id: "id" - note_events: "note_events" - url: "url" - Event: - type: "object" - properties: - id: - type: "integer" - format: "int32" - type: - type: "string" - actor: - type: "string" - repo: - type: "string" - org: - type: "string" - public: - type: "string" - created_at: - type: "string" - payload: - type: "object" - description: "不同类型动态的内容" - properties: {} - description: "列出仓库的所有公开动态" - example: - actor: "actor" - public: "public" - org: "org" - payload: "{}" - repo: "repo" - created_at: "created_at" - id: 0 - type: "type" - UserNotificationList: - type: "object" - properties: - total_count: - type: "integer" - format: "int32" - list: - type: "array" - description: "通知列表" - items: - $ref: "#/definitions/UserNotification" - description: "列出授权用户的所有通知" - example: - total_count: 0 - list: - - actor: - gists_url: "gists_url" - repos_url: "repos_url" - following_url: "following_url" - starred_url: "starred_url" - login: "login" - followers_url: "followers_url" - type: "type" - url: "url" - subscriptions_url: "subscriptions_url" - received_events_url: "received_events_url" - avatar_url: "avatar_url" - events_url: "events_url" - html_url: "html_url" - name: "name" - site_admin: "site_admin" - id: 5 - organizations_url: "organizations_url" - updated_at: "updated_at" - unread: "unread" - subject: - latest_comment_url: "latest_comment_url" - title: "title" - type: "type" - url: "url" - html_url: "html_url" - mute: "mute" - id: 6 - type: "type" - repository: - owner: "owner" - human_name: "human_name" - private: "private" - internal: "internal" - ssh_url: "ssh_url" - description: "description" - url: "url" - path: "path" - fork: "fork" - full_name: "full_name" - public: "public" - html_url: "html_url" - namespace: "{}" - name: "name" - id: 1 - content: "content" - url: "url" - namespaces: - - html_url: "html_url" - name: "name" - type: "type" - - html_url: "html_url" - name: "name" - type: "type" - - actor: - gists_url: "gists_url" - repos_url: "repos_url" - following_url: "following_url" - starred_url: "starred_url" - login: "login" - followers_url: "followers_url" - type: "type" - url: "url" - subscriptions_url: "subscriptions_url" - received_events_url: "received_events_url" - avatar_url: "avatar_url" - events_url: "events_url" - html_url: "html_url" - name: "name" - site_admin: "site_admin" - id: 5 - organizations_url: "organizations_url" - updated_at: "updated_at" - unread: "unread" - subject: - latest_comment_url: "latest_comment_url" - title: "title" - type: "type" - url: "url" - html_url: "html_url" - mute: "mute" - id: 6 - type: "type" - repository: - owner: "owner" - human_name: "human_name" - private: "private" - internal: "internal" - ssh_url: "ssh_url" - description: "description" - url: "url" - path: "path" - fork: "fork" - full_name: "full_name" - public: "public" - html_url: "html_url" - namespace: "{}" - name: "name" - id: 1 - content: "content" - url: "url" - namespaces: - - html_url: "html_url" - name: "name" - type: "type" - - html_url: "html_url" - name: "name" - type: "type" - UserNotification: - type: "object" - properties: - id: - type: "integer" - format: "int32" - content: - type: "string" - type: - type: "string" - unread: - type: "string" - mute: - type: "string" - updated_at: - type: "string" - url: - type: "string" - html_url: - type: "string" - actor: - description: "通知发送者" - $ref: "#/definitions/UserBasic" - repository: - $ref: "#/definitions/ProjectBasic" - subject: - description: "通知直接关联对象" - $ref: "#/definitions/UserNotificationSubject" - namespaces: - type: "array" - description: "通知次级关联对象" - items: - $ref: "#/definitions/UserNotificationNamespace" - description: "获取一条通知" - example: - actor: - gists_url: "gists_url" - repos_url: "repos_url" - following_url: "following_url" - starred_url: "starred_url" - login: "login" - followers_url: "followers_url" - type: "type" - url: "url" - subscriptions_url: "subscriptions_url" - received_events_url: "received_events_url" - avatar_url: "avatar_url" - events_url: "events_url" - html_url: "html_url" - name: "name" - site_admin: "site_admin" - id: 5 - organizations_url: "organizations_url" - updated_at: "updated_at" - unread: "unread" - subject: - latest_comment_url: "latest_comment_url" - title: "title" - type: "type" - url: "url" - html_url: "html_url" - mute: "mute" - id: 6 - type: "type" - repository: - owner: "owner" - human_name: "human_name" - private: "private" - internal: "internal" - ssh_url: "ssh_url" - description: "description" - url: "url" - path: "path" - fork: "fork" - full_name: "full_name" - public: "public" - html_url: "html_url" - namespace: "{}" - name: "name" - id: 1 - content: "content" - url: "url" - namespaces: - - html_url: "html_url" - name: "name" - type: "type" - - html_url: "html_url" - name: "name" - type: "type" - ProjectBasic: - type: "object" - properties: - id: - type: "integer" - format: "int32" - full_name: - type: "string" - human_name: - type: "string" - url: - type: "string" - namespace: - type: "object" - properties: {} - path: - type: "string" - name: - type: "string" - owner: - $ref: "#/definitions/UserBasic" - description: - type: "string" - private: - type: "boolean" - public: - type: "boolean" - internal: - type: "boolean" - fork: - type: "boolean" - html_url: - type: "string" - ssh_url: - type: "string" - example: - owner: "owner" - human_name: "human_name" - private: "private" - internal: "internal" - ssh_url: "ssh_url" - description: "description" - url: "url" - path: "path" - fork: "fork" - full_name: "full_name" - public: "public" - html_url: "html_url" - namespace: "{}" - name: "name" - id: 1 - UserNotificationSubject: - type: "object" - properties: - title: - type: "string" - url: - type: "string" - latest_comment_url: - type: "string" - type: - type: "string" - example: - latest_comment_url: "latest_comment_url" - title: "title" - type: "type" - url: "url" - UserNotificationNamespace: - type: "object" - properties: - name: - type: "string" - html_url: - type: "string" - type: - type: "string" - example: - html_url: "html_url" - name: "name" - type: "type" - Group: - type: "object" - properties: - id: - type: "integer" - format: "int32" - login: - type: "string" - url: - type: "string" - avatar_url: - type: "string" - repos_url: - type: "string" - events_url: - type: "string" - members_url: - type: "string" - description: - type: "string" - description: "获取一个组织" - example: - avatar_url: "avatar_url" - repos_url: "repos_url" - events_url: "events_url" - members_url: "members_url" - description: "description" - id: 0 - login: "login" - url: "url" - User: - type: "object" - properties: - id: - type: "integer" - format: "int32" - login: - type: "string" - name: - type: "string" - avatar_url: - type: "string" - url: - type: "string" - html_url: - type: "string" - followers_url: - type: "string" - following_url: - type: "string" - gists_url: - type: "string" - starred_url: - type: "string" - subscriptions_url: - type: "string" - organizations_url: - type: "string" - repos_url: - type: "string" - events_url: - type: "string" - received_events_url: - type: "string" - type: - type: "string" - site_admin: - type: "boolean" - blog: - type: "string" - weibo: - type: "string" - bio: - type: "string" - public_repos: - type: "string" - public_gists: - type: "string" - followers: - type: "string" - following: - type: "string" - stared: - type: "string" - watched: - type: "string" - created_at: - type: "string" - updated_at: - type: "string" - email: - type: "string" - description: "搜索用户" - example: - gists_url: "gists_url" - repos_url: "repos_url" - following_url: "following_url" - bio: "bio" - created_at: "created_at" - login: "login" - type: "type" - blog: "blog" - subscriptions_url: "subscriptions_url" - weibo: "weibo" - updated_at: "updated_at" - site_admin: "site_admin" - id: 0 - public_repos: "public_repos" - organizations_url: "organizations_url" - starred_url: "starred_url" - followers_url: "followers_url" - public_gists: "public_gists" - url: "url" - received_events_url: "received_events_url" - watched: "watched" - followers: "followers" - avatar_url: "avatar_url" - events_url: "events_url" - html_url: "html_url" - following: "following" - name: "name" - stared: "stared" - Namespace: - type: "object" - properties: - id: - type: "integer" - format: "int32" - type: - type: "string" - name: - type: "string" - path: - type: "string" - html_url: - type: "string" - parent: - $ref: "#/definitions/NamespaceMini" - description: "获取授权用户的一个 Namespace" - example: - path: "path" - parent: - path: "path" - html_url: "html_url" - name: "name" - id: 6 - type: "type" - html_url: "html_url" - name: "name" - id: 0 - type: "type" - NamespaceMini: - type: "object" - properties: - id: - type: "integer" - format: "int32" - type: - type: "string" - name: - type: "string" - path: - type: "string" - html_url: - type: "string" - example: - path: "path" - html_url: "html_url" - name: "name" - id: 6 - type: "type" - EnterpriseBasic: - type: "object" - properties: - id: - type: "integer" - format: "int32" - path: - type: "string" - name: - type: "string" - url: - type: "string" - avatar_url: - type: "string" - description: "获取一个企业" - example: - path: "path" - avatar_url: "avatar_url" - name: "name" - id: 0 - url: "url" - GroupMember: - type: "object" - properties: - url: - type: "string" - active: - type: "string" - remark: - type: "string" - role: - type: "string" - organization_url: - type: "string" - organization: - $ref: "#/definitions/Group" - user: - type: "string" - description: "增加或更新授权用户所管理组织的成员" - example: - organization_url: "organization_url" - role: "role" - organization: - avatar_url: "avatar_url" - repos_url: "repos_url" - events_url: "events_url" - members_url: "members_url" - description: "description" - id: 0 - login: "login" - url: "url" - active: "active" - remark: "remark" - user: "user" - url: "url" - Code: - type: "object" - properties: - url: - type: "string" - forks_url: - type: "string" - commits_url: - type: "string" - id: - type: "string" - description: - type: "string" - public: - type: "string" - owner: - type: "string" - user: - type: "string" - files: - type: "string" - truncated: - type: "string" - html_url: - type: "string" - comments: - type: "string" - comments_url: - type: "string" - git_pull_url: - type: "string" - git_push_url: - type: "string" - created_at: - type: "string" - updated_at: - type: "string" - description: "搜索代码片段" - example: - owner: "owner" - commits_url: "commits_url" - comments: "comments" - forks_url: "forks_url" - git_push_url: "git_push_url" - description: "description" - truncated: "truncated" - created_at: "created_at" - url: "url" - public: "public" - updated_at: "updated_at" - html_url: "html_url" - comments_url: "comments_url" - git_pull_url: "git_pull_url" - files: "files" - id: "id" - user: "user" - CodeForksHistory: - type: "object" - properties: - url: - type: "string" - forks_url: - type: "string" - commits_url: - type: "string" - id: - type: "string" - description: - type: "string" - public: - type: "string" - owner: - type: "string" - user: - type: "string" - files: - type: "string" - truncated: - type: "string" - html_url: - type: "string" - comments: - type: "string" - comments_url: - type: "string" - git_pull_url: - type: "string" - git_push_url: - type: "string" - created_at: - type: "string" - updated_at: - type: "string" - forks: - type: "string" - history: - type: "string" - description: "获取代码片段的commit" - example: - owner: "owner" - forks: "forks" - commits_url: "commits_url" - comments: "comments" - forks_url: "forks_url" - git_push_url: "git_push_url" - description: "description" - truncated: "truncated" - created_at: "created_at" - history: "history" - url: "url" - public: "public" - updated_at: "updated_at" - html_url: "html_url" - comments_url: "comments_url" - git_pull_url: "git_pull_url" - files: "files" - id: "id" - user: "user" - CodeComment: - type: "object" - properties: - id: - type: "string" - body: - type: "string" - created_at: - type: "string" - updated_at: - type: "string" - description: "修改代码片段的评论" - example: - updated_at: "updated_at" - created_at: "created_at" - id: "id" - body: "body" - CodeForks: - type: "object" - properties: - user: - type: "string" - url: - type: "string" - id: - type: "string" - created_at: - type: "string" - updated_at: - type: "string" - description: "获取 Fork 了指定代码片段的列表" - example: - updated_at: "updated_at" - created_at: "created_at" - id: "id" - user: "user" - url: "url" - GroupDetail: - type: "object" - properties: - id: - type: "integer" - format: "int32" - login: - type: "string" - url: - type: "string" - avatar_url: - type: "string" - repos_url: - type: "string" - events_url: - type: "string" - members_url: - type: "string" - description: - type: "string" - name: - type: "string" - created_at: - type: "string" - type: - type: "string" - location: - type: "string" - email: - type: "string" - html_url: - type: "string" - public: - type: "string" - enterprise: - type: "string" - members: - type: "string" - public_repos: - type: "string" - private_repos: - type: "string" - owner: - type: "string" - description: "更新授权用户所管理的组织资料" - example: - owner: "owner" - repos_url: "repos_url" - members_url: "members_url" - enterprise: "enterprise" - description: "description" - created_at: "created_at" - login: "login" - type: "type" - url: "url" - private_repos: "private_repos" - avatar_url: "avatar_url" - public: "public" - events_url: "events_url" - html_url: "html_url" - members: "members" - name: "name" - location: "location" - id: 0 - public_repos: "public_repos" - email: "email" - EnterpriseMember: - type: "object" - properties: - url: - type: "string" - active: - type: "string" - remark: - type: "string" - role: - type: "string" - outsourced: - type: "string" - enterprise: - $ref: "#/definitions/EnterpriseBasic" - user: - type: "string" - description: "修改企业成员权限或备注" - example: - role: "role" - enterprise: - path: "path" - avatar_url: "avatar_url" - name: "name" - id: 0 - url: "url" - outsourced: "outsourced" - active: "active" - remark: "remark" - user: "user" - url: "url" - WeekReport: - type: "object" - properties: - id: - type: "integer" - format: "int32" - content: - type: "string" - content_html: - type: "string" - year: - type: "string" - month: - type: "string" - week_index: - type: "string" - week_begin: - type: "string" - week_end: - type: "string" - created_at: - type: "string" - updated_at: - type: "string" - user: - $ref: "#/definitions/UserMini" - description: "新建周报" - example: - month: "month" - updated_at: "updated_at" - year: "year" - created_at: "created_at" - id: 0 - week_index: "week_index" - week_begin: "week_begin" - week_end: "week_end" - user: - avatar_url: "avatar_url" - html_url: "html_url" - name: "name" - id: 6 - login: "login" - url: "url" - content: "content" - content_html: "content_html" - UserMini: - type: "object" - properties: - id: - type: "integer" - format: "int32" - login: - type: "string" - name: - type: "string" - avatar_url: - type: "string" - url: - type: "string" - html_url: - type: "string" - example: - avatar_url: "avatar_url" - html_url: "html_url" - name: "name" - id: 6 - login: "login" - url: "url" - UserNotificationCount: - type: "object" - properties: - total_count: - type: "integer" - format: "int32" - description: "通知总数" - notification_count: - type: "integer" - format: "int32" - description: "通知数量" - message_count: - type: "integer" - format: "int32" - description: "私信数量" - description: "获取授权用户的通知数" - example: - total_count: 0 - notification_count: 6 - message_count: 1 - UserMessageList: - type: "object" - properties: - total_count: - type: "integer" - format: "int32" - list: - type: "array" - description: "私信列表" - items: - $ref: "#/definitions/UserMessage" - description: "列出授权用户的所有私信" - example: - total_count: 0 - list: - - updated_at: "updated_at" - sender: - gists_url: "gists_url" - repos_url: "repos_url" - following_url: "following_url" - starred_url: "starred_url" - login: "login" - followers_url: "followers_url" - type: "type" - url: "url" - subscriptions_url: "subscriptions_url" - received_events_url: "received_events_url" - avatar_url: "avatar_url" - events_url: "events_url" - html_url: "html_url" - name: "name" - site_admin: "site_admin" - id: 5 - organizations_url: "organizations_url" - unread: "unread" - html_url: "html_url" - id: 6 - content: "content" - url: "url" - - updated_at: "updated_at" - sender: - gists_url: "gists_url" - repos_url: "repos_url" - following_url: "following_url" - starred_url: "starred_url" - login: "login" - followers_url: "followers_url" - type: "type" - url: "url" - subscriptions_url: "subscriptions_url" - received_events_url: "received_events_url" - avatar_url: "avatar_url" - events_url: "events_url" - html_url: "html_url" - name: "name" - site_admin: "site_admin" - id: 5 - organizations_url: "organizations_url" - unread: "unread" - html_url: "html_url" - id: 6 - content: "content" - url: "url" - UserMessage: - type: "object" - properties: - id: - type: "integer" - format: "int32" - sender: - description: "发送者" - $ref: "#/definitions/UserBasic" - unread: - type: "string" - content: - type: "string" - updated_at: - type: "string" - url: - type: "string" - html_url: - type: "string" - description: "获取一条私信" - example: - updated_at: "updated_at" - sender: - gists_url: "gists_url" - repos_url: "repos_url" - following_url: "following_url" - starred_url: "starred_url" - login: "login" - followers_url: "followers_url" - type: "type" - url: "url" - subscriptions_url: "subscriptions_url" - received_events_url: "received_events_url" - avatar_url: "avatar_url" - events_url: "events_url" - html_url: "html_url" - name: "name" - site_admin: "site_admin" - id: 5 - organizations_url: "organizations_url" - unread: "unread" - html_url: "html_url" - id: 6 - content: "content" - url: "url" - BasicInfo: - type: "object" - properties: - label: - type: "string" - ref: - type: "string" - sha: - type: "string" - user: - $ref: "#/definitions/UserBasic" - repo: - $ref: "#/definitions/Project" - description: "basic information" - PullRequestUpdateParam: - type: "object" - properties: - access_token: - type: "string" - description: "用户授权码" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - title: - type: "string" - description: "可选。Pull Request 标题" - x-exportParamName: "Title" - x-optionalDataType: "String" - body: - type: "string" - description: "可选。Pull Request 内容" - x-exportParamName: "Body" - x-optionalDataType: "String" - state: - type: "string" - description: "可选。Pull Request 状态" - enum: - - "open" - - "closed" - x-exportParamName: "State" - x-optionalDataType: "String" - milestone_number: - type: "integer" - format: "int32" - description: "可选。里程碑序号(id)" - x-exportParamName: "MilestoneNumber" - x-optionalDataType: "Int32" - labels: - type: "string" - description: "用逗号分开的标签,名称要求长度在 2-20 之间且非特殊字符。如: bug,performance" - x-exportParamName: "Labels" - x-optionalDataType: "String" - description: "update pull request information" - example: - access_token: "access_token" - milestone_number: 0 - state: "open" - title: "title" - body: "body" - labels: "labels" - IssueUpdateParam: - type: "object" - properties: - access_token: - type: "string" - description: "用户授权码" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - repo: - type: "string" - description: "仓库路径(path)" - x-exportParamName: "Repo" - x-optionalDataType: "String" - title: - type: "string" - description: "Issue标题" - x-exportParamName: "Title" - x-optionalDataType: "String" - state: - type: "string" - description: "Issue 状态,open(开启的)、progressing(进行中)、closed(关闭的)" - enum: - - "open" - - "progressing" - - "closed" - x-exportParamName: "State" - x-optionalDataType: "String" - body: - type: "string" - description: "Issue描述" - x-exportParamName: "Body" - x-optionalDataType: "String" - assignee: - type: "string" - description: "Issue负责人的username" - x-exportParamName: "Assignee" - x-optionalDataType: "String" - milestone: - type: "integer" - format: "int32" - description: "里程碑序号" - x-exportParamName: "Milestone" - x-optionalDataType: "Int32" - labels: - type: "string" - description: "用逗号分开的标签,名称要求长度在 2-20 之间且非特殊字符。如: bug,performance" - x-exportParamName: "Labels" - x-optionalDataType: "String" - program: - type: "string" - description: "项目ID" - x-exportParamName: "Program" - x-optionalDataType: "String" - description: "update issue information" - example: - access_token: "access_token" - milestone: 0 - repo: "repo" - state: "open" - assignee: "assignee" - program: "program" - title: "title" - body: "body" - labels: "labels" - RepositoryPostParam: - type: "object" - properties: - access_token: - type: "string" - description: "用户授权码" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - name: - type: "string" - description: "仓库名称" - x-exportParamName: "Name" - description: - type: "string" - description: "仓库描述" - x-exportParamName: "Description" - x-optionalDataType: "String" - homepage: - type: "string" - description: "主页(eg: https://gitee.com)" - x-exportParamName: "Homepage" - x-optionalDataType: "String" - has_issues: - type: "boolean" - description: "允许提Issue与否。默认: 允许(true)" - default: true - x-exportParamName: "HasIssues" - x-optionalDataType: "Bool" - has_wiki: - type: "boolean" - description: "提供Wiki与否。默认: 提供(true)" - default: true - x-exportParamName: "HasWiki" - x-optionalDataType: "Bool" - public: - type: "integer" - format: "int32" - description: "仓库开源类型。0(私有), 1(外部开源), 2(内部开源),注:与private互斥,以public为主。" - enum: - - 0 - - 1 - - 2 - x-exportParamName: "Public" - x-optionalDataType: "Int32" - private: - type: "boolean" - description: "仓库公开或私有。默认: 公开(false),注:与public互斥,以public为主。" - x-exportParamName: "Private" - x-optionalDataType: "Bool" - auto_init: - type: "boolean" - description: "值为true时则会用README初始化仓库。默认: 不初始化(false)" - x-exportParamName: "AutoInit" - x-optionalDataType: "Bool" - gitignore_template: - type: "string" - description: "Git Ingore模版" - enum: - - "Actionscript" - - "Ada" - - "Agda" - - "Android" - - "AppEngine" - - "AppceleratorTitanium" - - "ArchLinuxPackages" - - "Autotools" - - "C" - - "C++" - - "CFWheels" - - "CMake" - - "CUDA" - - "CakePHP" - - "ChefCookbook" - - "Clojure" - - "CodeIgniter" - - "CommonLisp" - - "Composer" - - "Concrete5" - - "Coq" - - "CraftCMS" - - "D" - - "DM" - - "Dart" - - "Delphi" - - "Drupal" - - "EPiServer" - - "Eagle" - - "Elisp" - - "Elixir" - - "Elm" - - "Erlang" - - "ExpressionEngine" - - "ExtJs" - - "Fancy" - - "Finale" - - "Flutter" - - "ForceDotCom" - - "Fortran" - - "FuelPHP" - - "GWT" - - "Gcov" - - "GitBook" - - "Global/Anjuta" - - "Global/Ansible" - - "Global/Archives" - - "Global/Backup" - - "Global/Bazaar" - - "Global/BricxCC" - - "Global/CVS" - - "Global/Calabash" - - "Global/Cloud9" - - "Global/CodeKit" - - "Global/DartEditor" - - "Global/Diff" - - "Global/Dreamweaver" - - "Global/Dropbox" - - "Global/Eclipse" - - "Global/EiffelStudio" - - "Global/Emacs" - - "Global/Ensime" - - "Global/Espresso" - - "Global/FlexBuilder" - - "Global/GPG" - - "Global/Images" - - "Global/JDeveloper" - - "Global/JEnv" - - "Global/JetBrains" - - "Global/KDevelop4" - - "Global/Kate" - - "Global/Lazarus" - - "Global/LibreOffice" - - "Global/Linux" - - "Global/LyX" - - "Global/MATLAB" - - "Global/Mercurial" - - "Global/MicrosoftOffice" - - "Global/ModelSim" - - "Global/Momentics" - - "Global/MonoDevelop" - - "Global/NetBeans" - - "Global/Ninja" - - "Global/NotepadPP" - - "Global/Octave" - - "Global/Otto" - - "Global/PSoCCreator" - - "Global/Patch" - - "Global/PuTTY" - - "Global/Redcar" - - "Global/Redis" - - "Global/SBT" - - "Global/SVN" - - "Global/SlickEdit" - - "Global/Stata" - - "Global/SublimeText" - - "Global/SynopsysVCS" - - "Global/Tags" - - "Global/TextMate" - - "Global/TortoiseGit" - - "Global/Vagrant" - - "Global/Vim" - - "Global/VirtualEnv" - - "Global/Virtuoso" - - "Global/VisualStudioCode" - - "Global/WebMethods" - - "Global/Windows" - - "Global/Xcode" - - "Global/XilinxISE" - - "Global/macOS" - - "Go" - - "Godot" - - "Gradle" - - "Grails" - - "Haskell" - - "IGORPro" - - "Idris" - - "JBoss" - - "Java" - - "Jekyll" - - "Joomla" - - "Julia" - - "KiCad" - - "Kohana" - - "Kotlin" - - "LabVIEW" - - "Laravel" - - "Leiningen" - - "LemonStand" - - "Lilypond" - - "Lithium" - - "Lua" - - "Magento" - - "Maven" - - "Mercury" - - "MetaProgrammingSystem" - - "MiniProgram" - - "Nanoc" - - "Nim" - - "Node" - - "OCaml" - - "Objective-C" - - "Opa" - - "OpenCart" - - "OracleForms" - - "Packer" - - "Perl" - - "Perl6" - - "Phalcon" - - "PlayFramework" - - "Plone" - - "Prestashop" - - "Processing" - - "PureScript" - - "Python" - - "Qooxdoo" - - "Qt" - - "R" - - "ROS" - - "Rails" - - "RhodesRhomobile" - - "Ruby" - - "Rust" - - "SCons" - - "Sass" - - "Scala" - - "Scheme" - - "Scrivener" - - "Sdcc" - - "SeamGen" - - "SketchUp" - - "Smalltalk" - - "Stella" - - "SugarCRM" - - "Swift" - - "Symfony" - - "SymphonyCMS" - - "TeX" - - "Terraform" - - "Textpattern" - - "TurboGears2" - - "Typo3" - - "Umbraco" - - "Unity" - - "UnrealEngine" - - "VVVV" - - "VisualStudio" - - "Waf" - - "WordPress" - - "Xojo" - - "Yeoman" - - "Yii" - - "ZendFramework" - - "Zephir" - x-exportParamName: "GitignoreTemplate" - x-optionalDataType: "String" - license_template: - type: "string" - description: "License模版" - enum: - - "MulanPSL-1.0" - - "AFL-3.0" - - "AGPL-3.0" - - "Apache-2.0" - - "Artistic-2.0" - - "BSD-2-Clause" - - "BSD-3-Clause" - - "BSD-3-Clause-Clear" - - "BSL-1.0" - - "CC-BY-4.0" - - "CC-BY-SA-4.0" - - "CC0-1.0" - - "ECL-2.0" - - "EPL-1.0" - - "EUPL-1.1" - - "GPL-2.0" - - "GPL-3.0" - - "ISC" - - "LGPL-2.1" - - "LGPL-3.0" - - "LPPL-1.3c" - - "MIT" - - "MPL-2.0" - - "MS-PL" - - "MS-RL" - - "NCSA" - - "OFL-1.1" - - "OSL-3.0" - - "PostgreSQL" - - "Unlicense" - - "WTFPL" - - "Zlib" - x-exportParamName: "LicenseTemplate" - x-optionalDataType: "String" - description: "create repository" - example: - access_token: "access_token" - auto_init: true - gitignore_template: "Actionscript" - license_template: "MulanPSL-1.0" - private: true - has_wiki: true - public: 0 - name: "name" - description: "description" - has_issues: true - homepage: "homepage" - ProjectMemberPutParam: - type: "object" - properties: - access_token: - type: "string" - description: "用户授权码" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - permission: - type: "string" - description: "成员权限: 拉代码(pull),推代码(push),管理员(admin)。默认: push" - enum: - - "pull" - - "push" - - "admin" - default: "push" - x-exportParamName: "Permission" - description: "create project member" - example: - access_token: "access_token" - permission: "push" - PullRequestCommentPostParam: - type: "object" - properties: - access_token: - type: "string" - description: "用户授权码" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - body: - type: "string" - description: "必填。评论内容" - x-exportParamName: "Body" - commit_id: - type: "string" - description: "可选。PR代码评论的commit id" - x-exportParamName: "CommitId" - x-optionalDataType: "String" - path: - type: "string" - description: "可选。PR代码评论的文件名" - x-exportParamName: "Path" - x-optionalDataType: "String" - position: - type: "integer" - format: "int32" - description: "可选。PR代码评论diff中的行数" - x-exportParamName: "Position" - x-optionalDataType: "Int32" - description: "create pull request comment" - example: - access_token: "access_token" - path: "path" - position: 0 - body: "body" - commit_id: "commit_id" - PullRequestMergePutParam: - type: "object" - properties: - access_token: - type: "string" - description: "用户授权码" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - merge_method: - type: "string" - description: "可选。合并PR的方法,merge(合并所有提交)和 squash(扁平化分支合并)。默认为merge。" - enum: - - "merge" - - "squash" - default: "merge" - x-exportParamName: "MergeMethod" - x-optionalDataType: "String" - prune_source_branch: - type: "boolean" - description: "可选。合并PR后是否删除源分支,默认false(不删除)" - x-exportParamName: "PruneSourceBranch" - x-optionalDataType: "Bool" - title: - type: "string" - description: "可选。合并标题,默认为PR的标题" - x-exportParamName: "Title" - x-optionalDataType: "String" - description: - type: "string" - description: "可选。合并描述,默认为 \"Merge pull request !{pr_id} from {author}/{source_branch}\"\ - ,与页面显示的默认一致。" - x-exportParamName: "Description" - x-optionalDataType: "String" - description: "merge pull request parameter" - example: - access_token: "access_token" - path: "path" - position: 0 - body: "body" - commit_id: "commit_id" - IssueCommentPostParam: - type: "object" - properties: - access_token: - type: "string" - description: "用户授权码" - x-exportParamName: "AccessToken" - x-optionalDataType: "String" - body: - type: "string" - description: "The contents of the comment" - x-exportParamName: "Body" - x-optionalDataType: "String" - example: - access_token: "access_token" - body: "body" +--- +swagger: "2.0" +info: + version: "5.3.2" + title: "码云 Open API" +host: "gitee.com" +basePath: "/api" +tags: +- name: "Repositories" + description: "Operations about Repositories" +- name: "Git Data" + description: "Operations about Git Data" +- name: "Issues" + description: "Operations about Issues" +- name: "Labels" + description: "Operations about Labels" +- name: "Milestones" + description: "Operations about Milestones" +- name: "Miscellaneous" + description: "Operations about Miscellaneous" +- name: "Pull Requests" + description: "Operations about Pull Requests" +- name: "Webhooks" + description: "Operations about Webhooks" +- name: "Activity" + description: "Operations about Activities" +- name: "Users" + description: "Operations about Users" +- name: "Organizations" + description: "Operations about Organizations" +- name: "Enterprises" + description: "Operations about Enterprises" +- name: "Gists" + description: "Operations about Gists" +- name: "Search" + description: "Operations about Searches" +produces: +- "application/json" +- "text/plain" +paths: + /v5/repos/{owner}/{repo}/branches: + get: + tags: + - "Repositories" + summary: "获取所有分支" + description: "获取所有分支" + operationId: "getV5ReposOwnerRepoBranches" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Branch" + post: + tags: + - "Repositories" + summary: "创建分支" + description: "创建分支" + operationId: "postV5ReposOwnerRepoBranches" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "refs" + in: "formData" + description: "起点名称, 默认:master" + required: true + type: "string" + default: "master" + x-exportParamName: "Refs" + - name: "branch_name" + in: "formData" + description: "新创建的分支名称" + required: true + type: "string" + x-exportParamName: "BranchName" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/CompleteBranch" + /v5/repos/{owner}/{repo}/branches/{branch}: + get: + tags: + - "Repositories" + summary: "获取单个分支" + description: "获取单个分支" + operationId: "getV5ReposOwnerRepoBranchesBranch" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "branch" + in: "path" + description: "分支名称" + required: true + type: "string" + x-exportParamName: "Branch" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/CompleteBranch" + /v5/repos/{owner}/{repo}/branches/{branch}/protection: + put: + tags: + - "Repositories" + summary: "设置分支保护" + description: "设置分支保护" + operationId: "putV5ReposOwnerRepoBranchesBranchProtection" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "branch" + in: "path" + description: "分支名称" + required: true + type: "string" + x-exportParamName: "Branch" + - in: "body" + name: "body" + description: "设置分支保护参数" + required: true + schema: + $ref: "#/definitions/BranchProtectionPutParam" + x-exportParamName: "Body" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/CompleteBranch" + delete: + tags: + - "Repositories" + summary: "取消保护分支的设置" + description: "取消保护分支的设置" + operationId: "deleteV5ReposOwnerRepoBranchesBranchProtection" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "branch" + in: "path" + description: "分支名称" + required: true + type: "string" + x-exportParamName: "Branch" + responses: + 204: + description: "取消保护分支的设置" + /v5/repos/{owner}/{repo}/commits: + get: + tags: + - "Repositories" + summary: "仓库的所有提交" + description: "仓库的所有提交" + operationId: "getV5ReposOwnerRepoCommits" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "sha" + in: "query" + description: "提交起始的SHA值或者分支名. 默认: 仓库的默认分支" + required: false + type: "string" + x-exportParamName: "Sha" + x-optionalDataType: "String" + - name: "path" + in: "query" + description: "包含该文件的提交" + required: false + type: "string" + x-exportParamName: "Path" + x-optionalDataType: "String" + - name: "author" + in: "query" + description: "提交作者的邮箱或个人空间地址(username/login)" + required: false + type: "string" + x-exportParamName: "Author" + x-optionalDataType: "String" + - name: "since" + in: "query" + description: "提交的起始时间,时间格式为 ISO 8601" + required: false + type: "string" + x-exportParamName: "Since" + x-optionalDataType: "String" + - name: "until" + in: "query" + description: "提交的最后时间,时间格式为 ISO 8601" + required: false + type: "string" + x-exportParamName: "Until" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/RepoCommit" + /v5/repos/{owner}/{repo}/commits/{sha}: + get: + tags: + - "Repositories" + summary: "仓库的某个提交" + description: "仓库的某个提交" + operationId: "getV5ReposOwnerRepoCommitsSha" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "sha" + in: "path" + description: "提交的SHA值或者分支名" + required: true + type: "string" + x-exportParamName: "Sha" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/RepoCommit" + /v5/repos/{owner}/{repo}/compare/{base}...{head}: + get: + tags: + - "Repositories" + summary: "两个Commits之间对比的版本差异" + description: "两个Commits之间对比的版本差异" + operationId: "getV5ReposOwnerRepoCompareBase...Head" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "base" + in: "path" + description: "Commit提交的SHA值或者分支名作为对比起点" + required: true + type: "string" + x-exportParamName: "Base" + - name: "head" + in: "path" + description: "Commit提交的SHA值或者分支名作为对比终点" + required: true + type: "string" + x-exportParamName: "Head" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Compare" + /v5/repos/{owner}/{repo}/keys: + get: + tags: + - "Repositories" + summary: "获取仓库已部署的公钥" + description: "获取仓库已部署的公钥" + operationId: "getV5ReposOwnerRepoKeys" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/SSHKey" + post: + tags: + - "Repositories" + summary: "为仓库添加公钥" + description: "为仓库添加公钥" + operationId: "postV5ReposOwnerRepoKeys" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "key" + in: "formData" + description: "公钥内容" + required: true + type: "string" + x-exportParamName: "Key" + - name: "title" + in: "formData" + description: "公钥名称" + required: true + type: "string" + x-exportParamName: "Title" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/SSHKey" + /v5/repos/{owner}/{repo}/keys/available: + get: + tags: + - "Repositories" + summary: "获取仓库可部署的公钥" + description: "获取仓库可部署的公钥" + operationId: "getV5ReposOwnerRepoKeysAvailable" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/SSHKeyBasic" + /v5/repos/{owner}/{repo}/keys/enable/{id}: + put: + tags: + - "Repositories" + summary: "启用仓库公钥" + description: "启用仓库公钥" + operationId: "putV5ReposOwnerRepoKeysEnableId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "id" + in: "path" + description: "公钥 ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + responses: + 204: + description: "已启用" + 403: + description: "没有启用权限" + delete: + tags: + - "Repositories" + summary: "停用仓库公钥" + description: "停用仓库公钥" + operationId: "deleteV5ReposOwnerRepoKeysEnableId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "id" + in: "path" + description: "公钥 ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + responses: + 204: + description: "已停用" + 404: + description: "没有相关公钥" + /v5/repos/{owner}/{repo}/keys/{id}: + get: + tags: + - "Repositories" + summary: "获取仓库的单个公钥" + description: "获取仓库的单个公钥" + operationId: "getV5ReposOwnerRepoKeysId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "id" + in: "path" + description: "公钥 ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/SSHKey" + delete: + tags: + - "Repositories" + summary: "删除一个仓库公钥" + description: "删除一个仓库公钥" + operationId: "deleteV5ReposOwnerRepoKeysId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "id" + in: "path" + description: "公钥 ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + responses: + 204: + description: "删除一个仓库公钥" + /v5/repos/{owner}/{repo}/readme: + get: + tags: + - "Repositories" + summary: "获取仓库README" + description: "获取仓库README" + operationId: "getV5ReposOwnerRepoReadme" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "ref" + in: "query" + description: "分支、tag或commit。默认: 仓库的默认分支(通常是master)" + required: false + type: "string" + x-exportParamName: "Ref" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Content" + /v5/repos/{owner}/{repo}/contents/{path}: + get: + tags: + - "Repositories" + summary: "获取仓库具体路径下的内容" + description: "获取仓库具体路径下的内容" + operationId: "getV5ReposOwnerRepoContents(Path)" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "path" + in: "path" + description: "文件的路径" + required: true + type: "string" + x-exportParamName: "Path" + - name: "ref" + in: "query" + description: "分支、tag或commit。默认: 仓库的默认分支(通常是master)" + required: false + type: "string" + x-exportParamName: "Ref" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Content" + post: + tags: + - "Repositories" + summary: "新建文件" + description: "新建文件" + operationId: "postV5ReposOwnerRepoContentsPath" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "path" + in: "path" + description: "文件的路径" + required: true + type: "string" + x-exportParamName: "Path" + - name: "content" + in: "formData" + description: "文件内容, 要用 base64 编码" + required: true + type: "string" + x-exportParamName: "Content" + - name: "message" + in: "formData" + description: "提交信息" + required: true + type: "string" + x-exportParamName: "Message" + - name: "branch" + in: "formData" + description: "分支名称。默认为仓库对默认分支" + required: false + type: "string" + x-exportParamName: "Branch" + x-optionalDataType: "String" + - name: "committer[name]" + in: "formData" + description: "Committer的名字,默认为当前用户的名字" + required: false + type: "string" + x-exportParamName: "CommitterName" + x-optionalDataType: "String" + - name: "committer[email]" + in: "formData" + description: "Committer的邮箱,默认为当前用户的邮箱" + required: false + type: "string" + x-exportParamName: "CommitterEmail" + x-optionalDataType: "String" + - name: "author[name]" + in: "formData" + description: "Author的名字,默认为当前用户的名字" + required: false + type: "string" + x-exportParamName: "AuthorName" + x-optionalDataType: "String" + - name: "author[email]" + in: "formData" + description: "Author的邮箱,默认为当前用户的邮箱" + required: false + type: "string" + x-exportParamName: "AuthorEmail" + x-optionalDataType: "String" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/CommitContent" + put: + tags: + - "Repositories" + summary: "更新文件" + description: "更新文件" + operationId: "putV5ReposOwnerRepoContentsPath" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "path" + in: "path" + description: "文件的路径" + required: true + type: "string" + x-exportParamName: "Path" + - name: "content" + in: "formData" + description: "文件内容, 要用 base64 编码" + required: true + type: "string" + x-exportParamName: "Content" + - name: "sha" + in: "formData" + description: "文件的 Blob SHA,可通过 [获取仓库具体路径下的内容] API 获取" + required: true + type: "string" + x-exportParamName: "Sha" + - name: "message" + in: "formData" + description: "提交信息" + required: true + type: "string" + x-exportParamName: "Message" + - name: "branch" + in: "formData" + description: "分支名称。默认为仓库对默认分支" + required: false + type: "string" + x-exportParamName: "Branch" + x-optionalDataType: "String" + - name: "committer[name]" + in: "formData" + description: "Committer的名字,默认为当前用户的名字" + required: false + type: "string" + x-exportParamName: "CommitterName" + x-optionalDataType: "String" + - name: "committer[email]" + in: "formData" + description: "Committer的邮箱,默认为当前用户的邮箱" + required: false + type: "string" + x-exportParamName: "CommitterEmail" + x-optionalDataType: "String" + - name: "author[name]" + in: "formData" + description: "Author的名字,默认为当前用户的名字" + required: false + type: "string" + x-exportParamName: "AuthorName" + x-optionalDataType: "String" + - name: "author[email]" + in: "formData" + description: "Author的邮箱,默认为当前用户的邮箱" + required: false + type: "string" + x-exportParamName: "AuthorEmail" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/CommitContent" + delete: + tags: + - "Repositories" + summary: "删除文件" + description: "删除文件" + operationId: "deleteV5ReposOwnerRepoContentsPath" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "path" + in: "path" + description: "文件的路径" + required: true + type: "string" + x-exportParamName: "Path" + - name: "sha" + in: "query" + description: "文件的 Blob SHA,可通过 [获取仓库具体路径下的内容] API 获取" + required: true + type: "string" + x-exportParamName: "Sha" + - name: "message" + in: "query" + description: "提交信息" + required: true + type: "string" + x-exportParamName: "Message" + - name: "branch" + in: "query" + description: "分支名称。默认为仓库对默认分支" + required: false + type: "string" + x-exportParamName: "Branch" + x-optionalDataType: "String" + - name: "committer[name]" + in: "query" + description: "Committer的名字,默认为当前用户的名字" + required: false + type: "string" + x-exportParamName: "CommitterName" + x-optionalDataType: "String" + - name: "committer[email]" + in: "query" + description: "Committer的邮箱,默认为当前用户的邮箱" + required: false + type: "string" + x-exportParamName: "CommitterEmail" + x-optionalDataType: "String" + - name: "author[name]" + in: "query" + description: "Author的名字,默认为当前用户的名字" + required: false + type: "string" + x-exportParamName: "AuthorName" + x-optionalDataType: "String" + - name: "author[email]" + in: "query" + description: "Author的邮箱,默认为当前用户的邮箱" + required: false + type: "string" + x-exportParamName: "AuthorEmail" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/CommitContent" + /v5/repos/{owner}/{repo}/git/blobs/{sha}: + get: + tags: + - "Git Data" + summary: "获取文件Blob" + description: "获取文件Blob" + operationId: "getV5ReposOwnerRepoGitBlobsSha" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "sha" + in: "path" + description: "文件的 Blob SHA,可通过 [获取仓库具体路径下的内容] API 获取" + required: true + type: "string" + x-exportParamName: "Sha" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Blob" + 404: + description: "没有相关数据" + /v5/repos/{owner}/{repo}/git/trees/{sha}: + get: + tags: + - "Git Data" + summary: "获取目录Tree" + description: "获取目录Tree" + operationId: "getV5ReposOwnerRepoGitTreesSha" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "sha" + in: "path" + description: "可以是分支名(如master)、Commit或者目录Tree的SHA值" + required: true + type: "string" + x-exportParamName: "Sha" + - name: "recursive" + in: "query" + description: "赋值为1递归获取目录" + required: false + type: "integer" + format: "int32" + x-exportParamName: "Recursive" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Tree" + 404: + description: "没有相关数据" + 422: + description: "SHA值必须为Commit或Tree的" + /v5/repos/{owner}/{repo}/issues: + get: + tags: + - "Issues" + summary: "仓库的所有Issues" + description: "仓库的所有Issues" + operationId: "getV5ReposOwnerRepoIssues" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "state" + in: "query" + description: "Issue的状态: open(开启的), progressing(进行中), closed(关闭的), rejected(\ + 拒绝的)。 默认: open" + required: false + type: "string" + default: "open" + enum: + - "open" + - "progressing" + - "closed" + - "rejected" + - "all" + x-exportParamName: "State" + x-optionalDataType: "String" + - name: "labels" + in: "query" + description: "用逗号分开的标签。如: bug,performance" + required: false + type: "string" + x-exportParamName: "Labels" + x-optionalDataType: "String" + - name: "sort" + in: "query" + description: "排序依据: 创建时间(created),更新时间(updated_at)。默认: created_at" + required: false + type: "string" + default: "created" + enum: + - "created" + - "updated" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "direction" + in: "query" + description: "排序方式: 升序(asc),降序(desc)。默认: desc" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Direction" + x-optionalDataType: "String" + - name: "since" + in: "query" + description: "起始的更新时间,要求时间格式为 ISO 8601" + required: false + type: "string" + x-exportParamName: "Since" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + - name: "schedule" + in: "query" + description: "计划开始日期,格式:20181006T173008+80-20181007T173008+80(区间),或者 -20181007T173008+80(\ + 小于20181007T173008+80),或者 20181006T173008+80-(大于20181006T173008+80),要求时间格\ + 式为20181006T173008+80" + required: false + type: "string" + x-exportParamName: "Schedule" + x-optionalDataType: "String" + - name: "deadline" + in: "query" + description: "计划截止日期,格式同上" + required: false + type: "string" + x-exportParamName: "Deadline" + x-optionalDataType: "String" + - name: "created_at" + in: "query" + description: "任务创建时间,格式同上" + required: false + type: "string" + x-exportParamName: "CreatedAt" + x-optionalDataType: "String" + - name: "finished_at" + in: "query" + description: "任务完成时间,即任务最后一次转为已完成状态的时间点。格式同上" + required: false + type: "string" + x-exportParamName: "FinishedAt" + x-optionalDataType: "String" + - name: "milestone" + in: "query" + description: "根据里程碑标题。none为没里程碑的,*为所有带里程碑的" + required: false + type: "string" + x-exportParamName: "Milestone" + x-optionalDataType: "String" + - name: "assignee" + in: "query" + description: "用户的username。 none为没指派者, *为所有带有指派者的" + required: false + type: "string" + x-exportParamName: "Assignee" + x-optionalDataType: "String" + - name: "creator" + in: "query" + description: "创建Issues的用户username" + required: false + type: "string" + x-exportParamName: "Creator" + x-optionalDataType: "String" + - name: "program" + in: "query" + description: "所属项目名称。none为没有所属项目,*为所有带所属项目的" + required: false + type: "string" + x-exportParamName: "Program" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Issue" + /v5/repos/{owner}/{repo}/issues/{number}: + get: + tags: + - "Issues" + summary: "仓库的某个Issue" + description: "仓库的某个Issue" + operationId: "getV5ReposOwnerRepoIssuesNumber" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "Issue 编号(区分大小写,无需添加 # 号)" + required: true + type: "string" + x-exportParamName: "Number" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Issue" + /v5/repos/{owner}/issues: + post: + tags: + - "Issues" + summary: "创建Issue" + description: "创建Issue" + operationId: "postV5ReposOwnerIssues" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "formData" + description: "仓库路径(path)" + required: false + type: "string" + x-exportParamName: "Repo" + x-optionalDataType: "String" + - name: "title" + in: "formData" + description: "Issue标题" + required: true + type: "string" + x-exportParamName: "Title" + - name: "issue_type" + in: "formData" + description: "企业自定义任务类型,非企业默认任务类型为“任务”" + required: false + type: "string" + x-exportParamName: "IssueType" + x-optionalDataType: "String" + - name: "body" + in: "formData" + description: "Issue描述" + required: false + type: "string" + x-exportParamName: "Body" + x-optionalDataType: "String" + - name: "assignee" + in: "formData" + description: "Issue负责人的username" + required: false + type: "string" + x-exportParamName: "Assignee" + x-optionalDataType: "String" + - name: "milestone" + in: "formData" + description: "里程碑序号" + required: false + type: "integer" + format: "int32" + x-exportParamName: "Milestone" + x-optionalDataType: "Int32" + - name: "labels" + in: "formData" + description: "用逗号分开的标签,名称要求长度在 2-20 之间且非特殊字符。如: bug,performance" + required: false + type: "string" + x-exportParamName: "Labels" + x-optionalDataType: "String" + - name: "program" + in: "formData" + description: "项目ID" + required: false + type: "string" + x-exportParamName: "Program" + x-optionalDataType: "String" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/Issue" + /v5/repos/{owner}/issues/{number}: + patch: + tags: + - "Issues" + summary: "更新Issue" + description: "更新Issue" + operationId: "patchV5ReposOwnerIssuesNumber" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "number" + in: "path" + description: "Issue 编号(区分大小写,无需添加 # 号)" + required: true + type: "string" + x-exportParamName: "Number" + - in: "body" + name: "body" + description: "可选。Issue 内容" + required: true + schema: + $ref: "#/definitions/IssueUpdateParam" + x-exportParamName: "Body" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Issue" + /v5/repos/{owner}/issues/{number}/operate_logs: + get: + tags: + - "Issues" + summary: "获取某个Issue下的操作日志" + description: "获取某个Issue下的操作日志" + operationId: "getV5ReposOwnerIssuesNumberOperateLogs" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "query" + description: "仓库路径(path)" + required: false + type: "string" + x-exportParamName: "Repo" + x-optionalDataType: "String" + - name: "number" + in: "path" + description: "Issue 编号(区分大小写,无需添加 # 号)" + required: true + type: "string" + x-exportParamName: "Number" + - name: "sort" + in: "query" + description: "按递增(asc)或递减(desc)排序,默认:递减" + required: false + type: "string" + default: "desc" + enum: + - "desc" + - "asc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/OperateLog" + /v5/repos/{owner}/{repo}/labels: + get: + tags: + - "Labels" + summary: "获取仓库所有任务标签" + description: "获取仓库所有任务标签" + operationId: "getV5ReposOwnerRepoLabels" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Label" + post: + tags: + - "Labels" + summary: "创建仓库任务标签" + description: "创建仓库任务标签" + operationId: "postV5ReposOwnerRepoLabels" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "name" + in: "formData" + description: "标签名称" + required: true + type: "string" + x-exportParamName: "Name" + - name: "color" + in: "formData" + description: "标签颜色。为6位的数字,如: 000000" + required: true + type: "string" + x-exportParamName: "Color" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/Label" + /v5/repos/{owner}/{repo}/labels/{name}: + get: + tags: + - "Labels" + summary: "根据标签名称获取单个标签" + description: "根据标签名称获取单个标签" + operationId: "getV5ReposOwnerRepoLabelsName" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "name" + in: "path" + description: "标签名称" + required: true + type: "string" + x-exportParamName: "Name" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Label" + delete: + tags: + - "Labels" + summary: "删除一个仓库任务标签" + description: "删除一个仓库任务标签" + operationId: "deleteV5ReposOwnerRepoLabelsName" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "name" + in: "path" + description: "标签名称" + required: true + type: "string" + x-exportParamName: "Name" + responses: + 204: + description: "删除一个仓库任务标签" + /v5/repos/{owner}/{repo}/labels/{original_name}: + patch: + tags: + - "Labels" + summary: "更新一个仓库任务标签" + description: "更新一个仓库任务标签" + operationId: "patchV5ReposOwnerRepoLabelsOriginalName" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "original_name" + in: "path" + description: "标签原有名称" + required: true + type: "string" + x-exportParamName: "OriginalName" + - name: "name" + in: "formData" + description: "标签新名称" + required: false + type: "string" + x-exportParamName: "Name" + x-optionalDataType: "String" + - name: "color" + in: "formData" + description: "标签新颜色" + required: false + type: "string" + x-exportParamName: "Color" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Label" + /v5/repos/{owner}/{repo}/issues/{number}/labels: + get: + tags: + - "Labels" + summary: "获取仓库任务的所有标签" + description: "获取仓库任务的所有标签" + operationId: "getV5ReposOwnerRepoIssuesNumberLabels" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "Issue 编号(区分大小写,无需添加 # 号)" + required: true + type: "string" + x-exportParamName: "Number" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Label" + post: + tags: + - "Labels" + summary: "创建Issue标签" + description: "创建Issue标签\n 需要在请求的body里填上数组,元素为标签的名字。如: [\"performance\", \"bug\"\ + ]" + operationId: "postV5ReposOwnerRepoIssuesNumberLabels" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "Issue 编号(区分大小写,无需添加 # 号)" + required: true + type: "string" + x-exportParamName: "Number" + - name: "body" + in: "formData" + description: "标签名数组,如: [\"feat\", \"bug\"]" + required: false + type: "array" + items: + type: "string" + collectionFormat: "multi" + x-exportParamName: "Body" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/Label" + put: + tags: + - "Labels" + summary: "替换Issue所有标签" + description: "替换Issue所有标签\n 需要在请求的body里填上数组,元素为标签的名字。如: [\"performance\", \"\ + bug\"]" + operationId: "putV5ReposOwnerRepoIssuesNumberLabels" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "Issue 编号(区分大小写,无需添加 # 号)" + required: true + type: "string" + x-exportParamName: "Number" + - name: "body" + in: "formData" + description: "标签名数组,如: [\"feat\", \"bug\"]" + required: false + type: "array" + items: + type: "string" + collectionFormat: "multi" + x-exportParamName: "Body" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Label" + delete: + tags: + - "Labels" + summary: "删除Issue所有标签" + description: "删除Issue所有标签" + operationId: "deleteV5ReposOwnerRepoIssuesNumberLabels" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "Issue 编号(区分大小写,无需添加 # 号)" + required: true + type: "string" + x-exportParamName: "Number" + responses: + 204: + description: "删除Issue所有标签" + /v5/repos/{owner}/{repo}/issues/{number}/labels/{name}: + delete: + tags: + - "Labels" + summary: "删除Issue标签" + description: "删除Issue标签" + operationId: "deleteV5ReposOwnerRepoIssuesNumberLabelsName" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "Issue 编号(区分大小写,无需添加 # 号)" + required: true + type: "string" + x-exportParamName: "Number" + - name: "name" + in: "path" + description: "标签名称" + required: true + type: "string" + x-exportParamName: "Name" + responses: + 204: + description: "删除Issue标签" + /v5/repos/{owner}/{repo}/milestones: + get: + tags: + - "Milestones" + summary: "获取仓库所有里程碑" + description: "获取仓库所有里程碑" + operationId: "getV5ReposOwnerRepoMilestones" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "state" + in: "query" + description: "里程碑状态: open, closed, all。默认: open" + required: false + type: "string" + default: "open" + enum: + - "open" + - "closed" + - "all" + x-exportParamName: "State" + x-optionalDataType: "String" + - name: "sort" + in: "query" + description: "排序方式: due_on" + required: false + type: "string" + default: "due_on" + enum: + - "due_on" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "direction" + in: "query" + description: "升序(asc)或是降序(desc)。默认: asc" + required: false + type: "string" + x-exportParamName: "Direction" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Milestone" + post: + tags: + - "Milestones" + summary: "创建仓库里程碑" + description: "创建仓库里程碑" + operationId: "postV5ReposOwnerRepoMilestones" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "title" + in: "formData" + description: "里程碑标题" + required: true + type: "string" + x-exportParamName: "Title" + - name: "state" + in: "formData" + description: "里程碑状态: open, closed, all。默认: open" + required: false + type: "string" + default: "open" + enum: + - "open" + - "closed" + - "all" + x-exportParamName: "State" + x-optionalDataType: "String" + - name: "description" + in: "formData" + description: "里程碑具体描述" + required: false + type: "string" + x-exportParamName: "Description" + x-optionalDataType: "String" + - name: "due_on" + in: "formData" + description: "里程碑的截止日期" + required: true + type: "string" + x-exportParamName: "DueOn" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/Milestone" + /v5/repos/{owner}/{repo}/milestones/{number}: + get: + tags: + - "Milestones" + summary: "获取仓库单个里程碑" + description: "获取仓库单个里程碑" + operationId: "getV5ReposOwnerRepoMilestonesNumber" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "里程碑序号(id)" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Number" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Milestone" + delete: + tags: + - "Milestones" + summary: "删除仓库单个里程碑" + description: "删除仓库单个里程碑" + operationId: "deleteV5ReposOwnerRepoMilestonesNumber" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "里程碑序号(id)" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Number" + responses: + 204: + description: "删除仓库单个里程碑" + patch: + tags: + - "Milestones" + summary: "更新仓库里程碑" + description: "更新仓库里程碑" + operationId: "patchV5ReposOwnerRepoMilestonesNumber" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "里程碑序号(id)" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Number" + - name: "title" + in: "formData" + description: "里程碑标题" + required: true + type: "string" + x-exportParamName: "Title" + - name: "state" + in: "formData" + description: "里程碑状态: open, closed, all。默认: open" + required: false + type: "string" + default: "open" + enum: + - "open" + - "closed" + - "all" + x-exportParamName: "State" + x-optionalDataType: "String" + - name: "description" + in: "formData" + description: "里程碑具体描述" + required: false + type: "string" + x-exportParamName: "Description" + x-optionalDataType: "String" + - name: "due_on" + in: "formData" + description: "里程碑的截止日期" + required: true + type: "string" + x-exportParamName: "DueOn" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Milestone" + /v5/repos/{owner}/{repo}/license: + get: + tags: + - "Miscellaneous" + summary: "获取一个仓库使用的开源许可协议" + description: "获取一个仓库使用的开源许可协议" + operationId: "getV5ReposOwnerRepoLicense" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + responses: + 200: + description: "获取一个仓库使用的开源许可协议" + 404: + description: "没有相关数据" + /v5/repos/{owner}/{repo}/comments: + get: + tags: + - "Repositories" + summary: "获取仓库的Commit评论" + description: "获取仓库的Commit评论" + operationId: "getV5ReposOwnerRepoComments" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Note" + /v5/repos/{owner}/{repo}/commits/{ref}/comments: + get: + tags: + - "Repositories" + summary: "获取单个Commit的评论" + description: "获取单个Commit的评论" + operationId: "getV5ReposOwnerRepoCommitsRefComments" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "ref" + in: "path" + description: "Commit的Reference" + required: true + type: "string" + x-exportParamName: "Ref" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Note" + 404: + description: "没有相关数据" + /v5/repos/{owner}/{repo}/comments/{id}: + get: + tags: + - "Repositories" + summary: "获取仓库的某条Commit评论" + description: "获取仓库的某条Commit评论" + operationId: "getV5ReposOwnerRepoCommentsId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "id" + in: "path" + description: "评论的ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Note" + 404: + description: "没有相关数据" + delete: + tags: + - "Repositories" + summary: "删除Commit评论" + description: "删除Commit评论" + operationId: "deleteV5ReposOwnerRepoCommentsId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "id" + in: "path" + description: "评论的ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + responses: + 204: + description: "删除Commit评论" + patch: + tags: + - "Repositories" + summary: "更新Commit评论" + description: "更新Commit评论" + operationId: "patchV5ReposOwnerRepoCommentsId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "id" + in: "path" + description: "评论的ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + - name: "body" + in: "formData" + description: "评论的内容" + required: true + type: "string" + x-exportParamName: "Body" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Note" + 404: + description: "没有相关数据" + /v5/repos/{owner}/{repo}/commits/{sha}/comments: + post: + tags: + - "Repositories" + summary: "创建Commit评论" + description: "创建Commit评论" + operationId: "postV5ReposOwnerRepoCommitsShaComments" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "sha" + in: "path" + description: "评论的sha值" + required: true + type: "string" + x-exportParamName: "Sha" + - name: "body" + in: "formData" + description: "评论的内容" + required: true + type: "string" + x-exportParamName: "Body" + - name: "path" + in: "formData" + description: "文件的相对路径" + required: false + type: "string" + x-exportParamName: "Path" + x-optionalDataType: "String" + - name: "position" + in: "formData" + description: "Diff的相对行数" + required: false + type: "integer" + format: "int32" + x-exportParamName: "Position" + x-optionalDataType: "Int32" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/Note" + 404: + description: "没有相关数据" + /v5/repos/{owner}/{repo}/issues/comments: + get: + tags: + - "Issues" + summary: "获取仓库所有Issue的评论" + description: "获取仓库所有Issue的评论" + operationId: "getV5ReposOwnerRepoIssuesComments" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "sort" + in: "query" + description: "Either created or updated. Default: created" + required: false + type: "string" + default: "created" + enum: + - "created" + - "updated" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "direction" + in: "query" + description: "Either asc or desc. Ignored without the sort parameter." + required: false + type: "string" + default: "asc" + enum: + - "asc" + - "desc" + x-exportParamName: "Direction" + x-optionalDataType: "String" + - name: "since" + in: "query" + description: "Only comments updated at or after this time are returned.\n\ + \ This is a timestamp in ISO\ + \ 8601 format: YYYY-MM-DDTHH:MM:SSZ" + required: false + type: "string" + x-exportParamName: "Since" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Note" + /v5/repos/{owner}/{repo}/issues/{number}/comments: + get: + tags: + - "Issues" + summary: "获取仓库某个Issue所有的评论" + description: "获取仓库某个Issue所有的评论" + operationId: "getV5ReposOwnerRepoIssuesNumberComments" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "Issue 编号(区分大小写,无需添加 # 号)" + required: true + type: "string" + x-exportParamName: "Number" + - name: "since" + in: "query" + description: "Only comments updated at or after this time are returned.\n\ + \ This is a timestamp in ISO\ + \ 8601 format: YYYY-MM-DDTHH:MM:SSZ" + required: false + type: "string" + x-exportParamName: "Since" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Note" + 404: + description: "没有相关数据" + post: + tags: + - "Issues" + summary: "创建某个Issue评论" + description: "创建某个Issue评论" + operationId: "postV5ReposOwnerRepoIssuesNumberComments" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "Issue 编号(区分大小写,无需添加 # 号)" + required: true + type: "string" + x-exportParamName: "Number" + - in: "body" + name: "body" + description: "Issue comment内容" + required: true + schema: + $ref: "#/definitions/IssueCommentPostParam" + x-exportParamName: "Body" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/Note" + /v5/repos/{owner}/{repo}/issues/comments/{id}: + get: + tags: + - "Issues" + summary: "获取仓库Issue某条评论" + description: "获取仓库Issue某条评论" + operationId: "getV5ReposOwnerRepoIssuesCommentsId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "id" + in: "path" + description: "评论的ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Note" + 404: + description: "没有相关数据" + delete: + tags: + - "Issues" + summary: "删除Issue某条评论" + description: "删除Issue某条评论" + operationId: "deleteV5ReposOwnerRepoIssuesCommentsId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "id" + in: "path" + description: "评论的ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + responses: + 204: + description: "删除Issue某条评论" + patch: + tags: + - "Issues" + summary: "更新Issue某条评论" + description: "更新Issue某条评论" + operationId: "patchV5ReposOwnerRepoIssuesCommentsId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "id" + in: "path" + description: "评论的ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + - name: "body" + in: "formData" + description: "The contents of the comment." + required: true + type: "string" + x-exportParamName: "Body" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Note" + /v5/repos/{owner}/{repo}/pages: + get: + tags: + - "Repositories" + summary: "获取Pages信息" + description: "获取Pages信息" + operationId: "getV5ReposOwnerRepoPages" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + responses: + 200: + description: "获取Pages信息" + /v5/repos/{owner}/{repo}/pages/builds: + post: + tags: + - "Repositories" + summary: "请求建立Pages" + description: "请求建立Pages" + operationId: "postV5ReposOwnerRepoPagesBuilds" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + responses: + 201: + description: "请求建立Pages" + /v5/repos/{owner}/{repo}: + get: + tags: + - "Repositories" + summary: "获取用户的某个仓库" + description: "获取用户的某个仓库" + operationId: "getV5ReposOwnerRepo" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Project" + delete: + tags: + - "Repositories" + summary: "删除一个仓库" + description: "删除一个仓库" + operationId: "deleteV5ReposOwnerRepo" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + responses: + 204: + description: "删除一个仓库" + patch: + tags: + - "Repositories" + summary: "更新仓库设置" + description: "更新仓库设置" + operationId: "patchV5ReposOwnerRepo" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - in: "body" + name: "body" + description: "repo patch param" + required: true + schema: + $ref: "#/definitions/RepoPatchParam" + x-exportParamName: "Body" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Project" + /v5/repos/{owner}/{repo}/contributors: + get: + tags: + - "Repositories" + summary: "获取仓库贡献者" + description: "获取仓库贡献者" + operationId: "getV5ReposOwnerRepoContributors" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Contributor" + /v5/repos/{owner}/{repo}/tags: + get: + tags: + - "Repositories" + summary: "列出仓库所有的tags" + description: "列出仓库所有的tags" + operationId: "getV5ReposOwnerRepoTags" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Tag" + /v5/repos/{owner}/{repo}/clear: + put: + tags: + - "Repositories" + summary: "清空一个仓库" + description: "清空一个仓库" + operationId: "putV5ReposOwnerRepoClear" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + responses: + 204: + description: "清空仓库成功" + /v5/repos/{owner}/{repo}/collaborators: + get: + tags: + - "Repositories" + summary: "获取仓库的所有成员" + description: "获取仓库的所有成员" + operationId: "getV5ReposOwnerRepoCollaborators" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/ProjectMember" + /v5/repos/{owner}/{repo}/collaborators/{username}: + get: + tags: + - "Repositories" + summary: "判断用户是否为仓库成员" + description: "判断用户是否为仓库成员" + operationId: "getV5ReposOwnerRepoCollaboratorsUsername" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + responses: + 204: + description: "用户为仓库成员" + put: + tags: + - "Repositories" + summary: "添加仓库成员" + description: "添加仓库成员" + operationId: "putV5ReposOwnerRepoCollaboratorsUsername" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + - in: "body" + name: "body" + description: "仓库成员内容" + required: true + schema: + $ref: "#/definitions/ProjectMemberPutParam" + x-exportParamName: "Body" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/ProjectMember" + delete: + tags: + - "Repositories" + summary: "移除仓库成员" + description: "移除仓库成员" + operationId: "deleteV5ReposOwnerRepoCollaboratorsUsername" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + responses: + 204: + description: "移除仓库成员" + /v5/repos/{owner}/{repo}/collaborators/{username}/permission: + get: + tags: + - "Repositories" + summary: "查看仓库成员的权限" + description: "查看仓库成员的权限" + operationId: "getV5ReposOwnerRepoCollaboratorsUsernamePermission" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/ProjectMemberPermission" + /v5/repos/{owner}/{repo}/forks: + get: + tags: + - "Repositories" + summary: "查看仓库的Forks" + description: "查看仓库的Forks" + operationId: "getV5ReposOwnerRepoForks" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "sort" + in: "query" + description: "排序方式: fork的时间(newest, oldest),star的人数(stargazers)" + required: false + type: "string" + default: "newest" + enum: + - "newest" + - "oldest" + - "stargazers" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Project" + 403: + description: "没有权限" + 404: + description: "没有相关数据" + post: + tags: + - "Repositories" + summary: "Fork一个仓库" + description: "Fork一个仓库" + operationId: "postV5ReposOwnerRepoForks" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "organization" + in: "formData" + description: "组织空间地址,不填写默认Fork到用户个人空间地址" + required: false + type: "string" + x-exportParamName: "Organization" + x-optionalDataType: "String" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/Project" + /v5/repos/{owner}/{repo}/pulls: + get: + tags: + - "Pull Requests" + summary: "获取Pull Request列表" + description: "获取Pull Request列表" + operationId: "getV5ReposOwnerRepoPulls" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "state" + in: "query" + description: "可选。Pull Request 状态" + required: false + type: "string" + default: "open" + enum: + - "open" + - "closed" + - "merged" + - "all" + x-exportParamName: "State" + x-optionalDataType: "String" + - name: "head" + in: "query" + description: "可选。Pull Request 提交的源分支。格式:branch 或者:username:branch" + required: false + type: "string" + x-exportParamName: "Head" + x-optionalDataType: "String" + - name: "base" + in: "query" + description: "可选。Pull Request 提交目标分支的名称。" + required: false + type: "string" + x-exportParamName: "Base" + x-optionalDataType: "String" + - name: "sort" + in: "query" + description: "可选。排序字段,默认按创建时间" + required: false + type: "string" + default: "created" + enum: + - "created" + - "updated" + - "popularity" + - "long-running" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "direction" + in: "query" + description: "可选。升序/降序" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Direction" + x-optionalDataType: "String" + - name: "milestone_number" + in: "query" + description: "可选。里程碑序号(id)" + required: false + type: "integer" + format: "int32" + x-exportParamName: "MilestoneNumber" + x-optionalDataType: "Int32" + - name: "labels" + in: "query" + description: "用逗号分开的标签。如: bug,performance" + required: false + type: "string" + x-exportParamName: "Labels" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/PullRequest" + post: + tags: + - "Pull Requests" + summary: "创建Pull Request" + description: "创建Pull Request" + operationId: "postV5ReposOwnerRepoPulls" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "title" + in: "formData" + description: "必填。Pull Request 标题" + required: true + type: "string" + x-exportParamName: "Title" + - name: "head" + in: "formData" + description: "必填。Pull Request 提交的源分支。格式:branch 或者:username:branch" + required: true + type: "string" + x-exportParamName: "Head" + - name: "base" + in: "formData" + description: "必填。Pull Request 提交目标分支的名称" + required: true + type: "string" + x-exportParamName: "Base" + - name: "body" + in: "formData" + description: "可选。Pull Request 内容" + required: false + type: "string" + x-exportParamName: "Body" + x-optionalDataType: "String" + - name: "milestone_number" + in: "formData" + description: "可选。里程碑序号(id)" + required: false + type: "integer" + format: "int32" + x-exportParamName: "MilestoneNumber" + x-optionalDataType: "Int32" + - name: "labels" + in: "formData" + description: "用逗号分开的标签,名称要求长度在 2-20 之间且非特殊字符。如: bug,performance" + required: false + type: "string" + x-exportParamName: "Labels" + x-optionalDataType: "String" + - name: "issue" + in: "formData" + description: "可选。Pull Request的标题和内容可以根据指定的Issue Id自动填充" + required: false + type: "string" + x-exportParamName: "Issue" + x-optionalDataType: "String" + - name: "assignees" + in: "formData" + description: "可选。审查人员username,可多个,半角逗号分隔,如:(username1,username2)" + required: false + type: "string" + x-exportParamName: "Assignees" + x-optionalDataType: "String" + - name: "testers" + in: "formData" + description: "可选。测试人员username,可多个,半角逗号分隔,如:(username1,username2)" + required: false + type: "string" + x-exportParamName: "Testers" + x-optionalDataType: "String" + - name: "prune_source_branch" + in: "formData" + description: "可选。合并PR后是否删除源分支,默认false(不删除)" + required: false + type: "boolean" + x-exportParamName: "PruneSourceBranch" + x-optionalDataType: "Bool" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/PullRequest" + /v5/repos/{owner}/{repo}/pulls/comments: + get: + tags: + - "Pull Requests" + summary: "获取该仓库下的所有Pull Request评论" + description: "获取该仓库下的所有Pull Request评论" + operationId: "getV5ReposOwnerRepoPullsComments" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "sort" + in: "query" + description: "可选。按创建时间/更新时间排序" + required: false + type: "string" + default: "created" + enum: + - "created" + - "updated" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "direction" + in: "query" + description: "可选。升序/降序" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Direction" + x-optionalDataType: "String" + - name: "since" + in: "query" + description: "起始的更新时间,要求时间格式为 ISO 8601" + required: false + type: "string" + x-exportParamName: "Since" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/PullRequestComments" + /v5/repos/{owner}/{repo}/pulls/{number}: + get: + tags: + - "Pull Requests" + summary: "获取单个Pull Request" + description: "获取单个Pull Request" + operationId: "getV5ReposOwnerRepoPullsNumber" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "第几个PR,即本仓库PR的序数" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Number" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/PullRequest" + patch: + tags: + - "Pull Requests" + summary: "更新Pull Request信息" + description: "更新Pull Request信息" + operationId: "patchV5ReposOwnerRepoPullsNumber" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "第几个PR,即本仓库PR的序数" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Number" + - in: "body" + name: "body" + description: "可选。Pull Request 内容" + required: true + schema: + $ref: "#/definitions/PullRequestUpdateParam" + x-exportParamName: "Body" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/PullRequest" + /v5/repos/{owner}/{repo}/pulls/{number}/operate_logs: + get: + tags: + - "Pull Requests" + summary: "获取某个Pull Request的操作日志" + description: "获取某个Pull Request的操作日志" + operationId: "getV5ReposOwnerRepoPullsNumberOperateLogs" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "第几个PR,即本仓库PR的序数" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Number" + - name: "sort" + in: "query" + description: "按递增(asc)或递减(desc)排序,默认:递减" + required: false + type: "string" + default: "desc" + enum: + - "desc" + - "asc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/OperateLog" + /v5/repos/{owner}/{repo}/pulls/{number}/commits: + get: + tags: + - "Pull Requests" + summary: "获取某Pull Request的所有Commit信息。最多显示250条Commit" + description: "获取某Pull Request的所有Commit信息。最多显示250条Commit" + operationId: "getV5ReposOwnerRepoPullsNumberCommits" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "第几个PR,即本仓库PR的序数" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Number" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/PullRequestCommits" + /v5/repos/{owner}/{repo}/pulls/{number}/files: + get: + tags: + - "Pull Requests" + summary: "Pull Request Commit文件列表。最多显示300条diff" + description: "Pull Request Commit文件列表。最多显示300条diff" + operationId: "getV5ReposOwnerRepoPullsNumberFiles" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "第几个PR,即本仓库PR的序数" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Number" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/PullRequestFiles" + /v5/repos/{owner}/{repo}/pulls/{number}/merge: + get: + tags: + - "Pull Requests" + summary: "判断Pull Request是否已经合并" + description: "判断Pull Request是否已经合并" + operationId: "getV5ReposOwnerRepoPullsNumberMerge" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "第几个PR,即本仓库PR的序数" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Number" + responses: + 204: + description: "Pull Request已经合并" + 404: + description: "Pull Request未合并或不存在" + put: + tags: + - "Pull Requests" + summary: "合并Pull Request" + description: "合并Pull Request" + operationId: "putV5ReposOwnerRepoPullsNumberMerge" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "第几个PR,即本仓库PR的序数" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Number" + - in: "body" + name: "body" + description: "PullRequest合入参数" + required: true + schema: + $ref: "#/definitions/PullRequestMergePutParam" + x-exportParamName: "Body" + responses: + 200: + description: "合并Pull Request" + /v5/repos/{owner}/{repo}/pulls/{number}/assignees: + post: + tags: + - "Pull Requests" + summary: "指派用户审查 Pull Request" + description: "指派用户审查 Pull Request" + operationId: "postV5ReposOwnerRepoPullsNumberAssignees" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "第几个PR,即本仓库PR的序数" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Number" + - name: "assignees" + in: "formData" + description: "用户的个人空间地址, 以 , 分隔" + required: true + type: "string" + x-exportParamName: "Assignees" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/PullRequest" + delete: + tags: + - "Pull Requests" + summary: "取消用户审查 Pull Request" + description: "取消用户审查 Pull Request" + operationId: "deleteV5ReposOwnerRepoPullsNumberAssignees" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "第几个PR,即本仓库PR的序数" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Number" + - name: "assignees" + in: "query" + description: "用户的个人空间地址, 以 , 分隔" + required: true + type: "string" + x-exportParamName: "Assignees" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/PullRequest" + /v5/repos/{owner}/{repo}/pulls/{number}/testers: + post: + tags: + - "Pull Requests" + summary: "指派用户测试 Pull Request" + description: "指派用户测试 Pull Request" + operationId: "postV5ReposOwnerRepoPullsNumberTesters" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "第几个PR,即本仓库PR的序数" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Number" + - name: "testers" + in: "formData" + description: "用户的个人空间地址, 以 , 分隔" + required: true + type: "string" + x-exportParamName: "Testers" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/PullRequest" + delete: + tags: + - "Pull Requests" + summary: "取消用户测试 Pull Request" + description: "取消用户测试 Pull Request" + operationId: "deleteV5ReposOwnerRepoPullsNumberTesters" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "第几个PR,即本仓库PR的序数" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Number" + - name: "testers" + in: "query" + description: "用户的个人空间地址, 以 , 分隔" + required: true + type: "string" + x-exportParamName: "Testers" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/PullRequest" + /v5/repos/{owner}/{repo}/pulls/{number}/comments: + get: + tags: + - "Pull Requests" + summary: "获取某个Pull Request的所有评论" + description: "获取某个Pull Request的所有评论" + operationId: "getV5ReposOwnerRepoPullsNumberComments" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "第几个PR,即本仓库PR的序数" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Number" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/PullRequestComments" + post: + tags: + - "Pull Requests" + summary: "提交Pull Request评论" + description: "提交Pull Request评论" + operationId: "postV5ReposOwnerRepoPullsNumberComments" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "number" + in: "path" + description: "第几个PR,即本仓库PR的序数" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Number" + - in: "body" + name: "body" + description: "评论内容" + required: true + schema: + $ref: "#/definitions/PullRequestCommentPostParam" + x-exportParamName: "Body" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/PullRequestComments" + /v5/repos/{owner}/{repo}/pulls/comments/{id}: + get: + tags: + - "Pull Requests" + summary: "获取Pull Request的某个评论" + description: "获取Pull Request的某个评论" + operationId: "getV5ReposOwnerRepoPullsCommentsId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "id" + in: "path" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/PullRequestComments" + delete: + tags: + - "Pull Requests" + summary: "删除评论" + description: "删除评论" + operationId: "deleteV5ReposOwnerRepoPullsCommentsId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "id" + in: "path" + description: "评论的ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + responses: + 204: + description: "删除评论" + patch: + tags: + - "Pull Requests" + summary: "编辑评论" + description: "编辑评论" + operationId: "patchV5ReposOwnerRepoPullsCommentsId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "id" + in: "path" + description: "评论的ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + - name: "body" + in: "formData" + description: "必填。评论内容" + required: true + type: "string" + x-exportParamName: "Body" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/PullRequestComments" + /v5/repos/{owner}/{repo}/releases: + get: + tags: + - "Repositories" + summary: "获取仓库的所有Releases" + description: "获取仓库的所有Releases" + operationId: "getV5ReposOwnerRepoReleases" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Release" + post: + tags: + - "Repositories" + summary: "创建仓库Release" + description: "创建仓库Release" + operationId: "postV5ReposOwnerRepoReleases" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "tag_name" + in: "formData" + description: "Tag 名称, 提倡以v字母为前缀做为Release名称,例如v1.0或者v2.3.4" + required: true + type: "string" + x-exportParamName: "TagName" + - name: "name" + in: "formData" + description: "Release 名称" + required: true + type: "string" + x-exportParamName: "Name" + - name: "body" + in: "formData" + description: "Release 描述" + required: true + type: "string" + x-exportParamName: "Body" + - name: "prerelease" + in: "formData" + description: "是否为预览版本。默认: false(非预览版本)" + required: false + type: "boolean" + x-exportParamName: "Prerelease" + x-optionalDataType: "Bool" + - name: "target_commitish" + in: "formData" + description: "分支名称或者commit SHA, 默认是当前默认分支" + required: true + type: "string" + x-exportParamName: "TargetCommitish" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/Release" + /v5/repos/{owner}/{repo}/releases/{id}: + get: + tags: + - "Repositories" + summary: "获取仓库的单个Releases" + description: "获取仓库的单个Releases" + operationId: "getV5ReposOwnerRepoReleasesId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "id" + in: "path" + description: "发行版本的ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Release" + delete: + tags: + - "Repositories" + summary: "删除仓库Release" + description: "删除仓库Release" + operationId: "deleteV5ReposOwnerRepoReleasesId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "id" + in: "path" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + responses: + 204: + description: "删除仓库Release" + patch: + tags: + - "Repositories" + summary: "更新仓库Release" + description: "更新仓库Release" + operationId: "patchV5ReposOwnerRepoReleasesId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "tag_name" + in: "formData" + description: "Tag 名称, 提倡以v字母为前缀做为Release名称,例如v1.0或者v2.3.4" + required: true + type: "string" + x-exportParamName: "TagName" + - name: "name" + in: "formData" + description: "Release 名称" + required: true + type: "string" + x-exportParamName: "Name" + - name: "body" + in: "formData" + description: "Release 描述" + required: true + type: "string" + x-exportParamName: "Body" + - name: "prerelease" + in: "formData" + description: "是否为预览版本。默认: false(非预览版本)" + required: false + type: "boolean" + x-exportParamName: "Prerelease" + x-optionalDataType: "Bool" + - name: "id" + in: "path" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Release" + /v5/repos/{owner}/{repo}/releases/latest: + get: + tags: + - "Repositories" + summary: "获取仓库的最后更新的Release" + description: "获取仓库的最后更新的Release" + operationId: "getV5ReposOwnerRepoReleasesLatest" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Release" + /v5/repos/{owner}/{repo}/releases/tags/{tag}: + get: + tags: + - "Repositories" + summary: "根据Tag名称获取仓库的Release" + description: "根据Tag名称获取仓库的Release" + operationId: "getV5ReposOwnerRepoReleasesTagsTag" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "tag" + in: "path" + description: "Tag 名称" + required: true + type: "string" + x-exportParamName: "Tag" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Release" + /v5/repos/{owner}/{repo}/hooks: + get: + tags: + - "Webhooks" + summary: "列出仓库的WebHooks" + description: "列出仓库的WebHooks" + operationId: "getV5ReposOwnerRepoHooks" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Hook" + post: + tags: + - "Webhooks" + summary: "创建一个仓库WebHook" + description: "创建一个仓库WebHook" + operationId: "postV5ReposOwnerRepoHooks" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "url" + in: "formData" + description: "远程HTTP URL" + required: true + type: "string" + x-exportParamName: "Url" + - name: "password" + in: "formData" + description: "请求URL时会带上该密码,防止URL被恶意请求" + required: false + type: "string" + x-exportParamName: "Password" + x-optionalDataType: "String" + - name: "push_events" + in: "formData" + description: "Push代码到仓库" + required: false + type: "boolean" + default: true + x-exportParamName: "PushEvents" + x-optionalDataType: "Bool" + - name: "tag_push_events" + in: "formData" + description: "提交Tag到仓库" + required: false + type: "boolean" + x-exportParamName: "TagPushEvents" + x-optionalDataType: "Bool" + - name: "issues_events" + in: "formData" + description: "创建/关闭Issue" + required: false + type: "boolean" + x-exportParamName: "IssuesEvents" + x-optionalDataType: "Bool" + - name: "note_events" + in: "formData" + description: "评论了Issue/代码等等" + required: false + type: "boolean" + x-exportParamName: "NoteEvents" + x-optionalDataType: "Bool" + - name: "merge_requests_events" + in: "formData" + description: "合并请求和合并后" + required: false + type: "boolean" + x-exportParamName: "MergeRequestsEvents" + x-optionalDataType: "Bool" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/Hook" + /v5/repos/{owner}/{repo}/hooks/{id}: + get: + tags: + - "Webhooks" + summary: "获取仓库单个WebHook" + description: "获取仓库单个WebHook" + operationId: "getV5ReposOwnerRepoHooksId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "id" + in: "path" + description: "Webhook的ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Hook" + delete: + tags: + - "Webhooks" + summary: "删除一个仓库WebHook" + description: "删除一个仓库WebHook" + operationId: "deleteV5ReposOwnerRepoHooksId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "id" + in: "path" + description: "Webhook的ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + responses: + 204: + description: "删除一个仓库WebHook" + patch: + tags: + - "Webhooks" + summary: "更新一个仓库WebHook" + description: "更新一个仓库WebHook" + operationId: "patchV5ReposOwnerRepoHooksId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "id" + in: "path" + description: "Webhook的ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + - name: "url" + in: "formData" + description: "远程HTTP URL" + required: true + type: "string" + x-exportParamName: "Url" + - name: "password" + in: "formData" + description: "请求URL时会带上该密码,防止URL被恶意请求" + required: false + type: "string" + x-exportParamName: "Password" + x-optionalDataType: "String" + - name: "push_events" + in: "formData" + description: "Push代码到仓库" + required: false + type: "boolean" + default: true + x-exportParamName: "PushEvents" + x-optionalDataType: "Bool" + - name: "tag_push_events" + in: "formData" + description: "提交Tag到仓库" + required: false + type: "boolean" + x-exportParamName: "TagPushEvents" + x-optionalDataType: "Bool" + - name: "issues_events" + in: "formData" + description: "创建/关闭Issue" + required: false + type: "boolean" + x-exportParamName: "IssuesEvents" + x-optionalDataType: "Bool" + - name: "note_events" + in: "formData" + description: "评论了Issue/代码等等" + required: false + type: "boolean" + x-exportParamName: "NoteEvents" + x-optionalDataType: "Bool" + - name: "merge_requests_events" + in: "formData" + description: "合并请求和合并后" + required: false + type: "boolean" + x-exportParamName: "MergeRequestsEvents" + x-optionalDataType: "Bool" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Hook" + /v5/repos/{owner}/{repo}/hooks/{id}/tests: + post: + tags: + - "Webhooks" + summary: "测试WebHook是否发送成功" + description: "测试WebHook是否发送成功" + operationId: "postV5ReposOwnerRepoHooksIdTests" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "id" + in: "path" + description: "Webhook的ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + responses: + 204: + description: "测试发送成功" + /v5/repos/{owner}/{repo}/stargazers: + get: + tags: + - "Activity" + summary: "列出 star 了仓库的用户" + description: "列出 star 了仓库的用户" + operationId: "getV5ReposOwnerRepoStargazers" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/UserBasic" + 403: + description: "没有权限" + 404: + description: "没有相关数据" + /v5/repos/{owner}/{repo}/subscribers: + get: + tags: + - "Activity" + summary: "列出 watch 了仓库的用户" + description: "列出 watch 了仓库的用户" + operationId: "getV5ReposOwnerRepoSubscribers" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/UserBasic" + 403: + description: "没有权限" + 404: + description: "没有相关数据" + /v5/repos/{owner}/{repo}/events: + get: + tags: + - "Activity" + summary: "列出仓库的所有动态" + description: "列出仓库的所有动态" + operationId: "getV5ReposOwnerRepoEvents" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Event" + 403: + description: "没有权限" + 404: + description: "没有相关数据" + /v5/repos/{owner}/{repo}/notifications: + get: + tags: + - "Activity" + summary: "列出一个仓库里的通知" + description: "列出一个仓库里的通知" + operationId: "getV5ReposOwnerRepoNotifications" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "unread" + in: "query" + description: "是否只获取未读消息,默认:否" + required: false + type: "boolean" + x-exportParamName: "Unread" + x-optionalDataType: "Bool" + - name: "participating" + in: "query" + description: "是否只获取自己直接参与的消息,默认:否" + required: false + type: "boolean" + x-exportParamName: "Participating" + x-optionalDataType: "Bool" + - name: "type" + in: "query" + description: "筛选指定类型的通知,all:所有,event:事件通知,referer:@ 通知" + required: false + type: "string" + default: "all" + enum: + - "all" + - "event" + - "referer" + x-exportParamName: "Type_" + x-optionalDataType: "String" + - name: "since" + in: "query" + description: "只获取在给定时间后更新的消息,要求时间格式为 ISO 8601" + required: false + type: "string" + x-exportParamName: "Since" + x-optionalDataType: "String" + - name: "before" + in: "query" + description: "只获取在给定时间前更新的消息,要求时间格式为 ISO 8601" + required: false + type: "string" + x-exportParamName: "Before" + x-optionalDataType: "String" + - name: "ids" + in: "query" + description: "指定一组通知 ID,以 , 分隔" + required: false + type: "string" + x-exportParamName: "Ids" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/UserNotificationList" + 403: + description: "没有权限" + 404: + description: "没有相关数据" + put: + tags: + - "Activity" + summary: "标记一个仓库里的通知为已读" + description: "标记一个仓库里的通知为已读" + operationId: "putV5ReposOwnerRepoNotifications" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "ids" + in: "formData" + description: "指定一组通知 ID,以 , 分隔" + required: false + type: "string" + x-exportParamName: "Ids" + x-optionalDataType: "String" + responses: + 205: + description: "执行成功" + 403: + description: "没有权限" + /v5/emails: + get: + tags: + - "Emails" + summary: "获取授权用户的所有邮箱" + description: "获取授权用户的所有邮箱" + operationId: "getV5Emails" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Email" + 404: + description: "没有相关数据" + /v5/user/keys: + get: + tags: + - "Users" + summary: "列出授权用户的所有公钥" + description: "列出授权用户的所有公钥" + operationId: "getV5UserKeys" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/SSHKey" + post: + tags: + - "Users" + summary: "添加一个公钥" + description: "添加一个公钥" + operationId: "postV5UserKeys" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "key" + in: "formData" + description: "公钥内容" + required: true + type: "string" + x-exportParamName: "Key" + - name: "title" + in: "formData" + description: "公钥名称" + required: true + type: "string" + x-exportParamName: "Title" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/SSHKey" + 400: + description: "数据不合法" + /v5/user/keys/{id}: + get: + tags: + - "Users" + summary: "获取一个公钥" + description: "获取一个公钥" + operationId: "getV5UserKeysId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "id" + in: "path" + description: "公钥 ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/SSHKey" + 404: + description: "没有相关数据" + delete: + tags: + - "Users" + summary: "删除一个公钥" + description: "删除一个公钥" + operationId: "deleteV5UserKeysId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "id" + in: "path" + description: "公钥 ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + responses: + 204: + description: "执行成功" + 404: + description: "没有相关数据" + /v5/user/orgs: + get: + tags: + - "Organizations" + summary: "列出授权用户所属的组织" + description: "列出授权用户所属的组织" + operationId: "getV5UserOrgs" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + - name: "admin" + in: "query" + description: "只列出授权用户管理的组织" + required: false + type: "boolean" + x-exportParamName: "Admin" + x-optionalDataType: "Bool" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Group" + /v5/user/issues: + get: + tags: + - "Issues" + summary: "获取授权用户的所有Issues" + description: "获取授权用户的所有Issues" + operationId: "getV5UserIssues" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "filter" + in: "query" + description: "筛选参数: 授权用户负责的(assigned),授权用户创建的(created),包含前两者的(all)。默认: assigned" + required: false + type: "string" + default: "assigned" + enum: + - "assigned" + - "created" + - "all" + x-exportParamName: "Filter" + x-optionalDataType: "String" + - name: "state" + in: "query" + description: "Issue的状态: open(开启的), progressing(进行中), closed(关闭的), rejected(\ + 拒绝的)。 默认: open" + required: false + type: "string" + default: "open" + enum: + - "open" + - "progressing" + - "closed" + - "rejected" + - "all" + x-exportParamName: "State" + x-optionalDataType: "String" + - name: "labels" + in: "query" + description: "用逗号分开的标签。如: bug,performance" + required: false + type: "string" + x-exportParamName: "Labels" + x-optionalDataType: "String" + - name: "sort" + in: "query" + description: "排序依据: 创建时间(created),更新时间(updated_at)。默认: created_at" + required: false + type: "string" + default: "created" + enum: + - "created" + - "updated" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "direction" + in: "query" + description: "排序方式: 升序(asc),降序(desc)。默认: desc" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Direction" + x-optionalDataType: "String" + - name: "since" + in: "query" + description: "起始的更新时间,要求时间格式为 ISO 8601" + required: false + type: "string" + x-exportParamName: "Since" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + - name: "schedule" + in: "query" + description: "计划开始日期,格式:20181006T173008+80-20181007T173008+80(区间),或者 -20181007T173008+80(\ + 小于20181007T173008+80),或者 20181006T173008+80-(大于20181006T173008+80),要求时间格\ + 式为20181006T173008+80" + required: false + type: "string" + x-exportParamName: "Schedule" + x-optionalDataType: "String" + - name: "deadline" + in: "query" + description: "计划截止日期,格式同上" + required: false + type: "string" + x-exportParamName: "Deadline" + x-optionalDataType: "String" + - name: "created_at" + in: "query" + description: "任务创建时间,格式同上" + required: false + type: "string" + x-exportParamName: "CreatedAt" + x-optionalDataType: "String" + - name: "finished_at" + in: "query" + description: "任务完成时间,即任务最后一次转为已完成状态的时间点。格式同上" + required: false + type: "string" + x-exportParamName: "FinishedAt" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Issue" + /v5/user/repos: + get: + tags: + - "Repositories" + summary: "列出授权用户的所有仓库" + description: "列出授权用户的所有仓库" + operationId: "getV5UserRepos" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "visibility" + in: "query" + description: "公开(public)、私有(private)或者所有(all),默认: 所有(all)" + required: false + type: "string" + enum: + - "private" + - "public" + - "all" + x-exportParamName: "Visibility" + x-optionalDataType: "String" + - name: "affiliation" + in: "query" + description: "owner(授权用户拥有的仓库)、collaborator(授权用户为仓库成员)、organization_member(授\ + 权用户为仓库所在组织并有访问仓库权限)、enterprise_member(授权用户所在企业并有访问仓库权限)、admin(所有有权限的,包括所\ + 管理的组织中所有仓库、所管理的企业的所有仓库)。\n 可以用逗号分隔符组合。如: owner, organization_member\ + \ 或 owner, collaborator, organization_member" + required: false + type: "string" + x-exportParamName: "Affiliation" + x-optionalDataType: "String" + - name: "type" + in: "query" + description: "筛选用户仓库: 其创建(owner)、个人(personal)、其为成员(member)、公开(public)、私有(private),\ + 不能与 visibility 或 affiliation 参数一并使用,否则会报 422 错误" + required: false + type: "string" + enum: + - "all" + - "owner" + - "personal" + - "member" + - "public" + - "private" + x-exportParamName: "Type_" + x-optionalDataType: "String" + - name: "sort" + in: "query" + description: "排序方式: 创建时间(created),更新时间(updated),最后推送时间(pushed),仓库所属与名称(full_name)。\ + 默认: full_name" + required: false + type: "string" + default: "full_name" + enum: + - "created" + - "updated" + - "pushed" + - "full_name" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "direction" + in: "query" + description: "如果sort参数为full_name,用升序(asc)。否则降序(desc)" + required: false + type: "string" + enum: + - "asc" + - "desc" + x-exportParamName: "Direction" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Project" + post: + tags: + - "Repositories" + summary: "创建一个仓库" + description: "创建一个仓库" + operationId: "postV5UserRepos" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "name" + in: "formData" + description: "仓库名称" + required: true + type: "string" + x-exportParamName: "Name" + - name: "description" + in: "formData" + description: "仓库描述" + required: false + type: "string" + x-exportParamName: "Description" + x-optionalDataType: "String" + - name: "homepage" + in: "formData" + description: "主页(eg: https://gitee.com)" + required: false + type: "string" + x-exportParamName: "Homepage" + x-optionalDataType: "String" + - name: "has_issues" + in: "formData" + description: "允许提Issue与否。默认: 允许(true)" + required: false + type: "boolean" + default: true + x-exportParamName: "HasIssues" + x-optionalDataType: "Bool" + - name: "has_wiki" + in: "formData" + description: "提供Wiki与否。默认: 提供(true)" + required: false + type: "boolean" + default: true + x-exportParamName: "HasWiki" + x-optionalDataType: "Bool" + - name: "auto_init" + in: "formData" + description: "值为true时则会用README初始化仓库。默认: 不初始化(false)" + required: false + type: "boolean" + x-exportParamName: "AutoInit" + x-optionalDataType: "Bool" + - name: "gitignore_template" + in: "formData" + description: "Git Ingore模版" + required: false + type: "string" + enum: + - "Actionscript" + - "Ada" + - "Agda" + - "Android" + - "AppEngine" + - "AppceleratorTitanium" + - "ArchLinuxPackages" + - "Autotools" + - "C" + - "C++" + - "CFWheels" + - "CMake" + - "CUDA" + - "CakePHP" + - "ChefCookbook" + - "Clojure" + - "CodeIgniter" + - "CommonLisp" + - "Composer" + - "Concrete5" + - "Coq" + - "CraftCMS" + - "D" + - "DM" + - "Dart" + - "Delphi" + - "Drupal" + - "EPiServer" + - "Eagle" + - "Elisp" + - "Elixir" + - "Elm" + - "Erlang" + - "ExpressionEngine" + - "ExtJs" + - "Fancy" + - "Finale" + - "Flutter" + - "ForceDotCom" + - "Fortran" + - "FuelPHP" + - "GWT" + - "Gcov" + - "GitBook" + - "Global/Anjuta" + - "Global/Ansible" + - "Global/Archives" + - "Global/Backup" + - "Global/Bazaar" + - "Global/BricxCC" + - "Global/CVS" + - "Global/Calabash" + - "Global/Cloud9" + - "Global/CodeKit" + - "Global/DartEditor" + - "Global/Diff" + - "Global/Dreamweaver" + - "Global/Dropbox" + - "Global/Eclipse" + - "Global/EiffelStudio" + - "Global/Emacs" + - "Global/Ensime" + - "Global/Espresso" + - "Global/FlexBuilder" + - "Global/GPG" + - "Global/Images" + - "Global/JDeveloper" + - "Global/JEnv" + - "Global/JetBrains" + - "Global/KDevelop4" + - "Global/Kate" + - "Global/Lazarus" + - "Global/LibreOffice" + - "Global/Linux" + - "Global/LyX" + - "Global/MATLAB" + - "Global/Mercurial" + - "Global/MicrosoftOffice" + - "Global/ModelSim" + - "Global/Momentics" + - "Global/MonoDevelop" + - "Global/NetBeans" + - "Global/Ninja" + - "Global/NotepadPP" + - "Global/Octave" + - "Global/Otto" + - "Global/PSoCCreator" + - "Global/Patch" + - "Global/PuTTY" + - "Global/Redcar" + - "Global/Redis" + - "Global/SBT" + - "Global/SVN" + - "Global/SlickEdit" + - "Global/Stata" + - "Global/SublimeText" + - "Global/SynopsysVCS" + - "Global/Tags" + - "Global/TextMate" + - "Global/TortoiseGit" + - "Global/Vagrant" + - "Global/Vim" + - "Global/VirtualEnv" + - "Global/Virtuoso" + - "Global/VisualStudioCode" + - "Global/WebMethods" + - "Global/Windows" + - "Global/Xcode" + - "Global/XilinxISE" + - "Global/macOS" + - "Go" + - "Godot" + - "Gradle" + - "Grails" + - "Haskell" + - "IGORPro" + - "Idris" + - "JBoss" + - "Java" + - "Jekyll" + - "Joomla" + - "Julia" + - "KiCad" + - "Kohana" + - "Kotlin" + - "LabVIEW" + - "Laravel" + - "Leiningen" + - "LemonStand" + - "Lilypond" + - "Lithium" + - "Lua" + - "Magento" + - "Maven" + - "Mercury" + - "MetaProgrammingSystem" + - "MiniProgram" + - "Nanoc" + - "Nim" + - "Node" + - "OCaml" + - "Objective-C" + - "Opa" + - "OpenCart" + - "OracleForms" + - "Packer" + - "Perl" + - "Perl6" + - "Phalcon" + - "PlayFramework" + - "Plone" + - "Prestashop" + - "Processing" + - "PureScript" + - "Python" + - "Qooxdoo" + - "Qt" + - "R" + - "ROS" + - "Rails" + - "RhodesRhomobile" + - "Ruby" + - "Rust" + - "SCons" + - "Sass" + - "Scala" + - "Scheme" + - "Scrivener" + - "Sdcc" + - "SeamGen" + - "SketchUp" + - "Smalltalk" + - "Stella" + - "SugarCRM" + - "Swift" + - "Symfony" + - "SymphonyCMS" + - "TeX" + - "Terraform" + - "Textpattern" + - "TurboGears2" + - "Typo3" + - "Umbraco" + - "Unity" + - "UnrealEngine" + - "VVVV" + - "VisualStudio" + - "Waf" + - "WordPress" + - "Xojo" + - "Yeoman" + - "Yii" + - "ZendFramework" + - "Zephir" + x-exportParamName: "GitignoreTemplate" + x-optionalDataType: "String" + - name: "license_template" + in: "formData" + description: "License模版" + required: false + type: "string" + enum: + - "MulanPSL-1.0" + - "AFL-3.0" + - "AGPL-3.0" + - "Apache-2.0" + - "Artistic-2.0" + - "BSD-2-Clause" + - "BSD-3-Clause" + - "BSD-3-Clause-Clear" + - "BSL-1.0" + - "CC-BY-4.0" + - "CC-BY-SA-4.0" + - "CC0-1.0" + - "ECL-2.0" + - "EPL-1.0" + - "EUPL-1.1" + - "GPL-2.0" + - "GPL-3.0" + - "ISC" + - "LGPL-2.1" + - "LGPL-3.0" + - "LPPL-1.3c" + - "MIT" + - "MPL-2.0" + - "MS-PL" + - "MS-RL" + - "NCSA" + - "OFL-1.1" + - "OSL-3.0" + - "PostgreSQL" + - "Unlicense" + - "WTFPL" + - "Zlib" + x-exportParamName: "LicenseTemplate" + x-optionalDataType: "String" + - name: "private" + in: "formData" + description: "仓库公开或私有。默认: 公开(false)" + required: false + type: "boolean" + x-exportParamName: "Private" + x-optionalDataType: "Bool" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/Project" + /v5/user: + get: + tags: + - "Users" + summary: "获取授权用户的资料" + description: "获取授权用户的资料" + operationId: "getV5User" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/User" + 404: + description: "没有相关数据" + patch: + tags: + - "Users" + summary: "更新授权用户的资料" + description: "更新授权用户的资料" + operationId: "patchV5User" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "name" + in: "formData" + description: "昵称" + required: false + type: "string" + x-exportParamName: "Name" + x-optionalDataType: "String" + - name: "blog" + in: "formData" + description: "微博链接" + required: false + type: "string" + x-exportParamName: "Blog" + x-optionalDataType: "String" + - name: "weibo" + in: "formData" + description: "博客站点" + required: false + type: "string" + x-exportParamName: "Weibo" + x-optionalDataType: "String" + - name: "bio" + in: "formData" + description: "自我介绍" + required: false + type: "string" + x-exportParamName: "Bio" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/User" + /v5/user/followers: + get: + tags: + - "Users" + summary: "列出授权用户的关注者" + description: "列出授权用户的关注者" + operationId: "getV5UserFollowers" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/UserBasic" + /v5/user/following: + get: + tags: + - "Users" + summary: "列出授权用户正关注的用户" + description: "列出授权用户正关注的用户" + operationId: "getV5UserFollowing" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/UserBasic" + /v5/user/namespaces: + get: + tags: + - "Users" + summary: "列出授权用户所有的 Namespace" + description: "列出授权用户所有的 Namespace" + operationId: "getV5UserNamespaces" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "mode" + in: "query" + description: "参与方式: project(所有参与仓库的namepsce)、intrant(所加入的namespace)、all(包含\ + 前两者),默认(intrant)" + required: false + type: "string" + enum: + - "project" + - "intrant" + - "all" + x-exportParamName: "Mode" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Namespace" + /v5/user/namespace: + get: + tags: + - "Users" + summary: "获取授权用户的一个 Namespace" + description: "获取授权用户的一个 Namespace" + operationId: "getV5UserNamespace" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "path" + in: "query" + description: "Namespace path" + required: true + type: "string" + x-exportParamName: "Path" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Namespace" + /v5/user/starred: + get: + tags: + - "Activity" + summary: "列出授权用户 star 了的仓库" + description: "列出授权用户 star 了的仓库" + operationId: "getV5UserStarred" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "sort" + in: "query" + description: "根据仓库创建时间(created)或最后推送时间(updated)进行排序,默认:创建时间" + required: false + type: "string" + default: "created" + enum: + - "created" + - "last_push" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "direction" + in: "query" + description: "按递增(asc)或递减(desc)排序,默认:递减" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Direction" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Project" + 404: + description: "没有相关数据" + /v5/user/subscriptions: + get: + tags: + - "Activity" + summary: "列出授权用户 watch 了的仓库" + description: "列出授权用户 watch 了的仓库" + operationId: "getV5UserSubscriptions" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "sort" + in: "query" + description: "根据仓库创建时间(created)或最后推送时间(updated)进行排序,默认:创建时间" + required: false + type: "string" + default: "created" + enum: + - "created" + - "last_push" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "direction" + in: "query" + description: "按递增(asc)或递减(desc)排序,默认:递减" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Direction" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Project" + /v5/user/enterprises: + get: + tags: + - "Enterprises" + summary: "列出授权用户所属的企业" + description: "列出授权用户所属的企业" + operationId: "getV5UserEnterprises" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + - name: "admin" + in: "query" + description: "只列出授权用户管理的企业" + required: false + type: "boolean" + default: true + x-exportParamName: "Admin" + x-optionalDataType: "Bool" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/EnterpriseBasic" + /v5/user/memberships/orgs: + get: + tags: + - "Organizations" + summary: "列出授权用户在所属组织的成员资料" + description: "列出授权用户在所属组织的成员资料" + operationId: "getV5UserMembershipsOrgs" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "active" + in: "query" + description: "根据成员是否已激活进行筛选资料,缺省返回所有资料" + required: false + type: "boolean" + x-exportParamName: "Active" + x-optionalDataType: "Bool" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/GroupMember" + /v5/user/memberships/orgs/{org}: + get: + tags: + - "Organizations" + summary: "获取授权用户在一个组织的成员资料" + description: "获取授权用户在一个组织的成员资料" + operationId: "getV5UserMembershipsOrgsOrg" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "org" + in: "path" + description: "组织的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Org" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/GroupMember" + 403: + description: "没有权限" + 404: + description: "没有相关数据" + delete: + tags: + - "Organizations" + summary: "退出一个组织" + description: "退出一个组织" + operationId: "deleteV5UserMembershipsOrgsOrg" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "org" + in: "path" + description: "组织的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Org" + responses: + 204: + description: "执行成功" + 404: + description: "没有相关数据" + patch: + tags: + - "Organizations" + summary: "更新授权用户在一个组织的成员资料" + description: "更新授权用户在一个组织的成员资料" + operationId: "patchV5UserMembershipsOrgsOrg" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "org" + in: "path" + description: "组织的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Org" + - name: "remark" + in: "formData" + description: "在组织中的备注信息" + required: false + type: "string" + x-exportParamName: "Remark" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/GroupMember" + 403: + description: "没有权限" + 404: + description: "没有相关数据" + /v5/user/following/{username}: + get: + tags: + - "Users" + summary: "检查授权用户是否关注了一个用户" + description: "检查授权用户是否关注了一个用户" + operationId: "getV5UserFollowingUsername" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + responses: + 204: + description: "已关注" + 404: + description: "没有相关数据" + put: + tags: + - "Users" + summary: "关注一个用户" + description: "关注一个用户" + operationId: "putV5UserFollowingUsername" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + responses: + 204: + description: "执行成功" + delete: + tags: + - "Users" + summary: "取消关注一个用户" + description: "取消关注一个用户" + operationId: "deleteV5UserFollowingUsername" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + responses: + 204: + description: "执行成功" + /v5/user/starred/{owner}/{repo}: + get: + tags: + - "Activity" + summary: "检查授权用户是否 star 了一个仓库" + description: "检查授权用户是否 star 了一个仓库" + operationId: "getV5UserStarredOwnerRepo" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + responses: + 204: + description: "已经 star 了仓库" + 404: + description: "没有相关数据" + put: + tags: + - "Activity" + summary: "star 一个仓库" + description: "star 一个仓库" + operationId: "putV5UserStarredOwnerRepo" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + responses: + 204: + description: "执行成功" + 400: + description: "数据不合法" + delete: + tags: + - "Activity" + summary: "取消 star 一个仓库" + description: "取消 star 一个仓库" + operationId: "deleteV5UserStarredOwnerRepo" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + responses: + 204: + description: "执行成功" + /v5/user/subscriptions/{owner}/{repo}: + get: + tags: + - "Activity" + summary: "检查授权用户是否 watch 了一个仓库" + description: "检查授权用户是否 watch 了一个仓库" + operationId: "getV5UserSubscriptionsOwnerRepo" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + responses: + 204: + description: "已经 watch 了仓库" + 404: + description: "没有相关数据" + put: + tags: + - "Activity" + summary: "watch 一个仓库" + description: "watch 一个仓库" + operationId: "putV5UserSubscriptionsOwnerRepo" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "watch_type" + in: "formData" + description: "watch策略, watching: 关注所有动态, releases_only: 仅关注版本发行动态, ignoring:\ + \ 关注但不提醒动态" + required: true + type: "string" + default: "watching" + enum: + - "watching" + - "releases_only" + - "ignoring" + x-exportParamName: "WatchType" + responses: + 204: + description: "执行成功" + 400: + description: "数据不合法" + delete: + tags: + - "Activity" + summary: "取消 watch 一个仓库" + description: "取消 watch 一个仓库" + operationId: "deleteV5UserSubscriptionsOwnerRepo" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + responses: + 204: + description: "执行成功" + /v5/gists: + get: + tags: + - "Gists" + summary: "获取代码片段" + description: "获取代码片段" + operationId: "getV5Gists" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "since" + in: "query" + description: "起始的更新时间,要求时间格式为 ISO 8601" + required: false + type: "string" + x-exportParamName: "Since" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Code" + post: + tags: + - "Gists" + summary: "创建代码片段" + description: "创建代码片段" + operationId: "postV5Gists" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "files" + in: "formData" + description: "Hash形式的代码片段文件名以及文件内容。如: { \"file1.txt\": { \"content\": \"String\ + \ file contents\" } }" + required: true + type: "file" + x-exportParamName: "Files" + - name: "description" + in: "formData" + description: "代码片段描述,1~30个字符" + required: true + type: "string" + x-exportParamName: "Description" + - name: "public" + in: "formData" + description: "公开/私有,默认: 私有" + required: false + type: "boolean" + x-exportParamName: "Public" + x-optionalDataType: "Bool" + responses: + 201: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/CodeForksHistory" + /v5/gists/public: + get: + tags: + - "Gists" + summary: "获取公开的代码片段" + description: "获取公开的代码片段" + operationId: "getV5GistsPublic" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "since" + in: "query" + description: "起始的更新时间,要求时间格式为 ISO 8601" + required: false + type: "string" + x-exportParamName: "Since" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Code" + /v5/gists/starred: + get: + tags: + - "Gists" + summary: "获取用户Star的代码片段" + description: "获取用户Star的代码片段" + operationId: "getV5GistsStarred" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "since" + in: "query" + description: "起始的更新时间,要求时间格式为 ISO 8601" + required: false + type: "string" + x-exportParamName: "Since" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Code" + /v5/gists/{gist_id}/comments: + get: + tags: + - "Gists" + summary: "获取代码片段的评论" + description: "获取代码片段的评论" + operationId: "getV5GistsGistIdComments" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "gist_id" + in: "path" + description: "代码片段的ID" + required: true + type: "string" + x-exportParamName: "GistId" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/CodeComment" + post: + tags: + - "Gists" + summary: "增加代码片段的评论" + description: "增加代码片段的评论" + operationId: "postV5GistsGistIdComments" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "gist_id" + in: "path" + description: "代码片段的ID" + required: true + type: "string" + x-exportParamName: "GistId" + - name: "body" + in: "formData" + description: "评论内容" + required: true + type: "string" + x-exportParamName: "Body" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/CodeComment" + /v5/gists/{gist_id}/comments/{id}: + get: + tags: + - "Gists" + summary: "获取单条代码片段的评论" + description: "获取单条代码片段的评论" + operationId: "getV5GistsGistIdCommentsId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "gist_id" + in: "path" + description: "代码片段的ID" + required: true + type: "string" + x-exportParamName: "GistId" + - name: "id" + in: "path" + description: "评论的ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/CodeComment" + delete: + tags: + - "Gists" + summary: "删除代码片段的评论" + description: "删除代码片段的评论" + operationId: "deleteV5GistsGistIdCommentsId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "gist_id" + in: "path" + description: "代码片段的ID" + required: true + type: "string" + x-exportParamName: "GistId" + - name: "id" + in: "path" + description: "评论的ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + responses: + 204: + description: "删除代码片段的评论" + patch: + tags: + - "Gists" + summary: "修改代码片段的评论" + description: "修改代码片段的评论" + operationId: "patchV5GistsGistIdCommentsId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "gist_id" + in: "path" + description: "代码片段的ID" + required: true + type: "string" + x-exportParamName: "GistId" + - name: "id" + in: "path" + description: "评论的ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + - name: "body" + in: "formData" + description: "评论内容" + required: true + type: "string" + x-exportParamName: "Body" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/CodeComment" + /v5/gists/{id}: + get: + tags: + - "Gists" + summary: "获取单条代码片段" + description: "获取单条代码片段" + operationId: "getV5GistsId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "id" + in: "path" + description: "代码片段的ID" + required: true + type: "string" + x-exportParamName: "Id" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/CodeForksHistory" + delete: + tags: + - "Gists" + summary: "删除指定代码片段" + description: "删除指定代码片段" + operationId: "deleteV5GistsId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "id" + in: "path" + description: "代码片段的ID" + required: true + type: "string" + x-exportParamName: "Id" + responses: + 204: + description: "删除指定代码片段" + patch: + tags: + - "Gists" + summary: "修改代码片段" + description: "修改代码片段" + operationId: "patchV5GistsId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "id" + in: "path" + description: "代码片段的ID" + required: true + type: "string" + x-exportParamName: "Id" + - name: "files" + in: "formData" + description: "Hash形式的代码片段文件名以及文件内容。如: { \"file1.txt\": { \"content\": \"String\ + \ file contents\" } }" + required: false + type: "file" + x-exportParamName: "Files" + - name: "description" + in: "formData" + description: "代码片段描述,1~30个字符" + required: false + type: "string" + x-exportParamName: "Description" + x-optionalDataType: "String" + - name: "public" + in: "formData" + description: "公开/私有,默认: 私有" + required: false + type: "boolean" + x-exportParamName: "Public" + x-optionalDataType: "Bool" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/CodeForksHistory" + /v5/gists/{id}/commits: + get: + tags: + - "Gists" + summary: "获取代码片段的commit" + description: "获取代码片段的commit" + operationId: "getV5GistsIdCommits" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "id" + in: "path" + description: "代码片段的ID" + required: true + type: "string" + x-exportParamName: "Id" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/CodeForksHistory" + /v5/gists/{id}/star: + get: + tags: + - "Gists" + summary: "判断代码片段是否已Star" + description: "判断代码片段是否已Star" + operationId: "getV5GistsIdStar" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "id" + in: "path" + description: "代码片段的ID" + required: true + type: "string" + x-exportParamName: "Id" + responses: + 204: + description: "判断代码片段是否已Star" + put: + tags: + - "Gists" + summary: "Star代码片段" + description: "Star代码片段" + operationId: "putV5GistsIdStar" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "id" + in: "path" + description: "代码片段的ID" + required: true + type: "string" + x-exportParamName: "Id" + responses: + 204: + description: "Star代码片段" + delete: + tags: + - "Gists" + summary: "取消Star代码片段" + description: "取消Star代码片段" + operationId: "deleteV5GistsIdStar" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "id" + in: "path" + description: "代码片段的ID" + required: true + type: "string" + x-exportParamName: "Id" + responses: + 204: + description: "取消Star代码片段" + /v5/gists/{id}/forks: + get: + tags: + - "Gists" + summary: "获取 Fork 了指定代码片段的列表" + description: "获取 Fork 了指定代码片段的列表" + operationId: "getV5GistsIdForks" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "id" + in: "path" + description: "代码片段的ID" + required: true + type: "string" + x-exportParamName: "Id" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/CodeForks" + post: + tags: + - "Gists" + summary: "Fork代码片段" + description: "Fork代码片段" + operationId: "postV5GistsIdForks" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "id" + in: "path" + description: "代码片段的ID" + required: true + type: "string" + x-exportParamName: "Id" + responses: + 201: + description: "Fork代码片段" + /v5/users/{username}/gists: + get: + tags: + - "Gists" + summary: "获取指定用户的公开代码片段" + description: "获取指定用户的公开代码片段" + operationId: "getV5UsersUsernameGists" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Code" + /v5/users/{username}/orgs: + get: + tags: + - "Organizations" + summary: "列出用户所属的组织" + description: "列出用户所属的组织" + operationId: "getV5UsersUsernameOrgs" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Group" + /v5/users/organization: + post: + tags: + - "Organizations" + summary: "创建组织" + description: "创建组织" + operationId: "postV5UsersOrganization" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "name" + in: "formData" + description: "组织名称" + required: true + type: "string" + x-exportParamName: "Name" + - name: "org" + in: "formData" + description: "组织的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Org" + - name: "description" + in: "formData" + description: "组织描述" + required: false + type: "string" + x-exportParamName: "Description" + x-optionalDataType: "String" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/Group" + 403: + description: "没有权限" + /v5/users/{username}/repos: + get: + tags: + - "Repositories" + summary: "获取某个用户的公开仓库" + description: "获取某个用户的公开仓库" + operationId: "getV5UsersUsernameRepos" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + - name: "type" + in: "query" + description: "用户创建的仓库(owner),用户个人仓库(personal),用户为仓库成员(member),所有(all)。默认:\ + \ 所有(all)" + required: false + type: "string" + default: "all" + enum: + - "all" + - "owner" + - "personal" + - "member" + x-exportParamName: "Type_" + x-optionalDataType: "String" + - name: "sort" + in: "query" + description: "排序方式: 创建时间(created),更新时间(updated),最后推送时间(pushed),仓库所属与名称(full_name)。\ + 默认: full_name" + required: false + type: "string" + default: "full_name" + enum: + - "created" + - "updated" + - "pushed" + - "full_name" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "direction" + in: "query" + description: "如果sort参数为full_name,用升序(asc)。否则降序(desc)" + required: false + type: "string" + enum: + - "asc" + - "desc" + x-exportParamName: "Direction" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Project" + /v5/users/{username}: + get: + tags: + - "Users" + summary: "获取一个用户" + description: "获取一个用户" + operationId: "getV5UsersUsername" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/User" + 404: + description: "没有相关数据" + /v5/users/{username}/followers: + get: + tags: + - "Users" + summary: "列出指定用户的关注者" + description: "列出指定用户的关注者" + operationId: "getV5UsersUsernameFollowers" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/UserBasic" + 404: + description: "没有相关数据" + /v5/users/{username}/following: + get: + tags: + - "Users" + summary: "列出指定用户正在关注的用户" + description: "列出指定用户正在关注的用户" + operationId: "getV5UsersUsernameFollowing" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/UserBasic" + 404: + description: "没有相关数据" + /v5/users/{username}/following/{target_user}: + get: + tags: + - "Users" + summary: "检查指定用户是否关注目标用户" + description: "检查指定用户是否关注目标用户" + operationId: "getV5UsersUsernameFollowingTargetUser" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + - name: "target_user" + in: "path" + description: "目标用户的用户名(username/login)" + required: true + type: "string" + x-exportParamName: "TargetUser" + responses: + 204: + description: "已关注目标用户" + 404: + description: "没有相关数据" + /v5/users/{username}/keys: + get: + tags: + - "Users" + summary: "列出指定用户的所有公钥" + description: "列出指定用户的所有公钥" + operationId: "getV5UsersUsernameKeys" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/SSHKeyBasic" + 404: + description: "没有相关数据" + /v5/users/{username}/starred: + get: + tags: + - "Activity" + summary: "列出用户 star 了的仓库" + description: "列出用户 star 了的仓库" + operationId: "getV5UsersUsernameStarred" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + - name: "sort" + in: "query" + description: "根据仓库创建时间(created)或最后推送时间(updated)进行排序,默认:创建时间" + required: false + type: "string" + default: "created" + enum: + - "created" + - "last_push" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "direction" + in: "query" + description: "按递增(asc)或递减(desc)排序,默认:递减" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Direction" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Project" + 404: + description: "没有相关数据" + /v5/users/{username}/subscriptions: + get: + tags: + - "Activity" + summary: "列出用户 watch 了的仓库" + description: "列出用户 watch 了的仓库" + operationId: "getV5UsersUsernameSubscriptions" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + - name: "sort" + in: "query" + description: "根据仓库创建时间(created)或最后推送时间(updated)进行排序,默认:创建时间" + required: false + type: "string" + default: "created" + enum: + - "created" + - "last_push" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "direction" + in: "query" + description: "按递增(asc)或递减(desc)排序,默认:递减" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Direction" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Project" + 404: + description: "没有相关数据" + /v5/users/{username}/received_events: + get: + tags: + - "Activity" + summary: "列出一个用户收到的动态" + description: "列出一个用户收到的动态" + operationId: "getV5UsersUsernameReceivedEvents" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Event" + 404: + description: "没有相关数据" + /v5/users/{username}/received_events/public: + get: + tags: + - "Activity" + summary: "列出一个用户收到的公开动态" + description: "列出一个用户收到的公开动态" + operationId: "getV5UsersUsernameReceivedEventsPublic" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Event" + 404: + description: "没有相关数据" + /v5/users/{username}/events: + get: + tags: + - "Activity" + summary: "列出用户的动态" + description: "列出用户的动态" + operationId: "getV5UsersUsernameEvents" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Event" + 404: + description: "没有相关数据" + /v5/users/{username}/events/public: + get: + tags: + - "Activity" + summary: "列出用户的公开动态" + description: "列出用户的公开动态" + operationId: "getV5UsersUsernameEventsPublic" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Event" + 404: + description: "没有相关数据" + /v5/users/{username}/events/orgs/{org}: + get: + tags: + - "Activity" + summary: "列出用户所属组织的动态" + description: "列出用户所属组织的动态" + operationId: "getV5UsersUsernameEventsOrgsOrg" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + - name: "org" + in: "path" + description: "组织的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Org" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Event" + 403: + description: "没有权限" + 404: + description: "没有相关数据" + /v5/orgs/{org}: + get: + tags: + - "Organizations" + summary: "获取一个组织" + description: "获取一个组织" + operationId: "getV5OrgsOrg" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "org" + in: "path" + description: "组织的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Org" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Group" + 403: + description: "没有权限" + 404: + description: "没有相关数据" + patch: + tags: + - "Organizations" + summary: "更新授权用户所管理的组织资料" + description: "更新授权用户所管理的组织资料" + operationId: "patchV5OrgsOrg" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "org" + in: "path" + description: "组织的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Org" + - name: "email" + in: "formData" + description: "组织公开的邮箱地址" + required: false + type: "string" + x-exportParamName: "Email" + x-optionalDataType: "String" + - name: "location" + in: "formData" + description: "组织所在地" + required: false + type: "string" + x-exportParamName: "Location" + x-optionalDataType: "String" + - name: "name" + in: "formData" + description: "组织名称" + required: false + type: "string" + x-exportParamName: "Name" + x-optionalDataType: "String" + - name: "description" + in: "formData" + description: "组织简介" + required: false + type: "string" + x-exportParamName: "Description" + x-optionalDataType: "String" + - name: "html_url" + in: "formData" + description: "组织站点" + required: false + type: "string" + x-exportParamName: "HtmlUrl" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/GroupDetail" + 400: + description: "数据不合法" + 403: + description: "没有权限" + 404: + description: "没有相关数据" + /v5/orgs/{org}/members: + get: + tags: + - "Organizations" + summary: "列出一个组织的所有成员" + description: "列出一个组织的所有成员" + operationId: "getV5OrgsOrgMembers" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "org" + in: "path" + description: "组织的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Org" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + - name: "role" + in: "query" + description: "根据角色筛选成员" + required: false + type: "string" + default: "all" + enum: + - "all" + - "admin" + - "member" + x-exportParamName: "Role" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/UserBasic" + 403: + description: "没有权限" + 404: + description: "没有相关数据" + /v5/orgs/{org}/issues: + get: + tags: + - "Issues" + summary: "获取当前用户某个组织的Issues" + description: "获取当前用户某个组织的Issues" + operationId: "getV5OrgsOrgIssues" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "filter" + in: "query" + description: "筛选参数: 授权用户负责的(assigned),授权用户创建的(created),包含前两者的(all)。默认: assigned" + required: false + type: "string" + default: "assigned" + enum: + - "assigned" + - "created" + - "all" + x-exportParamName: "Filter" + x-optionalDataType: "String" + - name: "state" + in: "query" + description: "Issue的状态: open(开启的), progressing(进行中), closed(关闭的), rejected(\ + 拒绝的)。 默认: open" + required: false + type: "string" + default: "open" + enum: + - "open" + - "progressing" + - "closed" + - "rejected" + - "all" + x-exportParamName: "State" + x-optionalDataType: "String" + - name: "labels" + in: "query" + description: "用逗号分开的标签。如: bug,performance" + required: false + type: "string" + x-exportParamName: "Labels" + x-optionalDataType: "String" + - name: "sort" + in: "query" + description: "排序依据: 创建时间(created),更新时间(updated_at)。默认: created_at" + required: false + type: "string" + default: "created" + enum: + - "created" + - "updated" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "direction" + in: "query" + description: "排序方式: 升序(asc),降序(desc)。默认: desc" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Direction" + x-optionalDataType: "String" + - name: "since" + in: "query" + description: "起始的更新时间,要求时间格式为 ISO 8601" + required: false + type: "string" + x-exportParamName: "Since" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + - name: "schedule" + in: "query" + description: "计划开始日期,格式:20181006T173008+80-20181007T173008+80(区间),或者 -20181007T173008+80(\ + 小于20181007T173008+80),或者 20181006T173008+80-(大于20181006T173008+80),要求时间格\ + 式为20181006T173008+80" + required: false + type: "string" + x-exportParamName: "Schedule" + x-optionalDataType: "String" + - name: "deadline" + in: "query" + description: "计划截止日期,格式同上" + required: false + type: "string" + x-exportParamName: "Deadline" + x-optionalDataType: "String" + - name: "created_at" + in: "query" + description: "任务创建时间,格式同上" + required: false + type: "string" + x-exportParamName: "CreatedAt" + x-optionalDataType: "String" + - name: "finished_at" + in: "query" + description: "任务完成时间,即任务最后一次转为已完成状态的时间点。格式同上" + required: false + type: "string" + x-exportParamName: "FinishedAt" + x-optionalDataType: "String" + - name: "org" + in: "path" + description: "组织的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Org" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Issue" + /v5/orgs/{org}/repos: + get: + tags: + - "Repositories" + summary: "获取一个组织的仓库" + description: "获取一个组织的仓库" + operationId: "getV5OrgsOrgRepos" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "org" + in: "path" + description: "组织的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Org" + - name: "type" + in: "query" + description: "筛选仓库的类型,可以是 all, public, private。默认: all" + required: false + type: "string" + default: "all" + enum: + - "all" + - "public" + - "private" + x-exportParamName: "Type_" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Project" + post: + tags: + - "Repositories" + summary: "创建组织仓库" + description: "创建组织仓库" + operationId: "postV5OrgsOrgRepos" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "org" + in: "path" + description: "组织的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Org" + - in: "body" + name: "body" + description: "Repositorie 内容" + required: true + schema: + $ref: "#/definitions/RepositoryPostParam" + x-exportParamName: "Body" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/Project" + /v5/orgs/{org}/memberships/{username}: + get: + tags: + - "Organizations" + summary: "获取授权用户所属组织的一个成员" + description: "获取授权用户所属组织的一个成员" + operationId: "getV5OrgsOrgMembershipsUsername" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "org" + in: "path" + description: "组织的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Org" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/GroupMember" + 404: + description: "没有相关数据" + put: + tags: + - "Organizations" + summary: "增加或更新授权用户所管理组织的成员" + description: "增加或更新授权用户所管理组织的成员" + operationId: "putV5OrgsOrgMembershipsUsername" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "org" + in: "path" + description: "组织的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Org" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + - name: "role" + in: "formData" + description: "设置用户在组织的角色" + required: false + type: "string" + default: "member" + enum: + - "admin" + - "member" + x-exportParamName: "Role" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/GroupMember" + 400: + description: "数据不合法" + 403: + description: "没有权限" + 404: + description: "没有相关数据" + delete: + tags: + - "Organizations" + summary: "移除授权用户所管理组织中的成员" + description: "移除授权用户所管理组织中的成员" + operationId: "deleteV5OrgsOrgMembershipsUsername" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "org" + in: "path" + description: "组织的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Org" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + responses: + 204: + description: "执行成功" + 403: + description: "没有权限" + 404: + description: "没有相关数据" + /v5/orgs/{org}/events: + get: + tags: + - "Activity" + summary: "列出组织的公开动态" + description: "列出组织的公开动态" + operationId: "getV5OrgsOrgEvents" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "org" + in: "path" + description: "组织的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Org" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Event" + 403: + description: "没有权限" + 404: + description: "没有相关数据" + /v5/issues: + get: + tags: + - "Issues" + summary: "获取当前授权用户的所有Issues" + description: "获取当前授权用户的所有Issues" + operationId: "getV5Issues" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "filter" + in: "query" + description: "筛选参数: 授权用户负责的(assigned),授权用户创建的(created),包含前两者的(all)。默认: assigned" + required: false + type: "string" + default: "assigned" + enum: + - "assigned" + - "created" + - "all" + x-exportParamName: "Filter" + x-optionalDataType: "String" + - name: "state" + in: "query" + description: "Issue的状态: open(开启的), progressing(进行中), closed(关闭的), rejected(\ + 拒绝的)。 默认: open" + required: false + type: "string" + default: "open" + enum: + - "open" + - "progressing" + - "closed" + - "rejected" + - "all" + x-exportParamName: "State" + x-optionalDataType: "String" + - name: "labels" + in: "query" + description: "用逗号分开的标签。如: bug,performance" + required: false + type: "string" + x-exportParamName: "Labels" + x-optionalDataType: "String" + - name: "sort" + in: "query" + description: "排序依据: 创建时间(created),更新时间(updated_at)。默认: created_at" + required: false + type: "string" + default: "created" + enum: + - "created" + - "updated" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "direction" + in: "query" + description: "排序方式: 升序(asc),降序(desc)。默认: desc" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Direction" + x-optionalDataType: "String" + - name: "since" + in: "query" + description: "起始的更新时间,要求时间格式为 ISO 8601" + required: false + type: "string" + x-exportParamName: "Since" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + - name: "schedule" + in: "query" + description: "计划开始日期,格式:20181006T173008+80-20181007T173008+80(区间),或者 -20181007T173008+80(\ + 小于20181007T173008+80),或者 20181006T173008+80-(大于20181006T173008+80),要求时间格\ + 式为20181006T173008+80" + required: false + type: "string" + x-exportParamName: "Schedule" + x-optionalDataType: "String" + - name: "deadline" + in: "query" + description: "计划截止日期,格式同上" + required: false + type: "string" + x-exportParamName: "Deadline" + x-optionalDataType: "String" + - name: "created_at" + in: "query" + description: "任务创建时间,格式同上" + required: false + type: "string" + x-exportParamName: "CreatedAt" + x-optionalDataType: "String" + - name: "finished_at" + in: "query" + description: "任务完成时间,即任务最后一次转为已完成状态的时间点。格式同上" + required: false + type: "string" + x-exportParamName: "FinishedAt" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Issue" + /v5/enterprises/{enterprise}/issues: + get: + tags: + - "Issues" + summary: "获取某个企业的所有Issues" + description: "获取某个企业的所有Issues" + operationId: "getV5EnterprisesEnterpriseIssues" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "enterprise" + in: "path" + description: "企业的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Enterprise" + - name: "state" + in: "query" + description: "Issue的状态: open(开启的), progressing(进行中), closed(关闭的), rejected(\ + 拒绝的)。 默认: open" + required: false + type: "string" + default: "open" + enum: + - "open" + - "progressing" + - "closed" + - "rejected" + - "all" + x-exportParamName: "State" + x-optionalDataType: "String" + - name: "labels" + in: "query" + description: "用逗号分开的标签。如: bug,performance" + required: false + type: "string" + x-exportParamName: "Labels" + x-optionalDataType: "String" + - name: "sort" + in: "query" + description: "排序依据: 创建时间(created),更新时间(updated_at)。默认: created_at" + required: false + type: "string" + default: "created" + enum: + - "created" + - "updated" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "direction" + in: "query" + description: "排序方式: 升序(asc),降序(desc)。默认: desc" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Direction" + x-optionalDataType: "String" + - name: "since" + in: "query" + description: "起始的更新时间,要求时间格式为 ISO 8601" + required: false + type: "string" + x-exportParamName: "Since" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + - name: "schedule" + in: "query" + description: "计划开始日期,格式:20181006T173008+80-20181007T173008+80(区间),或者 -20181007T173008+80(\ + 小于20181007T173008+80),或者 20181006T173008+80-(大于20181006T173008+80),要求时间格\ + 式为20181006T173008+80" + required: false + type: "string" + x-exportParamName: "Schedule" + x-optionalDataType: "String" + - name: "deadline" + in: "query" + description: "计划截止日期,格式同上" + required: false + type: "string" + x-exportParamName: "Deadline" + x-optionalDataType: "String" + - name: "created_at" + in: "query" + description: "任务创建时间,格式同上" + required: false + type: "string" + x-exportParamName: "CreatedAt" + x-optionalDataType: "String" + - name: "finished_at" + in: "query" + description: "任务完成时间,即任务最后一次转为已完成状态的时间点。格式同上" + required: false + type: "string" + x-exportParamName: "FinishedAt" + x-optionalDataType: "String" + - name: "milestone" + in: "query" + description: "根据里程碑标题。none为没里程碑的,*为所有带里程碑的" + required: false + type: "string" + x-exportParamName: "Milestone" + x-optionalDataType: "String" + - name: "assignee" + in: "query" + description: "用户的username。 none为没指派者, *为所有带有指派者的" + required: false + type: "string" + x-exportParamName: "Assignee" + x-optionalDataType: "String" + - name: "creator" + in: "query" + description: "创建Issues的用户username" + required: false + type: "string" + x-exportParamName: "Creator" + x-optionalDataType: "String" + - name: "program" + in: "query" + description: "所属项目名称。none为没所属有项目的,*为所有带所属项目的" + required: false + type: "string" + x-exportParamName: "Program" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Issue" + /v5/enterprises/{enterprise}: + get: + tags: + - "Enterprises" + summary: "获取一个企业" + description: "获取一个企业" + operationId: "getV5EnterprisesEnterprise" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "enterprise" + in: "path" + description: "企业的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Enterprise" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/EnterpriseBasic" + 403: + description: "没有权限" + 404: + description: "没有相关数据" + /v5/enterprises/{enterprise}/members: + get: + tags: + - "Enterprises" + summary: "列出企业的所有成员" + description: "列出企业的所有成员" + operationId: "getV5EnterprisesEnterpriseMembers" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "enterprise" + in: "path" + description: "企业的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Enterprise" + - name: "role" + in: "query" + description: "根据角色筛选成员" + required: false + type: "string" + default: "all" + enum: + - "all" + - "admin" + - "member" + x-exportParamName: "Role" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/EnterpriseMember" + 403: + description: "没有权限" + 404: + description: "没有相关数据" + post: + tags: + - "Enterprises" + summary: "添加或邀请企业成员" + description: "添加或邀请企业成员" + operationId: "postV5EnterprisesEnterpriseMembers" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "enterprise" + in: "path" + description: "企业的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Enterprise" + - name: "username" + in: "formData" + description: "需要邀请的码云用户名(username/login),username,email至少填写一个" + required: false + type: "string" + x-exportParamName: "Username" + x-optionalDataType: "String" + - name: "email" + in: "formData" + description: "要添加邮箱地址,若该邮箱未注册则自动创建帐号。username,email至少填写一个" + required: false + type: "string" + x-exportParamName: "Email" + x-optionalDataType: "String" + - name: "outsourced" + in: "formData" + description: "是否企业外包成员,默认:否" + required: false + type: "boolean" + x-exportParamName: "Outsourced" + x-optionalDataType: "Bool" + - name: "role" + in: "formData" + description: "企业角色,默认普通成员" + required: false + type: "string" + default: "member" + enum: + - "admin" + - "member" + x-exportParamName: "Role" + x-optionalDataType: "String" + - name: "name" + in: "formData" + description: "企业成员真实姓名(备注)" + required: false + type: "string" + x-exportParamName: "Name" + x-optionalDataType: "String" + responses: + 204: + description: "执行成功" + 403: + description: "没有权限" + 404: + description: "没有相关数据" + /v5/enterprises/{enterprise}/week_reports/{id}/comments: + get: + tags: + - "Enterprises" + summary: "某个周报评论列表" + description: "某个周报评论列表" + operationId: "getV5EnterprisesEnterpriseWeekReportsIdComments" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "enterprise" + in: "path" + description: "企业的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Enterprise" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + - name: "id" + in: "path" + description: "周报ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Note" + /v5/enterprises/{enterprise}/week_reports/{id}/comment: + post: + tags: + - "Enterprises" + summary: "评论周报" + description: "评论周报" + operationId: "postV5EnterprisesEnterpriseWeekReportsIdComment" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "enterprise" + in: "path" + description: "企业的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Enterprise" + - name: "id" + in: "path" + description: "周报ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + - name: "body" + in: "formData" + description: "评论的内容" + required: true + type: "string" + x-exportParamName: "Body" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/Note" + /v5/enterprises/{enterprise}/week_reports/{report_id}/comments/{id}: + delete: + tags: + - "Enterprises" + summary: "删除周报某个评论" + description: "删除周报某个评论" + operationId: "deleteV5EnterprisesEnterpriseWeekReportsReportIdCommentsId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "enterprise" + in: "path" + description: "企业的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Enterprise" + - name: "report_id" + in: "path" + description: "周报ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "ReportId" + - name: "id" + in: "path" + description: "评论ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + responses: + 204: + description: "删除周报某个评论" + /v5/enterprises/{enterprise}/users/{username}/week_reports: + get: + tags: + - "Enterprises" + summary: "个人周报列表" + description: "个人周报列表" + operationId: "getV5EnterprisesEnterpriseUsersUsernameWeekReports" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "enterprise" + in: "path" + description: "企业的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Enterprise" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/WeekReport" + /v5/enterprises/{enterprise}/week_reports: + get: + tags: + - "Enterprises" + summary: "企业成员周报列表" + description: "企业成员周报列表" + operationId: "getV5EnterprisesEnterpriseWeekReports" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "enterprise" + in: "path" + description: "企业的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Enterprise" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + - name: "username" + in: "query" + description: "用户名(username/login)" + required: false + type: "string" + x-exportParamName: "Username" + x-optionalDataType: "String" + - name: "year" + in: "query" + description: "周报所属年" + required: false + type: "integer" + format: "int32" + x-exportParamName: "Year" + x-optionalDataType: "Int32" + - name: "week_index" + in: "query" + description: "周报所属周" + required: false + type: "integer" + format: "int32" + x-exportParamName: "WeekIndex" + x-optionalDataType: "Int32" + - name: "date" + in: "query" + description: "周报日期(格式:2019-03-25)" + required: false + type: "string" + x-exportParamName: "Date" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/WeekReport" + /v5/enterprises/{enterprise}/week_reports/{id}: + get: + tags: + - "Enterprises" + summary: "周报详情" + description: "周报详情" + operationId: "getV5EnterprisesEnterpriseWeekReportsId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "enterprise" + in: "path" + description: "企业的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Enterprise" + - name: "id" + in: "path" + description: "周报ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/WeekReport" + /v5/enterprises/{enterprise}/week_report/{id}: + patch: + tags: + - "Enterprises" + summary: "编辑周报" + description: "编辑周报" + operationId: "patchV5EnterprisesEnterpriseWeekReportId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "enterprise" + in: "path" + description: "企业的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Enterprise" + - name: "id" + in: "path" + description: "周报ID" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Id" + - name: "content" + in: "formData" + description: "周报内容" + required: true + type: "string" + x-exportParamName: "Content" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/WeekReport" + /v5/enterprises/{enterprise}/week_report: + post: + tags: + - "Enterprises" + summary: "新建周报" + description: "新建周报" + operationId: "postV5EnterprisesEnterpriseWeekReport" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "enterprise" + in: "path" + description: "企业的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Enterprise" + - name: "year" + in: "formData" + description: "周报所属年" + required: true + type: "integer" + format: "int32" + x-exportParamName: "Year" + - name: "content" + in: "formData" + description: "周报内容" + required: true + type: "string" + x-exportParamName: "Content" + - name: "week_index" + in: "formData" + description: "周报所属周" + required: true + type: "integer" + format: "int32" + x-exportParamName: "WeekIndex" + - name: "username" + in: "formData" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + - name: "date" + in: "formData" + description: "周报日期(格式:2019-03-25)" + required: false + type: "string" + x-exportParamName: "Date" + x-optionalDataType: "String" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/WeekReport" + /v5/enterprises/{enterprise}/issues/{number}: + get: + tags: + - "Issues" + summary: "获取企业的某个Issue" + description: "获取企业的某个Issue" + operationId: "getV5EnterprisesEnterpriseIssuesNumber" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "enterprise" + in: "path" + description: "企业的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Enterprise" + - name: "number" + in: "path" + description: "Issue 编号(区分大小写,无需添加 # 号)" + required: true + type: "string" + x-exportParamName: "Number" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Issue" + /v5/enterprises/{enterprise}/issues/{number}/comments: + get: + tags: + - "Issues" + summary: "获取企业某个Issue所有评论" + description: "获取企业某个Issue所有评论" + operationId: "getV5EnterprisesEnterpriseIssuesNumberComments" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "enterprise" + in: "path" + description: "企业的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Enterprise" + - name: "number" + in: "path" + description: "Issue 编号(区分大小写,无需添加 # 号)" + required: true + type: "string" + x-exportParamName: "Number" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Note" + /v5/enterprises/{enterprise}/issues/{number}/labels: + get: + tags: + - "Issues" + summary: "获取企业某个Issue所有标签" + description: "获取企业某个Issue所有标签" + operationId: "getV5EnterprisesEnterpriseIssuesNumberLabels" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "enterprise" + in: "path" + description: "企业的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Enterprise" + - name: "number" + in: "path" + description: "Issue 编号(区分大小写,无需添加 # 号)" + required: true + type: "string" + x-exportParamName: "Number" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Label" + /v5/enterprises/{enterprise}/labels: + get: + tags: + - "Labels" + summary: "获取企业所有标签" + description: "获取企业所有标签" + operationId: "getV5EnterprisesEnterpriseLabels" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "enterprise" + in: "path" + description: "企业的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Enterprise" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Label" + /v5/enterprises/{enterprise}/labels/{name}: + get: + tags: + - "Labels" + summary: "获取企业某个标签" + description: "获取企业某个标签" + operationId: "getV5EnterprisesEnterpriseLabelsName" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "enterprise" + in: "path" + description: "企业的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Enterprise" + - name: "name" + in: "path" + description: "标签名称" + required: true + type: "string" + x-exportParamName: "Name" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Label" + /v5/enterprises/{enterprise}/repos: + get: + tags: + - "Repositories" + summary: "获取企业的所有仓库" + description: "获取企业的所有仓库" + operationId: "getV5EnterprisesEnterpriseRepos" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "enterprise" + in: "path" + description: "企业的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Enterprise" + - name: "type" + in: "query" + description: "筛选仓库的类型,可以是 all, public, internal, private。默认: all" + required: false + type: "string" + default: "all" + enum: + - "all" + - "public" + - "internal" + - "private" + x-exportParamName: "Type_" + x-optionalDataType: "String" + - name: "direct" + in: "query" + description: "只获取直属仓库,默认: false" + required: false + type: "boolean" + x-exportParamName: "Direct" + x-optionalDataType: "Bool" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/Project" + post: + tags: + - "Repositories" + summary: "创建企业仓库" + description: "创建企业仓库" + operationId: "postV5EnterprisesEnterpriseRepos" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "name" + in: "formData" + description: "仓库名称" + required: true + type: "string" + x-exportParamName: "Name" + - name: "description" + in: "formData" + description: "仓库描述" + required: false + type: "string" + x-exportParamName: "Description" + x-optionalDataType: "String" + - name: "homepage" + in: "formData" + description: "主页(eg: https://gitee.com)" + required: false + type: "string" + x-exportParamName: "Homepage" + x-optionalDataType: "String" + - name: "has_issues" + in: "formData" + description: "允许提Issue与否。默认: 允许(true)" + required: false + type: "boolean" + default: true + x-exportParamName: "HasIssues" + x-optionalDataType: "Bool" + - name: "has_wiki" + in: "formData" + description: "提供Wiki与否。默认: 提供(true)" + required: false + type: "boolean" + default: true + x-exportParamName: "HasWiki" + x-optionalDataType: "Bool" + - name: "enterprise" + in: "path" + description: "企业的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Enterprise" + - name: "auto_init" + in: "formData" + description: "值为true时则会用README初始化仓库。默认: 不初始化(false)" + required: false + type: "boolean" + x-exportParamName: "AutoInit" + x-optionalDataType: "Bool" + - name: "gitignore_template" + in: "formData" + description: "Git Ingore模版" + required: false + type: "string" + enum: + - "Actionscript" + - "Ada" + - "Agda" + - "Android" + - "AppEngine" + - "AppceleratorTitanium" + - "ArchLinuxPackages" + - "Autotools" + - "C" + - "C++" + - "CFWheels" + - "CMake" + - "CUDA" + - "CakePHP" + - "ChefCookbook" + - "Clojure" + - "CodeIgniter" + - "CommonLisp" + - "Composer" + - "Concrete5" + - "Coq" + - "CraftCMS" + - "D" + - "DM" + - "Dart" + - "Delphi" + - "Drupal" + - "EPiServer" + - "Eagle" + - "Elisp" + - "Elixir" + - "Elm" + - "Erlang" + - "ExpressionEngine" + - "ExtJs" + - "Fancy" + - "Finale" + - "Flutter" + - "ForceDotCom" + - "Fortran" + - "FuelPHP" + - "GWT" + - "Gcov" + - "GitBook" + - "Global/Anjuta" + - "Global/Ansible" + - "Global/Archives" + - "Global/Backup" + - "Global/Bazaar" + - "Global/BricxCC" + - "Global/CVS" + - "Global/Calabash" + - "Global/Cloud9" + - "Global/CodeKit" + - "Global/DartEditor" + - "Global/Diff" + - "Global/Dreamweaver" + - "Global/Dropbox" + - "Global/Eclipse" + - "Global/EiffelStudio" + - "Global/Emacs" + - "Global/Ensime" + - "Global/Espresso" + - "Global/FlexBuilder" + - "Global/GPG" + - "Global/Images" + - "Global/JDeveloper" + - "Global/JEnv" + - "Global/JetBrains" + - "Global/KDevelop4" + - "Global/Kate" + - "Global/Lazarus" + - "Global/LibreOffice" + - "Global/Linux" + - "Global/LyX" + - "Global/MATLAB" + - "Global/Mercurial" + - "Global/MicrosoftOffice" + - "Global/ModelSim" + - "Global/Momentics" + - "Global/MonoDevelop" + - "Global/NetBeans" + - "Global/Ninja" + - "Global/NotepadPP" + - "Global/Octave" + - "Global/Otto" + - "Global/PSoCCreator" + - "Global/Patch" + - "Global/PuTTY" + - "Global/Redcar" + - "Global/Redis" + - "Global/SBT" + - "Global/SVN" + - "Global/SlickEdit" + - "Global/Stata" + - "Global/SublimeText" + - "Global/SynopsysVCS" + - "Global/Tags" + - "Global/TextMate" + - "Global/TortoiseGit" + - "Global/Vagrant" + - "Global/Vim" + - "Global/VirtualEnv" + - "Global/Virtuoso" + - "Global/VisualStudioCode" + - "Global/WebMethods" + - "Global/Windows" + - "Global/Xcode" + - "Global/XilinxISE" + - "Global/macOS" + - "Go" + - "Godot" + - "Gradle" + - "Grails" + - "Haskell" + - "IGORPro" + - "Idris" + - "JBoss" + - "Java" + - "Jekyll" + - "Joomla" + - "Julia" + - "KiCad" + - "Kohana" + - "Kotlin" + - "LabVIEW" + - "Laravel" + - "Leiningen" + - "LemonStand" + - "Lilypond" + - "Lithium" + - "Lua" + - "Magento" + - "Maven" + - "Mercury" + - "MetaProgrammingSystem" + - "MiniProgram" + - "Nanoc" + - "Nim" + - "Node" + - "OCaml" + - "Objective-C" + - "Opa" + - "OpenCart" + - "OracleForms" + - "Packer" + - "Perl" + - "Perl6" + - "Phalcon" + - "PlayFramework" + - "Plone" + - "Prestashop" + - "Processing" + - "PureScript" + - "Python" + - "Qooxdoo" + - "Qt" + - "R" + - "ROS" + - "Rails" + - "RhodesRhomobile" + - "Ruby" + - "Rust" + - "SCons" + - "Sass" + - "Scala" + - "Scheme" + - "Scrivener" + - "Sdcc" + - "SeamGen" + - "SketchUp" + - "Smalltalk" + - "Stella" + - "SugarCRM" + - "Swift" + - "Symfony" + - "SymphonyCMS" + - "TeX" + - "Terraform" + - "Textpattern" + - "TurboGears2" + - "Typo3" + - "Umbraco" + - "Unity" + - "UnrealEngine" + - "VVVV" + - "VisualStudio" + - "Waf" + - "WordPress" + - "Xojo" + - "Yeoman" + - "Yii" + - "ZendFramework" + - "Zephir" + x-exportParamName: "GitignoreTemplate" + x-optionalDataType: "String" + - name: "license_template" + in: "formData" + description: "License模版" + required: false + type: "string" + enum: + - "MulanPSL-1.0" + - "AFL-3.0" + - "AGPL-3.0" + - "Apache-2.0" + - "Artistic-2.0" + - "BSD-2-Clause" + - "BSD-3-Clause" + - "BSD-3-Clause-Clear" + - "BSL-1.0" + - "CC-BY-4.0" + - "CC-BY-SA-4.0" + - "CC0-1.0" + - "ECL-2.0" + - "EPL-1.0" + - "EUPL-1.1" + - "GPL-2.0" + - "GPL-3.0" + - "ISC" + - "LGPL-2.1" + - "LGPL-3.0" + - "LPPL-1.3c" + - "MIT" + - "MPL-2.0" + - "MS-PL" + - "MS-RL" + - "NCSA" + - "OFL-1.1" + - "OSL-3.0" + - "PostgreSQL" + - "Unlicense" + - "WTFPL" + - "Zlib" + x-exportParamName: "LicenseTemplate" + x-optionalDataType: "String" + - name: "private" + in: "formData" + description: "仓库开源类型。0(私有), 1(外部开源), 2(内部开源)。默认: 0" + required: false + type: "integer" + default: 0 + format: "int32" + enum: + - 0 + - 1 + - 2 + x-exportParamName: "Private" + x-optionalDataType: "Int32" + - name: "outsourced" + in: "formData" + description: "值为true值为外包仓库, false值为内部仓库。默认: 内部仓库(false)" + required: false + type: "boolean" + x-exportParamName: "Outsourced" + x-optionalDataType: "Bool" + - name: "project_creator" + in: "formData" + description: "负责人的username" + required: false + type: "string" + x-exportParamName: "ProjectCreator" + x-optionalDataType: "String" + - name: "members" + in: "formData" + description: "用逗号分开的仓库成员。如: member1,member2" + required: false + type: "string" + x-exportParamName: "Members" + x-optionalDataType: "String" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/Project" + /v5/enterprises/{enterprise}/members/{username}: + get: + tags: + - "Enterprises" + summary: "获取企业的一个成员" + description: "获取企业的一个成员" + operationId: "getV5EnterprisesEnterpriseMembersUsername" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "enterprise" + in: "path" + description: "企业的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Enterprise" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/EnterpriseMember" + 404: + description: "没有相关数据" + put: + tags: + - "Enterprises" + summary: "修改企业成员权限或备注" + description: "修改企业成员权限或备注" + operationId: "putV5EnterprisesEnterpriseMembersUsername" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "enterprise" + in: "path" + description: "企业的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Enterprise" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + - name: "outsourced" + in: "formData" + description: "是否企业外包成员,默认:否" + required: false + type: "boolean" + x-exportParamName: "Outsourced" + x-optionalDataType: "Bool" + - name: "role" + in: "formData" + description: "企业角色,默认普通成员" + required: false + type: "string" + default: "member" + enum: + - "admin" + - "member" + x-exportParamName: "Role" + x-optionalDataType: "String" + - name: "active" + in: "formData" + description: "是否可访问企业资源,默认:是。(若选否则禁止该用户访问企业资源)" + required: false + type: "boolean" + default: true + x-exportParamName: "Active" + x-optionalDataType: "Bool" + - name: "name" + in: "formData" + description: "企业成员真实姓名(备注)" + required: false + type: "string" + x-exportParamName: "Name" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/EnterpriseMember" + 400: + description: "数据不合法" + 403: + description: "没有权限" + 404: + description: "没有相关数据" + delete: + tags: + - "Enterprises" + summary: "移除企业成员" + description: "移除企业成员" + operationId: "deleteV5EnterprisesEnterpriseMembersUsername" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "enterprise" + in: "path" + description: "企业的路径(path/login)" + required: true + type: "string" + x-exportParamName: "Enterprise" + - name: "username" + in: "path" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + responses: + 204: + description: "执行成功" + 403: + description: "没有权限" + 404: + description: "没有相关数据" + /v5/gitignore/templates: + get: + tags: + - "Miscellaneous" + summary: "列出可使用的 .gitignore 模板" + description: "列出可使用的 .gitignore 模板" + operationId: "getV5GitignoreTemplates" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + responses: + 200: + description: "列出可使用的 .gitignore 模板" + /v5/gitignore/templates/{name}: + get: + tags: + - "Miscellaneous" + summary: "获取一个 .gitignore 模板" + description: "获取一个 .gitignore 模板" + operationId: "getV5GitignoreTemplatesName" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "name" + in: "path" + description: ".gitignore 模板名" + required: true + type: "string" + enum: + - "Actionscript" + - "Ada" + - "Agda" + - "Android" + - "AppEngine" + - "AppceleratorTitanium" + - "ArchLinuxPackages" + - "Autotools" + - "C" + - "C++" + - "CFWheels" + - "CMake" + - "CUDA" + - "CakePHP" + - "ChefCookbook" + - "Clojure" + - "CodeIgniter" + - "CommonLisp" + - "Composer" + - "Concrete5" + - "Coq" + - "CraftCMS" + - "D" + - "DM" + - "Dart" + - "Delphi" + - "Drupal" + - "EPiServer" + - "Eagle" + - "Elisp" + - "Elixir" + - "Elm" + - "Erlang" + - "ExpressionEngine" + - "ExtJs" + - "Fancy" + - "Finale" + - "Flutter" + - "ForceDotCom" + - "Fortran" + - "FuelPHP" + - "GWT" + - "Gcov" + - "GitBook" + - "Anjuta" + - "Ansible" + - "Archives" + - "Backup" + - "Bazaar" + - "BricxCC" + - "CVS" + - "Calabash" + - "Cloud9" + - "CodeKit" + - "DartEditor" + - "Diff" + - "Dreamweaver" + - "Dropbox" + - "Eclipse" + - "EiffelStudio" + - "Emacs" + - "Ensime" + - "Espresso" + - "FlexBuilder" + - "GPG" + - "Images" + - "JDeveloper" + - "JEnv" + - "JetBrains" + - "KDevelop4" + - "Kate" + - "Lazarus" + - "LibreOffice" + - "Linux" + - "LyX" + - "MATLAB" + - "Mercurial" + - "MicrosoftOffice" + - "ModelSim" + - "Momentics" + - "MonoDevelop" + - "NetBeans" + - "Ninja" + - "NotepadPP" + - "Octave" + - "Otto" + - "PSoCCreator" + - "Patch" + - "PuTTY" + - "Redcar" + - "Redis" + - "SBT" + - "SVN" + - "SlickEdit" + - "Stata" + - "SublimeText" + - "SynopsysVCS" + - "Tags" + - "TextMate" + - "TortoiseGit" + - "Vagrant" + - "Vim" + - "VirtualEnv" + - "Virtuoso" + - "VisualStudioCode" + - "WebMethods" + - "Windows" + - "Xcode" + - "XilinxISE" + - "macOS" + - "Go" + - "Godot" + - "Gradle" + - "Grails" + - "Haskell" + - "IGORPro" + - "Idris" + - "JBoss" + - "Java" + - "Jekyll" + - "Joomla" + - "Julia" + - "KiCad" + - "Kohana" + - "Kotlin" + - "LabVIEW" + - "Laravel" + - "Leiningen" + - "LemonStand" + - "Lilypond" + - "Lithium" + - "Lua" + - "Magento" + - "Maven" + - "Mercury" + - "MetaProgrammingSystem" + - "MiniProgram" + - "Nanoc" + - "Nim" + - "Node" + - "OCaml" + - "Objective-C" + - "Opa" + - "OpenCart" + - "OracleForms" + - "Packer" + - "Perl" + - "Perl6" + - "Phalcon" + - "PlayFramework" + - "Plone" + - "Prestashop" + - "Processing" + - "PureScript" + - "Python" + - "Qooxdoo" + - "Qt" + - "R" + - "ROS" + - "Rails" + - "RhodesRhomobile" + - "Ruby" + - "Rust" + - "SCons" + - "Sass" + - "Scala" + - "Scheme" + - "Scrivener" + - "Sdcc" + - "SeamGen" + - "SketchUp" + - "Smalltalk" + - "Stella" + - "SugarCRM" + - "Swift" + - "Symfony" + - "SymphonyCMS" + - "TeX" + - "Terraform" + - "Textpattern" + - "TurboGears2" + - "Typo3" + - "Umbraco" + - "Unity" + - "UnrealEngine" + - "VVVV" + - "VisualStudio" + - "Waf" + - "WordPress" + - "Xojo" + - "Yeoman" + - "Yii" + - "ZendFramework" + - "Zephir" + x-exportParamName: "Name" + responses: + 200: + description: "获取一个 .gitignore 模板" + /v5/gitignore/templates/{name}/raw: + get: + tags: + - "Miscellaneous" + summary: "获取一个 .gitignore 模板原始文件" + description: "获取一个 .gitignore 模板原始文件" + operationId: "getV5GitignoreTemplatesNameRaw" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "name" + in: "path" + description: ".gitignore 模板名" + required: true + type: "string" + enum: + - "Actionscript" + - "Ada" + - "Agda" + - "Android" + - "AppEngine" + - "AppceleratorTitanium" + - "ArchLinuxPackages" + - "Autotools" + - "C" + - "C++" + - "CFWheels" + - "CMake" + - "CUDA" + - "CakePHP" + - "ChefCookbook" + - "Clojure" + - "CodeIgniter" + - "CommonLisp" + - "Composer" + - "Concrete5" + - "Coq" + - "CraftCMS" + - "D" + - "DM" + - "Dart" + - "Delphi" + - "Drupal" + - "EPiServer" + - "Eagle" + - "Elisp" + - "Elixir" + - "Elm" + - "Erlang" + - "ExpressionEngine" + - "ExtJs" + - "Fancy" + - "Finale" + - "Flutter" + - "ForceDotCom" + - "Fortran" + - "FuelPHP" + - "GWT" + - "Gcov" + - "GitBook" + - "Anjuta" + - "Ansible" + - "Archives" + - "Backup" + - "Bazaar" + - "BricxCC" + - "CVS" + - "Calabash" + - "Cloud9" + - "CodeKit" + - "DartEditor" + - "Diff" + - "Dreamweaver" + - "Dropbox" + - "Eclipse" + - "EiffelStudio" + - "Emacs" + - "Ensime" + - "Espresso" + - "FlexBuilder" + - "GPG" + - "Images" + - "JDeveloper" + - "JEnv" + - "JetBrains" + - "KDevelop4" + - "Kate" + - "Lazarus" + - "LibreOffice" + - "Linux" + - "LyX" + - "MATLAB" + - "Mercurial" + - "MicrosoftOffice" + - "ModelSim" + - "Momentics" + - "MonoDevelop" + - "NetBeans" + - "Ninja" + - "NotepadPP" + - "Octave" + - "Otto" + - "PSoCCreator" + - "Patch" + - "PuTTY" + - "Redcar" + - "Redis" + - "SBT" + - "SVN" + - "SlickEdit" + - "Stata" + - "SublimeText" + - "SynopsysVCS" + - "Tags" + - "TextMate" + - "TortoiseGit" + - "Vagrant" + - "Vim" + - "VirtualEnv" + - "Virtuoso" + - "VisualStudioCode" + - "WebMethods" + - "Windows" + - "Xcode" + - "XilinxISE" + - "macOS" + - "Go" + - "Godot" + - "Gradle" + - "Grails" + - "Haskell" + - "IGORPro" + - "Idris" + - "JBoss" + - "Java" + - "Jekyll" + - "Joomla" + - "Julia" + - "KiCad" + - "Kohana" + - "Kotlin" + - "LabVIEW" + - "Laravel" + - "Leiningen" + - "LemonStand" + - "Lilypond" + - "Lithium" + - "Lua" + - "Magento" + - "Maven" + - "Mercury" + - "MetaProgrammingSystem" + - "MiniProgram" + - "Nanoc" + - "Nim" + - "Node" + - "OCaml" + - "Objective-C" + - "Opa" + - "OpenCart" + - "OracleForms" + - "Packer" + - "Perl" + - "Perl6" + - "Phalcon" + - "PlayFramework" + - "Plone" + - "Prestashop" + - "Processing" + - "PureScript" + - "Python" + - "Qooxdoo" + - "Qt" + - "R" + - "ROS" + - "Rails" + - "RhodesRhomobile" + - "Ruby" + - "Rust" + - "SCons" + - "Sass" + - "Scala" + - "Scheme" + - "Scrivener" + - "Sdcc" + - "SeamGen" + - "SketchUp" + - "Smalltalk" + - "Stella" + - "SugarCRM" + - "Swift" + - "Symfony" + - "SymphonyCMS" + - "TeX" + - "Terraform" + - "Textpattern" + - "TurboGears2" + - "Typo3" + - "Umbraco" + - "Unity" + - "UnrealEngine" + - "VVVV" + - "VisualStudio" + - "Waf" + - "WordPress" + - "Xojo" + - "Yeoman" + - "Yii" + - "ZendFramework" + - "Zephir" + x-exportParamName: "Name" + responses: + 200: + description: "获取一个 .gitignore 模板原始文件" + /v5/licenses: + get: + tags: + - "Miscellaneous" + summary: "列出可使用的开源许可协议" + description: "列出可使用的开源许可协议" + operationId: "getV5Licenses" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + responses: + 200: + description: "列出可使用的开源许可协议" + /v5/licenses/{license}: + get: + tags: + - "Miscellaneous" + summary: "获取一个开源许可协议" + description: "获取一个开源许可协议" + operationId: "getV5LicensesLicense" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "license" + in: "path" + description: "协议名称" + required: true + type: "string" + enum: + - "MulanPSL-1.0" + - "AFL-3.0" + - "AGPL-3.0" + - "Apache-2.0" + - "Artistic-2.0" + - "BSD-2-Clause" + - "BSD-3-Clause" + - "BSD-3-Clause-Clear" + - "BSL-1.0" + - "CC-BY-4.0" + - "CC-BY-SA-4.0" + - "CC0-1.0" + - "ECL-2.0" + - "EPL-1.0" + - "EUPL-1.1" + - "GPL-2.0" + - "GPL-3.0" + - "ISC" + - "LGPL-2.1" + - "LGPL-3.0" + - "LPPL-1.3c" + - "MIT" + - "MPL-2.0" + - "MS-PL" + - "MS-RL" + - "NCSA" + - "OFL-1.1" + - "OSL-3.0" + - "PostgreSQL" + - "Unlicense" + - "WTFPL" + - "Zlib" + x-exportParamName: "License" + responses: + 200: + description: "获取一个开源许可协议" + /v5/licenses/{license}/raw: + get: + tags: + - "Miscellaneous" + summary: "获取一个开源许可协议原始文件" + description: "获取一个开源许可协议原始文件" + operationId: "getV5LicensesLicenseRaw" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "license" + in: "path" + description: "协议名称" + required: true + type: "string" + enum: + - "MulanPSL-1.0" + - "AFL-3.0" + - "AGPL-3.0" + - "Apache-2.0" + - "Artistic-2.0" + - "BSD-2-Clause" + - "BSD-3-Clause" + - "BSD-3-Clause-Clear" + - "BSL-1.0" + - "CC-BY-4.0" + - "CC-BY-SA-4.0" + - "CC0-1.0" + - "ECL-2.0" + - "EPL-1.0" + - "EUPL-1.1" + - "GPL-2.0" + - "GPL-3.0" + - "ISC" + - "LGPL-2.1" + - "LGPL-3.0" + - "LPPL-1.3c" + - "MIT" + - "MPL-2.0" + - "MS-PL" + - "MS-RL" + - "NCSA" + - "OFL-1.1" + - "OSL-3.0" + - "PostgreSQL" + - "Unlicense" + - "WTFPL" + - "Zlib" + x-exportParamName: "License" + responses: + 200: + description: "获取一个开源许可协议原始文件" + /v5/markdown: + post: + tags: + - "Miscellaneous" + summary: "渲染 Markdown 文本" + description: "渲染 Markdown 文本" + operationId: "postV5Markdown" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "text" + in: "formData" + description: "Markdown 文本" + required: true + type: "string" + x-exportParamName: "Text" + responses: + 201: + description: "渲染 Markdown 文本" + /v5/events: + get: + tags: + - "Activity" + summary: "获取站内所有公开动态" + description: "获取站内所有公开动态" + operationId: "getV5Events" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回数据" + schema: + type: "array" + items: + $ref: "#/definitions/Event" + /v5/networks/{owner}/{repo}/events: + get: + tags: + - "Activity" + summary: "列出仓库的所有公开动态" + description: "列出仓库的所有公开动态" + operationId: "getV5NetworksOwnerRepoEvents" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "owner" + in: "path" + description: "仓库所属空间地址(企业、组织或个人的地址path)" + required: true + type: "string" + x-exportParamName: "Owner" + - name: "repo" + in: "path" + description: "仓库路径(path)" + required: true + type: "string" + x-exportParamName: "Repo" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Event" + 403: + description: "没有权限" + 404: + description: "没有相关数据" + /v5/search/repositories: + get: + tags: + - "Search" + summary: "搜索仓库" + description: "搜索仓库" + operationId: "getV5SearchRepositories" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "q" + in: "query" + description: "搜索关键字" + required: true + type: "string" + x-exportParamName: "Q" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + - name: "owner" + in: "query" + description: "筛选指定空间地址(企业、组织或个人的地址 path) 的仓库" + required: false + type: "string" + x-exportParamName: "Owner" + x-optionalDataType: "String" + - name: "fork" + in: "query" + description: "是否搜索含 fork 的仓库,默认:否" + required: false + type: "boolean" + x-exportParamName: "Fork" + x-optionalDataType: "Bool" + - name: "language" + in: "query" + description: "筛选指定语言的仓库" + required: false + type: "string" + enum: + - "Java" + - "JavaScript" + - "PHP" + - "Python" + - "Android" + - "Objective-C" + - "C#" + - "Go" + - "C++" + - "HTML" + - "C" + - "NodeJS" + - "Swift" + - "Ruby" + - "TypeScript" + - "Shell" + - "CSS" + - "Docker" + - "Lua" + - "Dart" + - "Scala" + - "Matlab" + - "Delphi" + - "ASP" + - "TeX/LaTeX" + - "Visual Basic" + - "ActionScript" + - "Groovy" + - "Erlang" + - "R" + - "Rust" + - "Verilog" + - "VimL" + - "Perl" + - "QML" + - "Arduino" + - "Assembly" + - "Pascal" + - "Clojure" + - "Emacs Lisp" + - "FORTRAN" + - "CoffeeScript" + - "PowerShell" + - "AutoHotkey" + - "Elixir" + - "VHDL" + - "D" + - "Haskell" + - "M" + - "Julia" + - "Scheme" + - "Common Lisp" + - "XSLT" + - "Logos" + - "DOT" + - "Racket" + - "OCaml" + - "Puppet" + - "Haxe" + - "Coq" + - "LiveScript" + - "Vala" + - "Nemerle" + - "Prolog" + - "Smalltalk" + - "Eiffel" + - "Standard ML" + - "eC" + - "Ada" + - "Slash" + - "Scilab" + - "Awk" + - "ColdFusion" + - "微信" + - "Crystal" + - "Kotlin" + - "SQL" + - "Lisp" + - "XML" + - "C/C++" + - "HTML/CSS" + - "易语言" + - "汇编" + - "其他" + - "Zephir" + - "Pawn" + x-exportParamName: "Language" + x-optionalDataType: "String" + - name: "sort" + in: "query" + description: "排序字段,created_at(创建时间)、last_push_at(更新时间)、stars_count(收藏数)、forks_count(Fork\ + \ 数)、watches_count(关注数),默认为最佳匹配" + required: false + type: "string" + enum: + - "created_at" + - "last_push_at" + - "stars_count" + - "forks_count" + - "watches_count" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "order" + in: "query" + description: "排序顺序: desc(default)、asc" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Order" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Project" + /v5/search/issues: + get: + tags: + - "Search" + summary: "搜索 Issues" + description: "搜索 Issues" + operationId: "getV5SearchIssues" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "q" + in: "query" + description: "搜索关键字" + required: true + type: "string" + x-exportParamName: "Q" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + - name: "repo" + in: "query" + description: "筛选指定仓库 (path, e.g. oschina/git-osc) 的 issues" + required: false + type: "string" + x-exportParamName: "Repo" + x-optionalDataType: "String" + - name: "language" + in: "query" + description: "筛选指定语言的 issues" + required: false + type: "string" + enum: + - "Java" + - "JavaScript" + - "PHP" + - "Python" + - "Android" + - "Objective-C" + - "C#" + - "Go" + - "C++" + - "HTML" + - "C" + - "NodeJS" + - "Swift" + - "Ruby" + - "TypeScript" + - "Shell" + - "CSS" + - "Docker" + - "Lua" + - "Dart" + - "Scala" + - "Matlab" + - "Delphi" + - "ASP" + - "TeX/LaTeX" + - "Visual Basic" + - "ActionScript" + - "Groovy" + - "Erlang" + - "R" + - "Rust" + - "Verilog" + - "VimL" + - "Perl" + - "QML" + - "Arduino" + - "Assembly" + - "Pascal" + - "Clojure" + - "Emacs Lisp" + - "FORTRAN" + - "CoffeeScript" + - "PowerShell" + - "AutoHotkey" + - "Elixir" + - "VHDL" + - "D" + - "Haskell" + - "M" + - "Julia" + - "Scheme" + - "Common Lisp" + - "XSLT" + - "Logos" + - "DOT" + - "Racket" + - "OCaml" + - "Puppet" + - "Haxe" + - "Coq" + - "LiveScript" + - "Vala" + - "Nemerle" + - "Prolog" + - "Smalltalk" + - "Eiffel" + - "Standard ML" + - "eC" + - "Ada" + - "Slash" + - "Scilab" + - "Awk" + - "ColdFusion" + - "微信" + - "Crystal" + - "Kotlin" + - "SQL" + - "Lisp" + - "XML" + - "C/C++" + - "HTML/CSS" + - "易语言" + - "汇编" + - "其他" + - "Zephir" + - "Pawn" + x-exportParamName: "Language" + x-optionalDataType: "String" + - name: "label" + in: "query" + description: "筛选指定标签的 issues" + required: false + type: "string" + x-exportParamName: "Label" + x-optionalDataType: "String" + - name: "state" + in: "query" + description: "筛选指定状态的 issues, open(开启)、closed(完成)、rejected(拒绝)" + required: false + type: "string" + enum: + - "open" + - "progressing" + - "closed" + - "rejected" + x-exportParamName: "State" + x-optionalDataType: "String" + - name: "author" + in: "query" + description: "筛选指定创建者 (username/login) 的 issues" + required: false + type: "string" + x-exportParamName: "Author" + x-optionalDataType: "String" + - name: "assignee" + in: "query" + description: "筛选指定负责人 (username/login) 的 issues" + required: false + type: "string" + x-exportParamName: "Assignee" + x-optionalDataType: "String" + - name: "sort" + in: "query" + description: "排序字段,created_at(创建时间)、last_push_at(更新时间)、notes_count(评论数),默认\ + 为最佳匹配" + required: false + type: "string" + enum: + - "created_at" + - "updated_at" + - "notes_count" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "order" + in: "query" + description: "排序顺序: desc(default)、asc" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Order" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Issue" + /v5/search/gists: + get: + tags: + - "Search" + summary: "搜索代码片段" + description: "搜索代码片段" + operationId: "getV5SearchGists" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "q" + in: "query" + description: "搜索关键字" + required: true + type: "string" + x-exportParamName: "Q" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + - name: "language" + in: "query" + description: "筛选指定语言的代码片段" + required: false + type: "string" + enum: + - "Java" + - "Zephir" + - "Pawn" + - "PHP" + - "JavaScript" + - "C#" + - "C/C++" + - "Python" + - "Ruby" + - "Go" + - "Perl" + - "ASP" + - "Objective-C" + - "HTML" + - "CSS" + - "TypeScript" + - "Shell" + - "Erlang" + - "Kotlin" + - "Swift" + - "Rust" + - "Lua" + - "Assembly" + - "Pascal" + - "Scala" + - "ActionScript" + - "Groovy" + - "Clojure" + - "Matlab" + - "VimL" + - "R" + - "Lisp" + - "SQL" + - "XML" + - "易语言" + - "Smalltalk" + - "其他" + - "C" + - "CoffeeScript" + - "C++" + - "AutoHotkey" + - "Arduino" + - "Common Lisp" + - "Scheme" + - "FORTRAN" + - "Verilog" + - "Puppet" + - "XSLT" + - "Delphi" + - "eC" + - "D" + - "Haskell" + - "Visual Basic" + - "PowerShell" + - "Emacs Lisp" + - "Racket" + - "OCaml" + - "Vala" + - "Ada" + - "Dart" + - "M" + - "ColdFusion" + - "Awk" + - "LiveScript" + - "Slash" + - "Julia" + - "Nemerle" + - "Elixir" + - "VHDL" + - "TeX/LaTeX" + - "Standard ML" + - "Haxe" + - "Eiffel" + - "DOT" + - "Scilab" + - "Prolog" + - "NodeJS" + - "Android" + - "Coq" + - "Logos" + - "QML" + - "Docker" + - "微信" + - "Crystal" + - "HTML/CSS" + - "汇编" + x-exportParamName: "Language" + x-optionalDataType: "String" + - name: "owner" + in: "query" + description: "筛选所属用户 (username/login) 的代码片段" + required: false + type: "string" + x-exportParamName: "Owner" + x-optionalDataType: "String" + - name: "sort" + in: "query" + description: "排序字段,created_at(创建时间)、updated_at(更新时间)、notes_count(评论数)、stars_count(收\ + 藏数)、forks_count(Fork 数),默认为最佳匹配" + required: false + type: "string" + enum: + - "created_at" + - "updated_at" + - "notes_count" + - "stars_count" + - "forks_count" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "order" + in: "query" + description: "排序顺序: desc(default)、asc" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Order" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/Code" + /v5/search/users: + get: + tags: + - "Search" + summary: "搜索用户" + description: "搜索用户" + operationId: "getV5SearchUsers" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "q" + in: "query" + description: "搜索关键字" + required: true + type: "string" + x-exportParamName: "Q" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + - name: "sort" + in: "query" + description: "排序字段,joined_at(注册时间),默认为最佳匹配" + required: false + type: "string" + enum: + - "joined_at" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "order" + in: "query" + description: "排序顺序: desc(default)、asc" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Order" + x-optionalDataType: "String" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/User" + /v5/notifications/count: + get: + tags: + - "Activity" + summary: "获取授权用户的通知数" + description: "获取授权用户的通知数" + operationId: "getV5NotificationsCount" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "unread" + in: "query" + description: "是否只获取未读消息,默认:否" + required: false + type: "boolean" + x-exportParamName: "Unread" + x-optionalDataType: "Bool" + responses: + 200: + description: "返回数据" + schema: + $ref: "#/definitions/UserNotificationCount" + /v5/notifications/threads: + get: + tags: + - "Activity" + summary: "列出授权用户的所有通知" + description: "列出授权用户的所有通知" + operationId: "getV5NotificationsThreads" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "unread" + in: "query" + description: "是否只获取未读消息,默认:否" + required: false + type: "boolean" + x-exportParamName: "Unread" + x-optionalDataType: "Bool" + - name: "participating" + in: "query" + description: "是否只获取自己直接参与的消息,默认:否" + required: false + type: "boolean" + x-exportParamName: "Participating" + x-optionalDataType: "Bool" + - name: "type" + in: "query" + description: "筛选指定类型的通知,all:所有,event:事件通知,referer:@ 通知" + required: false + type: "string" + default: "all" + enum: + - "all" + - "event" + - "referer" + x-exportParamName: "Type_" + x-optionalDataType: "String" + - name: "since" + in: "query" + description: "只获取在给定时间后更新的消息,要求时间格式为 ISO 8601" + required: false + type: "string" + x-exportParamName: "Since" + x-optionalDataType: "String" + - name: "before" + in: "query" + description: "只获取在给定时间前更新的消息,要求时间格式为 ISO 8601" + required: false + type: "string" + x-exportParamName: "Before" + x-optionalDataType: "String" + - name: "ids" + in: "query" + description: "指定一组通知 ID,以 , 分隔" + required: false + type: "string" + x-exportParamName: "Ids" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回数据" + schema: + type: "array" + items: + $ref: "#/definitions/UserNotificationList" + put: + tags: + - "Activity" + summary: "标记所有通知为已读" + description: "标记所有通知为已读" + operationId: "putV5NotificationsThreads" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "ids" + in: "formData" + description: "指定一组通知 ID,以 , 分隔" + required: false + type: "string" + x-exportParamName: "Ids" + x-optionalDataType: "String" + responses: + 205: + description: "执行成功" + /v5/notifications/threads/{id}: + get: + tags: + - "Activity" + summary: "获取一条通知" + description: "获取一条通知" + operationId: "getV5NotificationsThreadsId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "id" + in: "path" + description: "通知的 ID" + required: true + type: "string" + x-exportParamName: "Id" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/UserNotification" + 404: + description: "没有相关数据" + patch: + tags: + - "Activity" + summary: "标记一条通知为已读" + description: "标记一条通知为已读" + operationId: "patchV5NotificationsThreadsId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "id" + in: "path" + description: "通知的 ID" + required: true + type: "string" + x-exportParamName: "Id" + responses: + 205: + description: "执行成功" + 404: + description: "没有相关数据" + /v5/notifications/messages: + get: + tags: + - "Activity" + summary: "列出授权用户的所有私信" + description: "列出授权用户的所有私信" + operationId: "getV5NotificationsMessages" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "unread" + in: "query" + description: "是否只显示未读私信,默认:否" + required: false + type: "boolean" + x-exportParamName: "Unread" + x-optionalDataType: "Bool" + - name: "since" + in: "query" + description: "只获取在给定时间后更新的私信,要求时间格式为 ISO 8601" + required: false + type: "string" + x-exportParamName: "Since" + x-optionalDataType: "String" + - name: "before" + in: "query" + description: "只获取在给定时间前更新的私信,要求时间格式为 ISO 8601" + required: false + type: "string" + x-exportParamName: "Before" + x-optionalDataType: "String" + - name: "ids" + in: "query" + description: "指定一组私信 ID,以 , 分隔" + required: false + type: "string" + x-exportParamName: "Ids" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "当前的页码" + required: false + type: "integer" + default: 1 + format: "int32" + x-exportParamName: "Page" + x-optionalDataType: "Int32" + - name: "per_page" + in: "query" + description: "每页的数量,最大为 100" + required: false + type: "integer" + default: 20 + format: "int32" + x-exportParamName: "PerPage" + x-optionalDataType: "Int32" + responses: + 200: + description: "返回格式" + schema: + type: "array" + items: + $ref: "#/definitions/UserMessageList" + post: + tags: + - "Activity" + summary: "发送私信给指定用户" + description: "发送私信给指定用户" + operationId: "postV5NotificationsMessages" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "username" + in: "formData" + description: "用户名(username/login)" + required: true + type: "string" + x-exportParamName: "Username" + - name: "content" + in: "formData" + description: "私信内容" + required: true + type: "string" + x-exportParamName: "Content" + responses: + 201: + description: "返回格式" + schema: + $ref: "#/definitions/UserMessage" + 400: + description: "数据不合法" + 404: + description: "没有相关数据" + put: + tags: + - "Activity" + summary: "标记所有私信为已读" + description: "标记所有私信为已读" + operationId: "putV5NotificationsMessages" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "ids" + in: "formData" + description: "指定一组私信 ID,以 , 分隔" + required: false + type: "string" + x-exportParamName: "Ids" + x-optionalDataType: "String" + responses: + 205: + description: "执行成功" + /v5/notifications/messages/{id}: + get: + tags: + - "Activity" + summary: "获取一条私信" + description: "获取一条私信" + operationId: "getV5NotificationsMessagesId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "id" + in: "path" + description: "私信的 ID" + required: true + type: "string" + x-exportParamName: "Id" + responses: + 200: + description: "返回格式" + schema: + $ref: "#/definitions/UserMessage" + 404: + description: "没有相关数据" + patch: + tags: + - "Activity" + summary: "标记一条私信为已读" + description: "标记一条私信为已读" + operationId: "patchV5NotificationsMessagesId" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "formData" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + - name: "id" + in: "path" + description: "私信的 ID" + required: true + type: "string" + x-exportParamName: "Id" + responses: + 205: + description: "执行成功" + 404: + description: "没有相关数据" + /v5/emojis: + get: + tags: + - "Miscellaneous" + summary: "列出可使用的 Emoji" + description: "列出可使用的 Emoji" + operationId: "getV5Emojis" + consumes: + - "application/json" + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "access_token" + in: "query" + description: "用户授权码" + required: false + type: "string" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + responses: + 200: + description: "列出可使用的 Emoji" +definitions: + Branch: + type: "object" + properties: + name: + type: "string" + commit: + type: "string" + protected: + type: "string" + protection_url: + type: "string" + description: "获取所有分支" + example: + protected: "protected" + name: "name" + commit: "commit" + protection_url: "protection_url" + CompleteBranch: + type: "object" + properties: + name: + type: "string" + commit: + type: "string" + _links: + type: "string" + protected: + type: "string" + protection_url: + type: "string" + description: "创建分支" + example: + protected: "protected" + _links: "_links" + name: "name" + commit: "commit" + protection_url: "protection_url" + RepoCommit: + type: "object" + properties: + url: + type: "string" + sha: + type: "string" + html_url: + type: "string" + comments_url: + type: "string" + commit: + type: "string" + author: + type: "string" + committer: + type: "string" + parents: + type: "string" + stats: + type: "string" + description: "仓库的某个提交" + example: + committer: "committer" + stats: "stats" + author: "author" + html_url: "html_url" + comments_url: "comments_url" + commit: "commit" + sha: "sha" + url: "url" + parents: "parents" + Compare: + type: "object" + properties: + base_commit: + type: "string" + merge_base_commit: + type: "string" + commits: + type: "string" + files: + type: "string" + description: "两个Commits之间对比的版本差异" + example: + base_commit: "base_commit" + commits: "commits" + files: "files" + merge_base_commit: "merge_base_commit" + SSHKey: + type: "object" + properties: + id: + type: "string" + key: + type: "string" + url: + type: "string" + title: + type: "string" + created_at: + type: "string" + description: "获取一个公钥" + example: + created_at: "created_at" + id: "id" + title: "title" + key: "key" + url: "url" + SSHKeyBasic: + type: "object" + properties: + id: + type: "string" + key: + type: "string" + description: "列出指定用户的所有公钥" + example: + id: "id" + key: "key" + Content: + type: "object" + properties: + type: + type: "string" + encoding: + type: "string" + size: + type: "string" + name: + type: "string" + path: + type: "string" + content: + type: "string" + sha: + type: "string" + url: + type: "string" + html_url: + type: "string" + download_url: + type: "string" + _links: + type: "string" + description: "获取仓库具体路径下的内容" + example: + path: "path" + size: "size" + _links: "_links" + html_url: "html_url" + name: "name" + download_url: "download_url" + type: "type" + encoding: "encoding" + sha: "sha" + content: "content" + url: "url" + CommitContent: + type: "object" + properties: + content: + $ref: "#/definitions/ContentBasic" + commit: + $ref: "#/definitions/Commit" + description: "删除文件" + example: + commit: + committer: "committer" + author: "author" + tree: "tree" + message: "message" + sha: "sha" + parents: "parents" + content: + path: "path" + size: "size" + _links: "_links" + html_url: "html_url" + name: "name" + download_url: "download_url" + type: "type" + sha: "sha" + url: "url" + ContentBasic: + type: "object" + properties: + name: + type: "string" + path: + type: "string" + size: + type: "string" + sha: + type: "string" + type: + type: "string" + url: + type: "string" + html_url: + type: "string" + download_url: + type: "string" + _links: + type: "string" + example: + path: "path" + size: "size" + _links: "_links" + html_url: "html_url" + name: "name" + download_url: "download_url" + type: "type" + sha: "sha" + url: "url" + Commit: + type: "object" + properties: + id: + type: "string" + tree_id: + type: "string" + parent_ids: + type: "array" + items: + type: "string" + message: + type: "string" + timestamp: + type: "string" + format: "date-time" + url: + type: "string" + author: + $ref: "#/definitions/UserBasic" + committer: + $ref: "#/definitions/UserBasic" + distinct: + type: "boolean" + added: + type: "array" + items: + type: "string" + removed: + type: "array" + items: + type: "string" + modified: + type: "array" + items: + type: "string" + Blob: + type: "object" + properties: + sha: + type: "string" + size: + type: "string" + url: + type: "string" + content: + type: "string" + encoding: + type: "string" + description: "获取文件Blob" + example: + size: "size" + encoding: "encoding" + sha: "sha" + url: "url" + content: "content" + Tree: + type: "object" + properties: + sha: + type: "string" + url: + type: "string" + tree: + type: "string" + truncated: + type: "string" + description: "获取目录Tree" + example: + tree: "tree" + truncated: "truncated" + sha: "sha" + url: "url" + Issue: + type: "object" + properties: + id: + type: "integer" + format: "int32" + url: + type: "string" + repository_url: + type: "string" + labels_url: + type: "string" + comments_url: + type: "string" + html_url: + type: "string" + parent_url: + type: "string" + number: + type: "string" + state: + type: "string" + title: + type: "string" + body: + type: "string" + body_html: + type: "string" + user: + $ref: "#/definitions/UserBasic" + labels: + type: "array" + items: + $ref: "#/definitions/Label" + assignee: + $ref: "#/definitions/UserBasic" + collaborators: + type: "array" + items: + $ref: "#/definitions/UserBasic" + repository: + type: "string" + milestone: + $ref: "#/definitions/Milestone" + created_at: + type: "string" + format: "date-time" + updated_at: + type: "string" + format: "date-time" + plan_started_at: + type: "string" + format: "date-time" + deadline: + type: "string" + format: "date-time" + finished_at: + type: "string" + format: "date-time" + scheduled_time: + type: "string" + comments: + type: "integer" + format: "int32" + issue_type: + type: "string" + program: + $ref: "#/definitions/ProgramBasic" + description: "搜索 Issues" + example: + body_html: "body_html" + finished_at: "2000-01-23T04:56:07.000+00:00" + created_at: "2000-01-23T04:56:07.000+00:00" + program: + author: "author" + name: "name" + description: "description" + id: "id" + assignee: "assignee" + title: "title" + body: "body" + repository: "repository" + scheduled_time: "scheduled_time" + labels_url: "labels_url" + number: "number" + updated_at: "2000-01-23T04:56:07.000+00:00" + comments_url: "comments_url" + collaborators: + gists_url: "gists_url" + repos_url: "repos_url" + following_url: "following_url" + starred_url: "starred_url" + login: "login" + followers_url: "followers_url" + type: "type" + url: "url" + subscriptions_url: "subscriptions_url" + received_events_url: "received_events_url" + avatar_url: "avatar_url" + events_url: "events_url" + html_url: "html_url" + name: "name" + site_admin: "site_admin" + id: 5 + organizations_url: "organizations_url" + id: 0 + repository_url: "repository_url" + state: "state" + deadline: "2000-01-23T04:56:07.000+00:00" + comments: 3 + issue_type: "issue_type" + url: "url" + labels: + color: "color" + name: "name" + repository_id: 1 + id: 6 + url: "url" + milestone: + number: 5 + updated_at: "2000-01-23T04:56:07.000+00:00" + html_url: "html_url" + description: "description" + created_at: "2000-01-23T04:56:07.000+00:00" + repository_id: 2 + state: "state" + title: "title" + open_issues: 7 + closed_issues: 9 + url: "url" + due_on: "2000-01-23T04:56:07.000+00:00" + parent_url: "parent_url" + plan_started_at: "2000-01-23T04:56:07.000+00:00" + html_url: "html_url" + assignee: + gists_url: "gists_url" + repos_url: "repos_url" + following_url: "following_url" + starred_url: "starred_url" + login: "login" + followers_url: "followers_url" + type: "type" + url: "url" + subscriptions_url: "subscriptions_url" + received_events_url: "received_events_url" + avatar_url: "avatar_url" + events_url: "events_url" + html_url: "html_url" + name: "name" + site_admin: "site_admin" + id: 5 + organizations_url: "organizations_url" + user: "user" + Label: + type: "object" + properties: + id: + type: "integer" + format: "int32" + name: + type: "string" + color: + type: "string" + repository_id: + type: "integer" + format: "int32" + url: + type: "string" + description: "获取企业某个标签" + example: + color: "color" + name: "name" + repository_id: 1 + id: 6 + url: "url" + UserBasic: + type: "object" + properties: + id: + type: "integer" + format: "int32" + login: + type: "string" + name: + type: "string" + avatar_url: + type: "string" + url: + type: "string" + html_url: + type: "string" + followers_url: + type: "string" + following_url: + type: "string" + gists_url: + type: "string" + starred_url: + type: "string" + subscriptions_url: + type: "string" + organizations_url: + type: "string" + repos_url: + type: "string" + events_url: + type: "string" + received_events_url: + type: "string" + type: + type: "string" + site_admin: + type: "boolean" + email: + type: "string" + description: "列出一个组织的所有成员" + example: + gists_url: "gists_url" + repos_url: "repos_url" + following_url: "following_url" + starred_url: "starred_url" + login: "login" + followers_url: "followers_url" + type: "type" + url: "url" + subscriptions_url: "subscriptions_url" + received_events_url: "received_events_url" + avatar_url: "avatar_url" + events_url: "events_url" + html_url: "html_url" + name: "name" + site_admin: "site_admin" + id: 5 + organizations_url: "organizations_url" + Email: + type: "object" + properties: + email: + type: "string" + state: + type: "string" + scope: + type: "array" + items: + type: "string" + description: "获取授权用户的邮件地址" + example: + email: "xxx@xx.com" + state: "confirmed" + scope: + - "primary" + - "secure" + - "notified" + - "commited" + - "public" + Milestone: + type: "object" + properties: + url: + type: "string" + html_url: + type: "string" + number: + type: "integer" + format: "int32" + repository_id: + type: "integer" + format: "int32" + state: + type: "string" + title: + type: "string" + description: + type: "string" + updated_at: + type: "string" + format: "date-time" + created_at: + type: "string" + format: "date-time" + open_issues: + type: "integer" + format: "int32" + closed_issues: + type: "integer" + format: "int32" + due_on: + type: "string" + description: "更新仓库里程碑" + example: + number: 5 + updated_at: "2000-01-23T04:56:07.000+00:00" + html_url: "html_url" + description: "description" + created_at: "2000-01-23T04:56:07.000+00:00" + repository_id: 2 + state: "state" + title: "title" + open_issues: 7 + closed_issues: 9 + url: "url" + due_on: "2000-01-23T04:56:07.000+00:00" + ProgramBasic: + type: "object" + properties: + id: + type: "string" + name: + type: "string" + description: + type: "string" + assignee: + type: "string" + author: + type: "string" + example: + author: "author" + name: "name" + description: "description" + id: "id" + assignee: "assignee" + OperateLog: + type: "object" + properties: + id: + type: "string" + icon: + type: "string" + user: + type: "string" + content: + type: "string" + created_at: + type: "string" + description: "获取某个Pull Request的操作日志" + example: + icon: "icon" + created_at: "created_at" + id: "id" + user: "user" + content: "content" + Note: + type: "object" + properties: + id: + type: "integer" + format: "int32" + body: + type: "string" + body_html: + type: "string" + user: + $ref: "#/definitions/User" + source: + type: "string" + created_at: + type: "string" + target: + type: "string" + description: "获取企业某个Issue所有评论" + example: + body_html: "body_html" + created_at: "created_at" + id: "id" + source: "source" + body: "body" + user: "user" + target: "target" + Project: + type: "object" + properties: + id: + type: "integer" + format: "int32" + full_name: + type: "string" + human_name: + type: "string" + url: + type: "string" + namespace: + $ref: "#/definitions/Namespace" + path: + type: "string" + name: + type: "string" + owner: + $ref: "#/definitions/UserBasic" + description: + type: "string" + private: + type: "boolean" + public: + type: "boolean" + internal: + type: "boolean" + fork: + type: "boolean" + html_url: + type: "string" + ssh_url: + type: "string" + forks_url: + type: "string" + keys_url: + type: "string" + collaborators_url: + type: "string" + hooks_url: + type: "string" + branches_url: + type: "string" + tags_url: + type: "string" + blobs_url: + type: "string" + stargazers_url: + type: "string" + contributors_url: + type: "string" + commits_url: + type: "string" + comments_url: + type: "string" + issue_comment_url: + type: "string" + issues_url: + type: "string" + pulls_url: + type: "string" + milestones_url: + type: "string" + notifications_url: + type: "string" + labels_url: + type: "string" + releases_url: + type: "string" + recommend: + type: "boolean" + homepage: + type: "string" + language: + type: "string" + forks_count: + type: "integer" + format: "int32" + stargazers_count: + type: "integer" + format: "int32" + watchers_count: + type: "integer" + format: "int32" + default_branch: + type: "string" + open_issues_count: + type: "integer" + format: "int32" + has_issues: + type: "boolean" + has_wiki: + type: "boolean" + pull_requests_enabled: + type: "boolean" + has_page: + type: "boolean" + license: + type: "string" + outsourced: + type: "boolean" + project_creator: + type: "string" + members: + type: "array" + items: + type: "string" + pushed_at: + type: "string" + created_at: + type: "string" + updated_at: + type: "string" + parent: + $ref: "#/definitions/Project" + paas: + type: "string" + stared: + type: "string" + watched: + type: "string" + permission: + type: "string" + relation: + type: "string" + description: "搜索仓库" + example: + human_name: "human_name" + stargazers_count: "stargazers_count" + pushed_at: "pushed_at" + language: "language" + branches_url: "branches_url" + issue_comment_url: "issue_comment_url" + relation: "relation" + labels_url: "labels_url" + path: "path" + releases_url: "releases_url" + members: "members" + id: 0 + pull_requests_enabled: "pull_requests_enabled" + forks_url: "forks_url" + project_creator: "project_creator" + ssh_url: "ssh_url" + license: "license" + watched: "watched" + full_name: "full_name" + html_url: "html_url" + collaborators_url: "collaborators_url" + name: "name" + outsourced: "outsourced" + pulls_url: "pulls_url" + default_branch: "default_branch" + hooks_url: "hooks_url" + stared: "stared" + tags_url: "tags_url" + private: "private" + internal: "internal" + contributors_url: "contributors_url" + notifications_url: "notifications_url" + open_issues_count: 6 + description: "description" + created_at: "created_at" + recommend: "recommend" + keys_url: "keys_url" + has_wiki: "has_wiki" + public: "public" + updated_at: "updated_at" + paas: "paas" + comments_url: "comments_url" + stargazers_url: "stargazers_url" + owner: "owner" + commits_url: "commits_url" + blobs_url: "blobs_url" + permission: "permission" + has_issues: "has_issues" + url: "url" + milestones_url: "milestones_url" + fork: "fork" + issues_url: "issues_url" + has_page: "has_page" + namespace: "{}" + watchers_count: "watchers_count" + homepage: "homepage" + forks_count: "forks_count" + Contributor: + type: "object" + properties: + email: + type: "string" + name: + type: "string" + contributions: + type: "string" + description: "获取仓库贡献者" + example: + contributions: "contributions" + name: "name" + email: "email" + Tag: + type: "object" + properties: + name: + type: "string" + commit: + type: "string" + description: "列出仓库所有的tags" + example: + name: "name" + commit: "commit" + ProjectMember: + type: "object" + properties: + id: + type: "integer" + format: "int32" + login: + type: "string" + name: + type: "string" + avatar_url: + type: "string" + url: + type: "string" + html_url: + type: "string" + followers_url: + type: "string" + following_url: + type: "string" + gists_url: + type: "string" + starred_url: + type: "string" + subscriptions_url: + type: "string" + organizations_url: + type: "string" + repos_url: + type: "string" + events_url: + type: "string" + received_events_url: + type: "string" + type: + type: "string" + site_admin: + type: "string" + permissions: + type: "string" + description: "添加仓库成员" + example: + gists_url: "gists_url" + repos_url: "repos_url" + following_url: "following_url" + starred_url: "starred_url" + login: "login" + followers_url: "followers_url" + type: "type" + url: "url" + subscriptions_url: "subscriptions_url" + received_events_url: "received_events_url" + avatar_url: "avatar_url" + events_url: "events_url" + permissions: "permissions" + html_url: "html_url" + name: "name" + site_admin: "site_admin" + id: 0 + organizations_url: "organizations_url" + ProjectMemberPermission: + type: "object" + properties: + id: + type: "integer" + format: "int32" + login: + type: "string" + name: + type: "string" + avatar_url: + type: "string" + url: + type: "string" + html_url: + type: "string" + followers_url: + type: "string" + following_url: + type: "string" + gists_url: + type: "string" + starred_url: + type: "string" + subscriptions_url: + type: "string" + organizations_url: + type: "string" + repos_url: + type: "string" + events_url: + type: "string" + received_events_url: + type: "string" + type: + type: "string" + site_admin: + type: "string" + permission: + type: "string" + description: "查看仓库成员的权限" + example: + gists_url: "gists_url" + repos_url: "repos_url" + following_url: "following_url" + starred_url: "starred_url" + permission: "permission" + login: "login" + followers_url: "followers_url" + type: "type" + url: "url" + subscriptions_url: "subscriptions_url" + received_events_url: "received_events_url" + avatar_url: "avatar_url" + events_url: "events_url" + html_url: "html_url" + name: "name" + site_admin: "site_admin" + id: 0 + organizations_url: "organizations_url" + PullRequest: + type: "object" + properties: + id: + type: "integer" + format: "int32" + url: + type: "string" + html_url: + type: "string" + diff_url: + type: "string" + patch_url: + type: "string" + issue_url: + type: "string" + commits_url: + type: "string" + review_comments_url: + type: "string" + review_comment_url: + type: "string" + comments_url: + type: "string" + statuses_url: + type: "string" + number: + type: "integer" + format: "int32" + state: + type: "string" + title: + type: "string" + body: + type: "string" + body_html: + type: "string" + assignees: + type: "array" + items: + $ref: "#/definitions/UserBasic" + testers: + type: "array" + items: + $ref: "#/definitions/UserBasic" + milestone: + $ref: "#/definitions/Milestone" + labels: + type: "array" + items: + $ref: "#/definitions/Label" + locked: + type: "string" + created_at: + type: "string" + updated_at: + type: "string" + closed_at: + type: "string" + merged_at: + type: "string" + mergeable: + type: "boolean" + head: + $ref: "#/definitions/BasicInfo" + base: + $ref: "#/definitions/BasicInfo" + _links: + type: "string" + user: + $ref: "#/definitions/UserBasic" + comments: + type: "integer" + format: "int32" + commits: + type: "integer" + format: "int32" + additions: + type: "integer" + format: "int32" + deletions: + type: "integer" + format: "int32" + changed_files: + type: "integer" + format: "int32" + description: "取消用户测试 Pull Request" + example: + issue_url: "issue_url" + body_html: "body_html" + _links: "_links" + diff_url: "diff_url" + assignees: + - "assignees" + - "assignees" + created_at: "created_at" + title: "title" + body: "body" + head: "head" + number: "number" + mergeable: "mergeable" + patch_url: "patch_url" + updated_at: "updated_at" + comments_url: "comments_url" + review_comment_url: "review_comment_url" + id: "id" + state: "state" + locked: "locked" + commits_url: "commits_url" + testers: + - "testers" + - "testers" + closed_at: "closed_at" + statuses_url: "statuses_url" + merged_at: "merged_at" + url: "url" + labels: + color: "color" + name: "name" + repository_id: 1 + id: 6 + url: "url" + milestone: + number: 5 + updated_at: "2000-01-23T04:56:07.000+00:00" + html_url: "html_url" + description: "description" + created_at: "2000-01-23T04:56:07.000+00:00" + repository_id: 2 + state: "state" + title: "title" + open_issues: 7 + closed_issues: 9 + url: "url" + due_on: "2000-01-23T04:56:07.000+00:00" + html_url: "html_url" + review_comments_url: "review_comments_url" + user: "user" + base: "base" + PullRequestComments: + type: "object" + properties: + url: + type: "string" + id: + type: "string" + path: + type: "string" + position: + type: "string" + original_position: + type: "string" + commit_id: + type: "string" + original_commit_id: + type: "string" + user: + $ref: "#/definitions/UserBasic" + body: + type: "string" + created_at: + type: "string" + updated_at: + type: "string" + html_url: + type: "string" + pull_request_url: + type: "string" + _links: + type: "string" + description: "编辑评论" + example: + original_commit_id: "original_commit_id" + _links: "_links" + created_at: "created_at" + pull_request_url: "pull_request_url" + body: "body" + url: "url" + path: "path" + original_position: "original_position" + updated_at: "updated_at" + html_url: "html_url" + id: "id" + position: "position" + commit_id: "commit_id" + user: "user" + PullRequestCommits: + type: "object" + properties: + url: + type: "string" + sha: + type: "string" + html_url: + type: "string" + comments_url: + type: "string" + commit: + type: "string" + author: + type: "string" + committer: + type: "string" + parents: + type: "string" + description: "获取某Pull Request的所有Commit信息。最多显示250条Commit" + example: + committer: "committer" + author: "author" + html_url: "html_url" + comments_url: "comments_url" + commit: "commit" + sha: "sha" + url: "url" + parents: "parents" + PullRequestFiles: + type: "object" + properties: + sha: + type: "string" + filename: + type: "string" + status: + type: "string" + additions: + type: "string" + deletions: + type: "string" + blob_url: + type: "string" + raw_url: + type: "string" + patch: + type: "string" + description: "Pull Request Commit文件列表。最多显示300条diff" + example: + patch: "patch" + filename: "filename" + additions: "additions" + deletions: "deletions" + sha: "sha" + blob_url: "blob_url" + raw_url: "raw_url" + status: "status" + Release: + type: "object" + properties: + id: + type: "integer" + format: "int32" + tag_name: + type: "string" + target_commitish: + type: "string" + prerelease: + type: "string" + name: + type: "string" + body: + type: "string" + author: + type: "string" + created_at: + type: "string" + format: "date-time" + assets: + type: "string" + description: "更新仓库Release" + example: + assets: "assets" + tag_name: "tag_name" + prerelease: "prerelease" + author: "author" + target_commitish: "target_commitish" + name: "name" + created_at: "2000-01-23T04:56:07.000+00:00" + id: 0 + body: "body" + Hook: + type: "object" + properties: + id: + type: "string" + url: + type: "string" + created_at: + type: "string" + password: + type: "string" + project_id: + type: "string" + result: + type: "string" + result_code: + type: "string" + push_events: + type: "string" + tag_push_events: + type: "string" + issues_events: + type: "string" + note_events: + type: "string" + merge_requests_events: + type: "string" + description: "更新一个仓库WebHook" + example: + result: "result" + push_events: "push_events" + tag_push_events: "tag_push_events" + password: "password" + project_id: "project_id" + issues_events: "issues_events" + created_at: "created_at" + result_code: "result_code" + merge_requests_events: "merge_requests_events" + id: "id" + note_events: "note_events" + url: "url" + Event: + type: "object" + properties: + id: + type: "integer" + format: "int32" + type: + type: "string" + actor: + type: "string" + repo: + type: "string" + org: + type: "string" + public: + type: "string" + created_at: + type: "string" + payload: + type: "object" + description: "不同类型动态的内容" + properties: {} + description: "列出仓库的所有公开动态" + example: + actor: "actor" + public: "public" + org: "org" + payload: "{}" + repo: "repo" + created_at: "created_at" + id: 0 + type: "type" + UserNotificationList: + type: "object" + properties: + total_count: + type: "integer" + format: "int32" + list: + type: "array" + description: "通知列表" + items: + $ref: "#/definitions/UserNotification" + description: "列出授权用户的所有通知" + example: + total_count: 0 + list: + - actor: + gists_url: "gists_url" + repos_url: "repos_url" + following_url: "following_url" + starred_url: "starred_url" + login: "login" + followers_url: "followers_url" + type: "type" + url: "url" + subscriptions_url: "subscriptions_url" + received_events_url: "received_events_url" + avatar_url: "avatar_url" + events_url: "events_url" + html_url: "html_url" + name: "name" + site_admin: "site_admin" + id: 5 + organizations_url: "organizations_url" + updated_at: "updated_at" + unread: "unread" + subject: + latest_comment_url: "latest_comment_url" + title: "title" + type: "type" + url: "url" + html_url: "html_url" + mute: "mute" + id: 6 + type: "type" + repository: + owner: "owner" + human_name: "human_name" + private: "private" + internal: "internal" + ssh_url: "ssh_url" + description: "description" + url: "url" + path: "path" + fork: "fork" + full_name: "full_name" + public: "public" + html_url: "html_url" + namespace: "{}" + name: "name" + id: 1 + content: "content" + url: "url" + namespaces: + - html_url: "html_url" + name: "name" + type: "type" + - html_url: "html_url" + name: "name" + type: "type" + - actor: + gists_url: "gists_url" + repos_url: "repos_url" + following_url: "following_url" + starred_url: "starred_url" + login: "login" + followers_url: "followers_url" + type: "type" + url: "url" + subscriptions_url: "subscriptions_url" + received_events_url: "received_events_url" + avatar_url: "avatar_url" + events_url: "events_url" + html_url: "html_url" + name: "name" + site_admin: "site_admin" + id: 5 + organizations_url: "organizations_url" + updated_at: "updated_at" + unread: "unread" + subject: + latest_comment_url: "latest_comment_url" + title: "title" + type: "type" + url: "url" + html_url: "html_url" + mute: "mute" + id: 6 + type: "type" + repository: + owner: "owner" + human_name: "human_name" + private: "private" + internal: "internal" + ssh_url: "ssh_url" + description: "description" + url: "url" + path: "path" + fork: "fork" + full_name: "full_name" + public: "public" + html_url: "html_url" + namespace: "{}" + name: "name" + id: 1 + content: "content" + url: "url" + namespaces: + - html_url: "html_url" + name: "name" + type: "type" + - html_url: "html_url" + name: "name" + type: "type" + UserNotification: + type: "object" + properties: + id: + type: "integer" + format: "int32" + content: + type: "string" + type: + type: "string" + unread: + type: "string" + mute: + type: "string" + updated_at: + type: "string" + url: + type: "string" + html_url: + type: "string" + actor: + description: "通知发送者" + $ref: "#/definitions/UserBasic" + repository: + $ref: "#/definitions/ProjectBasic" + subject: + description: "通知直接关联对象" + $ref: "#/definitions/UserNotificationSubject" + namespaces: + type: "array" + description: "通知次级关联对象" + items: + $ref: "#/definitions/UserNotificationNamespace" + description: "获取一条通知" + example: + actor: + gists_url: "gists_url" + repos_url: "repos_url" + following_url: "following_url" + starred_url: "starred_url" + login: "login" + followers_url: "followers_url" + type: "type" + url: "url" + subscriptions_url: "subscriptions_url" + received_events_url: "received_events_url" + avatar_url: "avatar_url" + events_url: "events_url" + html_url: "html_url" + name: "name" + site_admin: "site_admin" + id: 5 + organizations_url: "organizations_url" + updated_at: "updated_at" + unread: "unread" + subject: + latest_comment_url: "latest_comment_url" + title: "title" + type: "type" + url: "url" + html_url: "html_url" + mute: "mute" + id: 6 + type: "type" + repository: + owner: "owner" + human_name: "human_name" + private: "private" + internal: "internal" + ssh_url: "ssh_url" + description: "description" + url: "url" + path: "path" + fork: "fork" + full_name: "full_name" + public: "public" + html_url: "html_url" + namespace: "{}" + name: "name" + id: 1 + content: "content" + url: "url" + namespaces: + - html_url: "html_url" + name: "name" + type: "type" + - html_url: "html_url" + name: "name" + type: "type" + ProjectBasic: + type: "object" + properties: + id: + type: "integer" + format: "int32" + full_name: + type: "string" + human_name: + type: "string" + url: + type: "string" + namespace: + type: "object" + properties: {} + path: + type: "string" + name: + type: "string" + owner: + $ref: "#/definitions/UserBasic" + description: + type: "string" + private: + type: "boolean" + public: + type: "boolean" + internal: + type: "boolean" + fork: + type: "boolean" + html_url: + type: "string" + ssh_url: + type: "string" + example: + owner: "owner" + human_name: "human_name" + private: "private" + internal: "internal" + ssh_url: "ssh_url" + description: "description" + url: "url" + path: "path" + fork: "fork" + full_name: "full_name" + public: "public" + html_url: "html_url" + namespace: "{}" + name: "name" + id: 1 + UserNotificationSubject: + type: "object" + properties: + title: + type: "string" + url: + type: "string" + latest_comment_url: + type: "string" + type: + type: "string" + example: + latest_comment_url: "latest_comment_url" + title: "title" + type: "type" + url: "url" + UserNotificationNamespace: + type: "object" + properties: + name: + type: "string" + html_url: + type: "string" + type: + type: "string" + example: + html_url: "html_url" + name: "name" + type: "type" + Group: + type: "object" + properties: + id: + type: "integer" + format: "int32" + login: + type: "string" + url: + type: "string" + avatar_url: + type: "string" + repos_url: + type: "string" + events_url: + type: "string" + members_url: + type: "string" + description: + type: "string" + description: "获取一个组织" + example: + avatar_url: "avatar_url" + repos_url: "repos_url" + events_url: "events_url" + members_url: "members_url" + description: "description" + id: 0 + login: "login" + url: "url" + User: + type: "object" + properties: + id: + type: "integer" + format: "int32" + login: + type: "string" + name: + type: "string" + avatar_url: + type: "string" + url: + type: "string" + html_url: + type: "string" + followers_url: + type: "string" + following_url: + type: "string" + gists_url: + type: "string" + starred_url: + type: "string" + subscriptions_url: + type: "string" + organizations_url: + type: "string" + repos_url: + type: "string" + events_url: + type: "string" + received_events_url: + type: "string" + type: + type: "string" + site_admin: + type: "boolean" + blog: + type: "string" + weibo: + type: "string" + bio: + type: "string" + public_repos: + type: "string" + public_gists: + type: "string" + followers: + type: "string" + following: + type: "string" + stared: + type: "string" + watched: + type: "string" + created_at: + type: "string" + updated_at: + type: "string" + email: + type: "string" + description: "搜索用户" + example: + gists_url: "gists_url" + repos_url: "repos_url" + following_url: "following_url" + bio: "bio" + created_at: "created_at" + login: "login" + type: "type" + blog: "blog" + subscriptions_url: "subscriptions_url" + weibo: "weibo" + updated_at: "updated_at" + site_admin: "site_admin" + id: 0 + public_repos: "public_repos" + organizations_url: "organizations_url" + starred_url: "starred_url" + followers_url: "followers_url" + public_gists: "public_gists" + url: "url" + received_events_url: "received_events_url" + watched: "watched" + followers: "followers" + avatar_url: "avatar_url" + events_url: "events_url" + html_url: "html_url" + following: "following" + name: "name" + stared: "stared" + Namespace: + type: "object" + properties: + id: + type: "integer" + format: "int32" + type: + type: "string" + name: + type: "string" + path: + type: "string" + html_url: + type: "string" + parent: + $ref: "#/definitions/NamespaceMini" + description: "获取授权用户的一个 Namespace" + example: + path: "path" + parent: + path: "path" + html_url: "html_url" + name: "name" + id: 6 + type: "type" + html_url: "html_url" + name: "name" + id: 0 + type: "type" + NamespaceMini: + type: "object" + properties: + id: + type: "integer" + format: "int32" + type: + type: "string" + name: + type: "string" + path: + type: "string" + html_url: + type: "string" + example: + path: "path" + html_url: "html_url" + name: "name" + id: 6 + type: "type" + EnterpriseBasic: + type: "object" + properties: + id: + type: "integer" + format: "int32" + path: + type: "string" + name: + type: "string" + url: + type: "string" + avatar_url: + type: "string" + description: "获取一个企业" + example: + path: "path" + avatar_url: "avatar_url" + name: "name" + id: 0 + url: "url" + GroupMember: + type: "object" + properties: + url: + type: "string" + active: + type: "string" + remark: + type: "string" + role: + type: "string" + organization_url: + type: "string" + organization: + $ref: "#/definitions/Group" + user: + type: "string" + description: "增加或更新授权用户所管理组织的成员" + example: + organization_url: "organization_url" + role: "role" + organization: + avatar_url: "avatar_url" + repos_url: "repos_url" + events_url: "events_url" + members_url: "members_url" + description: "description" + id: 0 + login: "login" + url: "url" + active: "active" + remark: "remark" + user: "user" + url: "url" + Code: + type: "object" + properties: + url: + type: "string" + forks_url: + type: "string" + commits_url: + type: "string" + id: + type: "string" + description: + type: "string" + public: + type: "string" + owner: + type: "string" + user: + type: "string" + files: + type: "string" + truncated: + type: "string" + html_url: + type: "string" + comments: + type: "string" + comments_url: + type: "string" + git_pull_url: + type: "string" + git_push_url: + type: "string" + created_at: + type: "string" + updated_at: + type: "string" + description: "搜索代码片段" + example: + owner: "owner" + commits_url: "commits_url" + comments: "comments" + forks_url: "forks_url" + git_push_url: "git_push_url" + description: "description" + truncated: "truncated" + created_at: "created_at" + url: "url" + public: "public" + updated_at: "updated_at" + html_url: "html_url" + comments_url: "comments_url" + git_pull_url: "git_pull_url" + files: "files" + id: "id" + user: "user" + CodeForksHistory: + type: "object" + properties: + url: + type: "string" + forks_url: + type: "string" + commits_url: + type: "string" + id: + type: "string" + description: + type: "string" + public: + type: "string" + owner: + type: "string" + user: + type: "string" + files: + type: "string" + truncated: + type: "string" + html_url: + type: "string" + comments: + type: "string" + comments_url: + type: "string" + git_pull_url: + type: "string" + git_push_url: + type: "string" + created_at: + type: "string" + updated_at: + type: "string" + forks: + type: "string" + history: + type: "string" + description: "获取代码片段的commit" + example: + owner: "owner" + forks: "forks" + commits_url: "commits_url" + comments: "comments" + forks_url: "forks_url" + git_push_url: "git_push_url" + description: "description" + truncated: "truncated" + created_at: "created_at" + history: "history" + url: "url" + public: "public" + updated_at: "updated_at" + html_url: "html_url" + comments_url: "comments_url" + git_pull_url: "git_pull_url" + files: "files" + id: "id" + user: "user" + CodeComment: + type: "object" + properties: + id: + type: "string" + body: + type: "string" + created_at: + type: "string" + updated_at: + type: "string" + description: "修改代码片段的评论" + example: + updated_at: "updated_at" + created_at: "created_at" + id: "id" + body: "body" + CodeForks: + type: "object" + properties: + user: + type: "string" + url: + type: "string" + id: + type: "string" + created_at: + type: "string" + updated_at: + type: "string" + description: "获取 Fork 了指定代码片段的列表" + example: + updated_at: "updated_at" + created_at: "created_at" + id: "id" + user: "user" + url: "url" + GroupDetail: + type: "object" + properties: + id: + type: "integer" + format: "int32" + login: + type: "string" + url: + type: "string" + avatar_url: + type: "string" + repos_url: + type: "string" + events_url: + type: "string" + members_url: + type: "string" + description: + type: "string" + name: + type: "string" + created_at: + type: "string" + type: + type: "string" + location: + type: "string" + email: + type: "string" + html_url: + type: "string" + public: + type: "string" + enterprise: + type: "string" + members: + type: "string" + public_repos: + type: "string" + private_repos: + type: "string" + owner: + type: "string" + description: "更新授权用户所管理的组织资料" + example: + owner: "owner" + repos_url: "repos_url" + members_url: "members_url" + enterprise: "enterprise" + description: "description" + created_at: "created_at" + login: "login" + type: "type" + url: "url" + private_repos: "private_repos" + avatar_url: "avatar_url" + public: "public" + events_url: "events_url" + html_url: "html_url" + members: "members" + name: "name" + location: "location" + id: 0 + public_repos: "public_repos" + email: "email" + EnterpriseMember: + type: "object" + properties: + url: + type: "string" + active: + type: "string" + remark: + type: "string" + role: + type: "string" + outsourced: + type: "string" + enterprise: + $ref: "#/definitions/EnterpriseBasic" + user: + type: "string" + description: "修改企业成员权限或备注" + example: + role: "role" + enterprise: + path: "path" + avatar_url: "avatar_url" + name: "name" + id: 0 + url: "url" + outsourced: "outsourced" + active: "active" + remark: "remark" + user: "user" + url: "url" + WeekReport: + type: "object" + properties: + id: + type: "integer" + format: "int32" + content: + type: "string" + content_html: + type: "string" + year: + type: "string" + month: + type: "string" + week_index: + type: "string" + week_begin: + type: "string" + week_end: + type: "string" + created_at: + type: "string" + updated_at: + type: "string" + user: + $ref: "#/definitions/UserMini" + description: "新建周报" + example: + month: "month" + updated_at: "updated_at" + year: "year" + created_at: "created_at" + id: 0 + week_index: "week_index" + week_begin: "week_begin" + week_end: "week_end" + user: + avatar_url: "avatar_url" + html_url: "html_url" + name: "name" + id: 6 + login: "login" + url: "url" + content: "content" + content_html: "content_html" + UserMini: + type: "object" + properties: + id: + type: "integer" + format: "int32" + login: + type: "string" + name: + type: "string" + avatar_url: + type: "string" + url: + type: "string" + html_url: + type: "string" + example: + avatar_url: "avatar_url" + html_url: "html_url" + name: "name" + id: 6 + login: "login" + url: "url" + UserNotificationCount: + type: "object" + properties: + total_count: + type: "integer" + format: "int32" + description: "通知总数" + notification_count: + type: "integer" + format: "int32" + description: "通知数量" + message_count: + type: "integer" + format: "int32" + description: "私信数量" + description: "获取授权用户的通知数" + example: + total_count: 0 + notification_count: 6 + message_count: 1 + UserMessageList: + type: "object" + properties: + total_count: + type: "integer" + format: "int32" + list: + type: "array" + description: "私信列表" + items: + $ref: "#/definitions/UserMessage" + description: "列出授权用户的所有私信" + example: + total_count: 0 + list: + - updated_at: "updated_at" + sender: + gists_url: "gists_url" + repos_url: "repos_url" + following_url: "following_url" + starred_url: "starred_url" + login: "login" + followers_url: "followers_url" + type: "type" + url: "url" + subscriptions_url: "subscriptions_url" + received_events_url: "received_events_url" + avatar_url: "avatar_url" + events_url: "events_url" + html_url: "html_url" + name: "name" + site_admin: "site_admin" + id: 5 + organizations_url: "organizations_url" + unread: "unread" + html_url: "html_url" + id: 6 + content: "content" + url: "url" + - updated_at: "updated_at" + sender: + gists_url: "gists_url" + repos_url: "repos_url" + following_url: "following_url" + starred_url: "starred_url" + login: "login" + followers_url: "followers_url" + type: "type" + url: "url" + subscriptions_url: "subscriptions_url" + received_events_url: "received_events_url" + avatar_url: "avatar_url" + events_url: "events_url" + html_url: "html_url" + name: "name" + site_admin: "site_admin" + id: 5 + organizations_url: "organizations_url" + unread: "unread" + html_url: "html_url" + id: 6 + content: "content" + url: "url" + UserMessage: + type: "object" + properties: + id: + type: "integer" + format: "int32" + sender: + description: "发送者" + $ref: "#/definitions/UserBasic" + unread: + type: "string" + content: + type: "string" + updated_at: + type: "string" + url: + type: "string" + html_url: + type: "string" + description: "获取一条私信" + example: + updated_at: "updated_at" + sender: + gists_url: "gists_url" + repos_url: "repos_url" + following_url: "following_url" + starred_url: "starred_url" + login: "login" + followers_url: "followers_url" + type: "type" + url: "url" + subscriptions_url: "subscriptions_url" + received_events_url: "received_events_url" + avatar_url: "avatar_url" + events_url: "events_url" + html_url: "html_url" + name: "name" + site_admin: "site_admin" + id: 5 + organizations_url: "organizations_url" + unread: "unread" + html_url: "html_url" + id: 6 + content: "content" + url: "url" + BasicInfo: + type: "object" + properties: + label: + type: "string" + ref: + type: "string" + sha: + type: "string" + user: + $ref: "#/definitions/UserBasic" + repo: + $ref: "#/definitions/Project" + description: "basic information" + PullRequestUpdateParam: + type: "object" + properties: + access_token: + type: "string" + description: "用户授权码" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + title: + type: "string" + description: "可选。Pull Request 标题" + x-exportParamName: "Title" + x-optionalDataType: "String" + body: + type: "string" + description: "可选。Pull Request 内容" + x-exportParamName: "Body" + x-optionalDataType: "String" + state: + type: "string" + description: "可选。Pull Request 状态" + enum: + - "open" + - "closed" + x-exportParamName: "State" + x-optionalDataType: "String" + milestone_number: + type: "integer" + format: "int32" + description: "可选。里程碑序号(id)" + x-exportParamName: "MilestoneNumber" + x-optionalDataType: "Int32" + labels: + type: "string" + description: "用逗号分开的标签,名称要求长度在 2-20 之间且非特殊字符。如: bug,performance" + x-exportParamName: "Labels" + x-optionalDataType: "String" + description: "update pull request information" + example: + access_token: "access_token" + milestone_number: 0 + state: "open" + title: "title" + body: "body" + labels: "labels" + IssueUpdateParam: + type: "object" + properties: + access_token: + type: "string" + description: "用户授权码" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + repo: + type: "string" + description: "仓库路径(path)" + x-exportParamName: "Repo" + x-optionalDataType: "String" + title: + type: "string" + description: "Issue标题" + x-exportParamName: "Title" + x-optionalDataType: "String" + state: + type: "string" + description: "Issue 状态,open(开启的)、progressing(进行中)、closed(关闭的)" + enum: + - "open" + - "progressing" + - "closed" + x-exportParamName: "State" + x-optionalDataType: "String" + body: + type: "string" + description: "Issue描述" + x-exportParamName: "Body" + x-optionalDataType: "String" + assignee: + type: "string" + description: "Issue负责人的username" + x-exportParamName: "Assignee" + x-optionalDataType: "String" + milestone: + type: "integer" + format: "int32" + description: "里程碑序号" + x-exportParamName: "Milestone" + x-optionalDataType: "Int32" + labels: + type: "string" + description: "用逗号分开的标签,名称要求长度在 2-20 之间且非特殊字符。如: bug,performance" + x-exportParamName: "Labels" + x-optionalDataType: "String" + program: + type: "string" + description: "项目ID" + x-exportParamName: "Program" + x-optionalDataType: "String" + description: "update issue information" + example: + access_token: "access_token" + milestone: 0 + repo: "repo" + state: "open" + assignee: "assignee" + program: "program" + title: "title" + body: "body" + labels: "labels" + RepositoryPostParam: + type: "object" + properties: + access_token: + type: "string" + description: "用户授权码" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + name: + type: "string" + description: "仓库名称" + x-exportParamName: "Name" + description: + type: "string" + description: "仓库描述" + x-exportParamName: "Description" + x-optionalDataType: "String" + homepage: + type: "string" + description: "主页(eg: https://gitee.com)" + x-exportParamName: "Homepage" + x-optionalDataType: "String" + has_issues: + type: "boolean" + description: "允许提Issue与否。默认: 允许(true)" + default: true + x-exportParamName: "HasIssues" + x-optionalDataType: "Bool" + has_wiki: + type: "boolean" + description: "提供Wiki与否。默认: 提供(true)" + default: true + x-exportParamName: "HasWiki" + x-optionalDataType: "Bool" + public: + type: "integer" + format: "int32" + description: "仓库开源类型。0(私有), 1(外部开源), 2(内部开源),注:与private互斥,以public为主。" + enum: + - 0 + - 1 + - 2 + x-exportParamName: "Public" + x-optionalDataType: "Int32" + private: + type: "boolean" + description: "仓库公开或私有。默认: 公开(false),注:与public互斥,以public为主。" + x-exportParamName: "Private" + x-optionalDataType: "Bool" + auto_init: + type: "boolean" + description: "值为true时则会用README初始化仓库。默认: 不初始化(false)" + x-exportParamName: "AutoInit" + x-optionalDataType: "Bool" + gitignore_template: + type: "string" + description: "Git Ingore模版" + enum: + - "Actionscript" + - "Ada" + - "Agda" + - "Android" + - "AppEngine" + - "AppceleratorTitanium" + - "ArchLinuxPackages" + - "Autotools" + - "C" + - "C++" + - "CFWheels" + - "CMake" + - "CUDA" + - "CakePHP" + - "ChefCookbook" + - "Clojure" + - "CodeIgniter" + - "CommonLisp" + - "Composer" + - "Concrete5" + - "Coq" + - "CraftCMS" + - "D" + - "DM" + - "Dart" + - "Delphi" + - "Drupal" + - "EPiServer" + - "Eagle" + - "Elisp" + - "Elixir" + - "Elm" + - "Erlang" + - "ExpressionEngine" + - "ExtJs" + - "Fancy" + - "Finale" + - "Flutter" + - "ForceDotCom" + - "Fortran" + - "FuelPHP" + - "GWT" + - "Gcov" + - "GitBook" + - "Global/Anjuta" + - "Global/Ansible" + - "Global/Archives" + - "Global/Backup" + - "Global/Bazaar" + - "Global/BricxCC" + - "Global/CVS" + - "Global/Calabash" + - "Global/Cloud9" + - "Global/CodeKit" + - "Global/DartEditor" + - "Global/Diff" + - "Global/Dreamweaver" + - "Global/Dropbox" + - "Global/Eclipse" + - "Global/EiffelStudio" + - "Global/Emacs" + - "Global/Ensime" + - "Global/Espresso" + - "Global/FlexBuilder" + - "Global/GPG" + - "Global/Images" + - "Global/JDeveloper" + - "Global/JEnv" + - "Global/JetBrains" + - "Global/KDevelop4" + - "Global/Kate" + - "Global/Lazarus" + - "Global/LibreOffice" + - "Global/Linux" + - "Global/LyX" + - "Global/MATLAB" + - "Global/Mercurial" + - "Global/MicrosoftOffice" + - "Global/ModelSim" + - "Global/Momentics" + - "Global/MonoDevelop" + - "Global/NetBeans" + - "Global/Ninja" + - "Global/NotepadPP" + - "Global/Octave" + - "Global/Otto" + - "Global/PSoCCreator" + - "Global/Patch" + - "Global/PuTTY" + - "Global/Redcar" + - "Global/Redis" + - "Global/SBT" + - "Global/SVN" + - "Global/SlickEdit" + - "Global/Stata" + - "Global/SublimeText" + - "Global/SynopsysVCS" + - "Global/Tags" + - "Global/TextMate" + - "Global/TortoiseGit" + - "Global/Vagrant" + - "Global/Vim" + - "Global/VirtualEnv" + - "Global/Virtuoso" + - "Global/VisualStudioCode" + - "Global/WebMethods" + - "Global/Windows" + - "Global/Xcode" + - "Global/XilinxISE" + - "Global/macOS" + - "Go" + - "Godot" + - "Gradle" + - "Grails" + - "Haskell" + - "IGORPro" + - "Idris" + - "JBoss" + - "Java" + - "Jekyll" + - "Joomla" + - "Julia" + - "KiCad" + - "Kohana" + - "Kotlin" + - "LabVIEW" + - "Laravel" + - "Leiningen" + - "LemonStand" + - "Lilypond" + - "Lithium" + - "Lua" + - "Magento" + - "Maven" + - "Mercury" + - "MetaProgrammingSystem" + - "MiniProgram" + - "Nanoc" + - "Nim" + - "Node" + - "OCaml" + - "Objective-C" + - "Opa" + - "OpenCart" + - "OracleForms" + - "Packer" + - "Perl" + - "Perl6" + - "Phalcon" + - "PlayFramework" + - "Plone" + - "Prestashop" + - "Processing" + - "PureScript" + - "Python" + - "Qooxdoo" + - "Qt" + - "R" + - "ROS" + - "Rails" + - "RhodesRhomobile" + - "Ruby" + - "Rust" + - "SCons" + - "Sass" + - "Scala" + - "Scheme" + - "Scrivener" + - "Sdcc" + - "SeamGen" + - "SketchUp" + - "Smalltalk" + - "Stella" + - "SugarCRM" + - "Swift" + - "Symfony" + - "SymphonyCMS" + - "TeX" + - "Terraform" + - "Textpattern" + - "TurboGears2" + - "Typo3" + - "Umbraco" + - "Unity" + - "UnrealEngine" + - "VVVV" + - "VisualStudio" + - "Waf" + - "WordPress" + - "Xojo" + - "Yeoman" + - "Yii" + - "ZendFramework" + - "Zephir" + x-exportParamName: "GitignoreTemplate" + x-optionalDataType: "String" + license_template: + type: "string" + description: "License模版" + enum: + - "MulanPSL-1.0" + - "AFL-3.0" + - "AGPL-3.0" + - "Apache-2.0" + - "Artistic-2.0" + - "BSD-2-Clause" + - "BSD-3-Clause" + - "BSD-3-Clause-Clear" + - "BSL-1.0" + - "CC-BY-4.0" + - "CC-BY-SA-4.0" + - "CC0-1.0" + - "ECL-2.0" + - "EPL-1.0" + - "EUPL-1.1" + - "GPL-2.0" + - "GPL-3.0" + - "ISC" + - "LGPL-2.1" + - "LGPL-3.0" + - "LPPL-1.3c" + - "MIT" + - "MPL-2.0" + - "MS-PL" + - "MS-RL" + - "NCSA" + - "OFL-1.1" + - "OSL-3.0" + - "PostgreSQL" + - "Unlicense" + - "WTFPL" + - "Zlib" + x-exportParamName: "LicenseTemplate" + x-optionalDataType: "String" + description: "create repository" + example: + access_token: "access_token" + auto_init: true + gitignore_template: "Actionscript" + license_template: "MulanPSL-1.0" + private: true + has_wiki: true + public: 0 + name: "name" + description: "description" + has_issues: true + homepage: "homepage" + ProjectMemberPutParam: + type: "object" + properties: + access_token: + type: "string" + description: "用户授权码" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + permission: + type: "string" + description: "成员权限: 拉代码(pull),推代码(push),管理员(admin)。默认: push" + enum: + - "pull" + - "push" + - "admin" + default: "push" + x-exportParamName: "Permission" + description: "create project member" + example: + access_token: "access_token" + permission: "push" + PullRequestCommentPostParam: + type: "object" + properties: + access_token: + type: "string" + description: "用户授权码" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + body: + type: "string" + description: "必填。评论内容" + x-exportParamName: "Body" + commit_id: + type: "string" + description: "可选。PR代码评论的commit id" + x-exportParamName: "CommitId" + x-optionalDataType: "String" + path: + type: "string" + description: "可选。PR代码评论的文件名" + x-exportParamName: "Path" + x-optionalDataType: "String" + position: + type: "integer" + format: "int32" + description: "可选。PR代码评论diff中的行数" + x-exportParamName: "Position" + x-optionalDataType: "Int32" + description: "create pull request comment" + example: + access_token: "access_token" + path: "path" + position: 0 + body: "body" + commit_id: "commit_id" + PullRequestMergePutParam: + type: "object" + properties: + access_token: + type: "string" + description: "用户授权码" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + merge_method: + type: "string" + description: "可选。合并PR的方法,merge(合并所有提交)和 squash(扁平化分支合并)。默认为merge。" + enum: + - "merge" + - "squash" + default: "merge" + x-exportParamName: "MergeMethod" + x-optionalDataType: "String" + prune_source_branch: + type: "boolean" + description: "可选。合并PR后是否删除源分支,默认false(不删除)" + x-exportParamName: "PruneSourceBranch" + x-optionalDataType: "Bool" + title: + type: "string" + description: "可选。合并标题,默认为PR的标题" + x-exportParamName: "Title" + x-optionalDataType: "String" + description: + type: "string" + description: "可选。合并描述,默认为 \"Merge pull request !{pr_id} from {author}/{source_branch}\"\ + ,与页面显示的默认一致。" + x-exportParamName: "Description" + x-optionalDataType: "String" + description: "merge pull request parameter" + example: + access_token: "access_token" + path: "path" + position: 0 + body: "body" + commit_id: "commit_id" + IssueCommentPostParam: + type: "object" + properties: + access_token: + type: "string" + description: "用户授权码" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + body: + type: "string" + description: "The contents of the comment" + x-exportParamName: "Body" + x-optionalDataType: "String" + example: + access_token: "access_token" + body: "body" + BranchProtectionPutParam: + type: "object" + properties: + access_token: + type: "string" + description: "用户授权码" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + description: "branch protection parameter" + example: + access_token: "access_token" + RepoPatchParam: + type: "object" + properties: + access_token: + type: "string" + description: "用户授权码" + x-exportParamName: "AccessToken" + x-optionalDataType: "String" + name: + type: "string" + description: "仓库名称" + x-exportParamName: "Name" + x-optionalDataType: "String" + description: + type: "string" + description: "仓库描述" + x-exportParamName: "Description" + x-optionalDataType: "String" + homepage: + type: "string" + description: "主页(eg: https://gitee.com)" + x-exportParamName: "Homepage" + x-optionalDataType: "String" + has_issues: + type: "string" + description: "允许提Issue与否。默认: 允许(true)" + default: "true" + x-exportParamName: "HasIssues" + x-optionalDataType: "String" + has_wiki: + type: "string" + description: "提供Wiki与否。默认: 提供(true)" + default: "true" + x-exportParamName: "HasWiki" + x-optionalDataType: "String" + private: + type: "string" + description: "仓库公开或私有。" + x-exportParamName: "Private" + x-optionalDataType: "String" + default_branch: + type: "string" + description: "更新默认分支" + x-exportParamName: "DefaultBranch" + x-optionalDataType: "String" + description: "repo patch parameter" + example: + access_token: "access_token" + name: "name" + description: "description" + homepage: "https://gitee.com" + has_issues: "true" + has_wiki: "true" + private: "false" + default_branch: "master" -- Gitee