From 146385abc9e69192efdc58af5d7cba3048f55956 Mon Sep 17 00:00:00 2001 From: georgecao Date: Thu, 23 Apr 2020 23:07:44 +0800 Subject: [PATCH 1/3] modify swagger.yaml for gitee api:GetV5ReposOwnerRepoBranchesBranch --- README.md | 1 + api/swagger.yaml | 24 +++++++++++++++++++++++- docs/BranchCommit.md | 15 +++++++++++++++ gitee/model_branch_commit.go | 19 +++++++++++++++++++ gitee/model_complete_branch.go | 2 +- gitee/model_pull_request_files.go | 12 ------------ 6 files changed, 59 insertions(+), 14 deletions(-) create mode 100644 docs/BranchCommit.md create mode 100644 gitee/model_branch_commit.go diff --git a/README.md b/README.md index b8f004f..3ae6091 100644 --- a/README.md +++ b/README.md @@ -253,6 +253,7 @@ Class | Method | HTTP request | Description - [BasicInfo](docs/BasicInfo.md) - [Blob](docs/Blob.md) - [Branch](docs/Branch.md) + - [BranchCommit](docs/BranchCommit.md) - [BranchProtectionPutParam](docs/BranchProtectionPutParam.md) - [Code](docs/Code.md) - [CodeComment](docs/CodeComment.md) diff --git a/api/swagger.yaml b/api/swagger.yaml index e3e7e81..6c214f1 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -13119,7 +13119,7 @@ definitions: name: type: "string" commit: - type: "string" + $ref: "#/definitions/BranchCommit" _links: type: "string" protected: @@ -16214,3 +16214,25 @@ definitions: committer[email]: "testcommiteremail" author[name]: "testauthor" author[email]: "testauthoremail" + BranchCommit: + type: "object" + properties: + sha: + type: "string" + url: + type: "string" + commit: + type: "string" + author: + type: "string" + parents: + type: "string" + committer: + type: "string" + example: + sha: "4305c9f5e855c5606dee104c9f153fefb6228153" + url: "https://gitee.com/testowner/testrepo/tree/master" + commit: "commitinfo" + author: "author" + parents: "testparent" + committer: "testcommiter" diff --git a/docs/BranchCommit.md b/docs/BranchCommit.md new file mode 100644 index 0000000..ce37499 --- /dev/null +++ b/docs/BranchCommit.md @@ -0,0 +1,15 @@ +# BranchCommit + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Sha** | **string** | | [optional] [default to null] +**Url** | **string** | | [optional] [default to null] +**Commit** | **string** | | [optional] [default to null] +**Author** | **string** | | [optional] [default to null] +**Parents** | **string** | | [optional] [default to null] +**Committer** | **string** | | [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/gitee/model_branch_commit.go b/gitee/model_branch_commit.go new file mode 100644 index 0000000..f06087a --- /dev/null +++ b/gitee/model_branch_commit.go @@ -0,0 +1,19 @@ +/* + * 码云 Open API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 5.3.2 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package gitee + +type BranchCommit struct { + Sha string `json:"sha,omitempty"` + Url string `json:"url,omitempty"` + Commit string `json:"commit,omitempty"` + Author string `json:"author,omitempty"` + Parents string `json:"parents,omitempty"` + Committer string `json:"committer,omitempty"` +} diff --git a/gitee/model_complete_branch.go b/gitee/model_complete_branch.go index df48bc0..bbe31f0 100644 --- a/gitee/model_complete_branch.go +++ b/gitee/model_complete_branch.go @@ -12,7 +12,7 @@ package gitee // 创建分支 type CompleteBranch struct { Name string `json:"name,omitempty"` - Commit string `json:"commit,omitempty"` + Commit *BranchCommit `json:"commit,omitempty"` Links string `json:"_links,omitempty"` Protected string `json:"protected,omitempty"` ProtectionUrl string `json:"protection_url,omitempty"` diff --git a/gitee/model_pull_request_files.go b/gitee/model_pull_request_files.go index b1b80f0..bff3c4e 100644 --- a/gitee/model_pull_request_files.go +++ b/gitee/model_pull_request_files.go @@ -9,18 +9,6 @@ package gitee -type PRFilePath struct { - Diff string `json:"diff,omitempty"` - Newpath string `json:"new_path,omitempty"` - Oldpath string `json:"old_path,omitempty"` - Amode string `json:"a_mode,omitempty"` - Bmode string `json:"b_mode,omitempty"` - Newfile bool `json:"new_file,omitempty"` - Renamefile bool `json:"renamed_file,omitempty"` - Deletefile bool `json:"deleted_file,omitempty"` - Toolarge bool `json:"too_large,omitempty"` -} - // Pull Request Commit文件列表。最多显示300条diff type PullRequestFiles struct { Sha string `json:"sha,omitempty"` -- Gitee From 7f923022c52fc8147a26bc927e761e726d293373 Mon Sep 17 00:00:00 2001 From: georgecao Date: Fri, 24 Apr 2020 10:13:52 +0800 Subject: [PATCH 2/3] solve conflict --- docs/BranchCommit.md | 6 +----- gitee/model_branch_commit.go | 7 ++----- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/docs/BranchCommit.md b/docs/BranchCommit.md index ce37499..375e2a9 100644 --- a/docs/BranchCommit.md +++ b/docs/BranchCommit.md @@ -3,12 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Sha** | **string** | | [optional] [default to null] **Url** | **string** | | [optional] [default to null] -**Commit** | **string** | | [optional] [default to null] -**Author** | **string** | | [optional] [default to null] -**Parents** | **string** | | [optional] [default to null] -**Committer** | **string** | | [optional] [default to null] +**Sha** | **string** | | [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/gitee/model_branch_commit.go b/gitee/model_branch_commit.go index f06087a..247a836 100644 --- a/gitee/model_branch_commit.go +++ b/gitee/model_branch_commit.go @@ -9,11 +9,8 @@ package gitee +// 分支commit info type BranchCommit struct { - Sha string `json:"sha,omitempty"` Url string `json:"url,omitempty"` - Commit string `json:"commit,omitempty"` - Author string `json:"author,omitempty"` - Parents string `json:"parents,omitempty"` - Committer string `json:"committer,omitempty"` + Sha string `json:"sha,omitempty"` } -- Gitee From b7118730b8702838e787f1202a45ebdda8db7795 Mon Sep 17 00:00:00 2001 From: georgecao Date: Fri, 24 Apr 2020 10:24:06 +0800 Subject: [PATCH 3/3] solve conflict --- api/swagger.yaml | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/api/swagger.yaml b/api/swagger.yaml index 6c214f1..59ebe16 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -16214,25 +16214,3 @@ definitions: committer[email]: "testcommiteremail" author[name]: "testauthor" author[email]: "testauthoremail" - BranchCommit: - type: "object" - properties: - sha: - type: "string" - url: - type: "string" - commit: - type: "string" - author: - type: "string" - parents: - type: "string" - committer: - type: "string" - example: - sha: "4305c9f5e855c5606dee104c9f153fefb6228153" - url: "https://gitee.com/testowner/testrepo/tree/master" - commit: "commitinfo" - author: "author" - parents: "testparent" - committer: "testcommiter" -- Gitee