From 5e94c20e2c3fd98f817ac07c6471396ee4144f1d Mon Sep 17 00:00:00 2001 From: xwzQmxx <1499273991@qq.com> Date: Thu, 24 Jun 2021 20:02:47 +0800 Subject: [PATCH 1/2] add update issue param --- api/swagger.yaml | 5 +++++ gitee/model_issue_update_param.go | 2 ++ 2 files changed, 7 insertions(+) diff --git a/api/swagger.yaml b/api/swagger.yaml index 008b9a2..5f75bd5 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -15937,6 +15937,11 @@ definitions: description: "项目ID" x-exportParamName: "Program" x-optionalDataType: "String" + collaborators: + type: "string" + description: "Issue协助者的个人空间地址, 以 , 分隔" + x-exportParamName: "Collaborators" + x-optionalDataType: "String" description: "update issue information" example: access_token: "access_token" diff --git a/gitee/model_issue_update_param.go b/gitee/model_issue_update_param.go index 3f682fa..90f0cc9 100644 --- a/gitee/model_issue_update_param.go +++ b/gitee/model_issue_update_param.go @@ -29,4 +29,6 @@ type IssueUpdateParam struct { Labels string `json:"labels,omitempty"` // 项目ID Program string `json:"program,omitempty"` + // Issue协助者的个人空间地址, 以 , 分隔 + Collaborators string `json:"collaborators,omitempty"` } -- Gitee From 936b75f3c39b25795117d85a36bac7e35b2f9a0b Mon Sep 17 00:00:00 2001 From: xwzQmxx <1499273991@qq.com> Date: Fri, 25 Jun 2021 09:45:52 +0800 Subject: [PATCH 2/2] fix issue --- api/swagger.yaml | 4 +++- docs/IssueUpdateParam.md | 1 + docs/RepositoriesApi.md | 4 ++-- gitee/api_repositories.go | 8 ++++---- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/api/swagger.yaml b/api/swagger.yaml index 5f75bd5..1da9bf1 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -6400,7 +6400,9 @@ paths: 200: description: "返回格式" schema: - $ref: "#/definitions/Project" + type: "array" + items: + $ref: "#/definitions/Project" post: tags: - "Repositories" diff --git a/docs/IssueUpdateParam.md b/docs/IssueUpdateParam.md index 6ae4e0a..6351fd1 100644 --- a/docs/IssueUpdateParam.md +++ b/docs/IssueUpdateParam.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **Milestone** | **int32** | 里程碑序号 | [optional] [default to null] **Labels** | **string** | 用逗号分开的标签,名称要求长度在 2-20 之间且非特殊字符。如: bug,performance | [optional] [default to null] **Program** | **string** | 项目ID | [optional] [default to null] +**Collaborators** | **string** | Issue协助者的个人空间地址, 以 , 分隔 | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RepositoriesApi.md b/docs/RepositoriesApi.md index b0b065e..7b898a1 100644 --- a/docs/RepositoriesApi.md +++ b/docs/RepositoriesApi.md @@ -1502,7 +1502,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **GetV5UserRepos** -> Project GetV5UserRepos(ctx, optional) +> []Project GetV5UserRepos(ctx, optional) 列出授权用户的所有仓库 列出授权用户的所有仓库 @@ -1530,7 +1530,7 @@ Name | Type | Description | Notes ### Return type -[**Project**](Project.md) +[**[]Project**](Project.md) ### Authorization diff --git a/gitee/api_repositories.go b/gitee/api_repositories.go index 1b5ab7e..4639811 100644 --- a/gitee/api_repositories.go +++ b/gitee/api_repositories.go @@ -3614,7 +3614,7 @@ RepositoriesApiService 列出授权用户的所有仓库 * @param "Page" (optional.Int32) - 当前的页码 * @param "PerPage" (optional.Int32) - 每页的数量,最大为 100 -@return Project +@return []Project */ type GetV5UserReposOpts struct { @@ -3628,13 +3628,13 @@ type GetV5UserReposOpts struct { PerPage optional.Int32 } -func (a *RepositoriesApiService) GetV5UserRepos(ctx context.Context, localVarOptionals *GetV5UserReposOpts) (Project, *http.Response, error) { +func (a *RepositoriesApiService) GetV5UserRepos(ctx context.Context, localVarOptionals *GetV5UserReposOpts) ([]Project, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - localVarReturnValue Project + localVarReturnValue []Project ) // create path and map variables @@ -3716,7 +3716,7 @@ func (a *RepositoriesApiService) GetV5UserRepos(ctx context.Context, localVarOpt } if localVarHttpResponse.StatusCode == 200 { - var v Project + var v []Project err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() -- Gitee