提交 b1105b99 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!3 modify repo patch method

Merge pull request !3 from xiangxinyong/modifyrepopatch
...@@ -294,6 +294,7 @@ Class | Method | HTTP request | Description ...@@ -294,6 +294,7 @@ Class | Method | HTTP request | Description
- [PullRequestUpdateParam](docs/PullRequestUpdateParam.md) - [PullRequestUpdateParam](docs/PullRequestUpdateParam.md)
- [Release](docs/Release.md) - [Release](docs/Release.md)
- [RepoCommit](docs/RepoCommit.md) - [RepoCommit](docs/RepoCommit.md)
- [RepoPatchParam](docs/RepoPatchParam.md)
- [RepositoryPostParam](docs/RepositoryPostParam.md) - [RepositoryPostParam](docs/RepositoryPostParam.md)
- [SshKey](docs/SshKey.md) - [SshKey](docs/SshKey.md)
- [SshKeyBasic](docs/SshKeyBasic.md) - [SshKeyBasic](docs/SshKeyBasic.md)
......
...@@ -3250,13 +3250,6 @@ paths: ...@@ -3250,13 +3250,6 @@ paths:
produces: produces:
- "application/json" - "application/json"
parameters: parameters:
- name: "access_token"
in: "formData"
description: "用户授权码"
required: false
type: "string"
x-exportParamName: "AccessToken"
x-optionalDataType: "String"
- name: "owner" - name: "owner"
in: "path" in: "path"
description: "仓库所属空间地址(企业、组织或个人的地址path)" description: "仓库所属空间地址(企业、组织或个人的地址path)"
...@@ -3269,56 +3262,13 @@ paths: ...@@ -3269,56 +3262,13 @@ paths:
required: true required: true
type: "string" type: "string"
x-exportParamName: "Repo" x-exportParamName: "Repo"
- name: "name" - in: "body"
in: "formData" name: "body"
description: "仓库名称" description: "repo patch param"
required: true required: true
type: "string" schema:
x-exportParamName: "Name" $ref: "#/definitions/RepoPatchParam"
- name: "description" x-exportParamName: "Body"
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: responses:
200: 200:
description: "返回格式" description: "返回格式"
...@@ -16056,4 +16006,59 @@ definitions: ...@@ -16056,4 +16006,59 @@ definitions:
x-optionalDataType: "String" x-optionalDataType: "String"
description: "branch protection parameter" description: "branch protection parameter"
example: example:
access_token: "access_token" access_token: "access_token"
\ No newline at end of file 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: "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"
private:
type: "boolean"
description: "仓库公开或私有。"
x-exportParamName: "Private"
x-optionalDataType: "Bool"
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"
# RepoPatchParam
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**AccessToken** | **string** | 用户授权码 | [optional] [default to null]
**Name** | **string** | 仓库名称 | [optional] [default to null]
**Description** | **string** | 仓库描述 | [optional] [default to null]
**Homepage** | **string** | 主页(eg: https://gitee.com) | [optional] [default to null]
**HasIssues** | **bool** | 允许提Issue与否。默认: 允许(true) | [optional] [default to null]
**HasWiki** | **bool** | 提供Wiki与否。默认: 提供(true) | [optional] [default to null]
**Private** | **bool** | 仓库公开或私有。 | [optional] [default to null]
**DefaultBranch** | **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)
...@@ -1583,7 +1583,7 @@ No authorization required ...@@ -1583,7 +1583,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) [[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)
# **PatchV5ReposOwnerRepo** # **PatchV5ReposOwnerRepo**
> Project PatchV5ReposOwnerRepo(ctx, owner, repo, name, optional) > Project PatchV5ReposOwnerRepo(ctx, owner, repo, body)
更新仓库设置 更新仓库设置
更新仓库设置 更新仓库设置
...@@ -1595,24 +1595,7 @@ Name | Type | Description | Notes ...@@ -1595,24 +1595,7 @@ Name | Type | Description | Notes
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**owner** | **string**| 仓库所属空间地址(企业、组织或个人的地址path) | **owner** | **string**| 仓库所属空间地址(企业、组织或个人的地址path) |
**repo** | **string**| 仓库路径(path) | **repo** | **string**| 仓库路径(path) |
**name** | **string**| 仓库名称 | **body** | [**RepoPatchParam**](RepoPatchParam.md)| repo patch param |
**optional** | ***PatchV5ReposOwnerRepoOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a PatchV5ReposOwnerRepoOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**accessToken** | **optional.String**| 用户授权码 |
**description** | **optional.String**| 仓库描述 |
**homepage** | **optional.String**| 主页(eg: https://gitee.com) |
**hasIssues** | **optional.Bool**| 允许提Issue与否。默认: 允许(true) | [default to true]
**hasWiki** | **optional.Bool**| 提供Wiki与否。默认: 提供(true) | [default to true]
**private** | **optional.Bool**| 仓库公开或私有。 |
**defaultBranch** | **optional.String**| 更新默认分支 |
### Return type ### Return type
......
...@@ -3851,30 +3851,11 @@ RepositoriesApiService 更新仓库设置 ...@@ -3851,30 +3851,11 @@ RepositoriesApiService 更新仓库设置
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param owner 仓库所属空间地址(企业、组织或个人的地址path) * @param owner 仓库所属空间地址(企业、组织或个人的地址path)
* @param repo 仓库路径(path) * @param repo 仓库路径(path)
* @param name 仓库名称 * @param body repo patch param
* @param optional nil or *PatchV5ReposOwnerRepoOpts - Optional Parameters:
* @param "AccessToken" (optional.String) - 用户授权码
* @param "Description" (optional.String) - 仓库描述
* @param "Homepage" (optional.String) - 主页(eg: https://gitee.com)
* @param "HasIssues" (optional.Bool) - 允许提Issue与否。默认: 允许(true)
* @param "HasWiki" (optional.Bool) - 提供Wiki与否。默认: 提供(true)
* @param "Private" (optional.Bool) - 仓库公开或私有。
* @param "DefaultBranch" (optional.String) - 更新默认分支
@return Project @return Project
*/ */
func (a *RepositoriesApiService) PatchV5ReposOwnerRepo(ctx context.Context, owner string, repo string, body RepoPatchParam) (Project, *http.Response, error) {
type PatchV5ReposOwnerRepoOpts struct {
AccessToken optional.String
Description optional.String
Homepage optional.String
HasIssues optional.Bool
HasWiki optional.Bool
Private optional.Bool
DefaultBranch optional.String
}
func (a *RepositoriesApiService) PatchV5ReposOwnerRepo(ctx context.Context, owner string, repo string, name string, localVarOptionals *PatchV5ReposOwnerRepoOpts) (Project, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Patch") localVarHttpMethod = strings.ToUpper("Patch")
localVarPostBody interface{} localVarPostBody interface{}
...@@ -3909,28 +3890,8 @@ func (a *RepositoriesApiService) PatchV5ReposOwnerRepo(ctx context.Context, owne ...@@ -3909,28 +3890,8 @@ func (a *RepositoriesApiService) PatchV5ReposOwnerRepo(ctx context.Context, owne
if localVarHttpHeaderAccept != "" { if localVarHttpHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
} }
if localVarOptionals != nil && localVarOptionals.AccessToken.IsSet() { // body params
localVarFormParams.Add("access_token", parameterToString(localVarOptionals.AccessToken.Value(), "")) localVarPostBody = &body
}
localVarFormParams.Add("name", parameterToString(name, ""))
if localVarOptionals != nil && localVarOptionals.Description.IsSet() {
localVarFormParams.Add("description", parameterToString(localVarOptionals.Description.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.Homepage.IsSet() {
localVarFormParams.Add("homepage", parameterToString(localVarOptionals.Homepage.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.HasIssues.IsSet() {
localVarFormParams.Add("has_issues", parameterToString(localVarOptionals.HasIssues.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.HasWiki.IsSet() {
localVarFormParams.Add("has_wiki", parameterToString(localVarOptionals.HasWiki.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.Private.IsSet() {
localVarFormParams.Add("private", parameterToString(localVarOptionals.Private.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.DefaultBranch.IsSet() {
localVarFormParams.Add("default_branch", parameterToString(localVarOptionals.DefaultBranch.Value(), ""))
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
if err != nil { if err != nil {
return localVarReturnValue, nil, err return localVarReturnValue, nil, err
......
/*
* 码云 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
// repo patch parameter
type RepoPatchParam struct {
// 用户授权码
AccessToken string `json:"access_token,omitempty"`
// 仓库名称
Name string `json:"name,omitempty"`
// 仓库描述
Description string `json:"description,omitempty"`
// 主页(eg: https://gitee.com)
Homepage string `json:"homepage,omitempty"`
// 允许提Issue与否。默认: 允许(true)
HasIssues bool `json:"has_issues,omitempty"`
// 提供Wiki与否。默认: 提供(true)
HasWiki bool `json:"has_wiki,omitempty"`
// 仓库公开或私有。
Private bool `json:"private,omitempty"`
// 更新默认分支
DefaultBranch string `json:"default_branch,omitempty"`
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册