modify add issue comment api

上级 17f9ce85
...@@ -271,6 +271,7 @@ Class | Method | HTTP request | Description ...@@ -271,6 +271,7 @@ Class | Method | HTTP request | Description
- [GroupMember](docs/GroupMember.md) - [GroupMember](docs/GroupMember.md)
- [Hook](docs/Hook.md) - [Hook](docs/Hook.md)
- [Issue](docs/Issue.md) - [Issue](docs/Issue.md)
- [IssueCommentPostParam](docs/IssueCommentPostParam.md)
- [IssueUpdateParam](docs/IssueUpdateParam.md) - [IssueUpdateParam](docs/IssueUpdateParam.md)
- [Label](docs/Label.md) - [Label](docs/Label.md)
- [Milestone](docs/Milestone.md) - [Milestone](docs/Milestone.md)
......
...@@ -2931,13 +2931,6 @@ paths: ...@@ -2931,13 +2931,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)"
...@@ -2956,11 +2949,12 @@ paths: ...@@ -2956,11 +2949,12 @@ paths:
required: true required: true
type: "string" type: "string"
x-exportParamName: "Number" x-exportParamName: "Number"
- name: "body" - in: "body"
in: "formData" name: "body"
description: "The contents of the comment." description: "Issue comment内容"
required: true required: true
type: "string" schema:
$ref: "#/definitions/IssueCommentPostParam"
x-exportParamName: "Body" x-exportParamName: "Body"
responses: responses:
201: 201:
...@@ -16007,3 +16001,19 @@ definitions: ...@@ -16007,3 +16001,19 @@ definitions:
position: 0 position: 0
body: "body" body: "body"
commit_id: "commit_id" 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"
# IssueCommentPostParam
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**AccessToken** | **string** | 用户授权码 | [optional] [default to null]
**Body** | **string** | The contents of the comment | [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)
...@@ -766,7 +766,7 @@ No authorization required ...@@ -766,7 +766,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)
# **PostV5ReposOwnerRepoIssuesNumberComments** # **PostV5ReposOwnerRepoIssuesNumberComments**
> Note PostV5ReposOwnerRepoIssuesNumberComments(ctx, owner, repo, number, body, optional) > Note PostV5ReposOwnerRepoIssuesNumberComments(ctx, owner, repo, number, body)
创建某个Issue评论 创建某个Issue评论
创建某个Issue评论 创建某个Issue评论
...@@ -779,19 +779,7 @@ Name | Type | Description | Notes ...@@ -779,19 +779,7 @@ Name | Type | Description | Notes
**owner** | **string**| 仓库所属空间地址(企业、组织或个人的地址path) | **owner** | **string**| 仓库所属空间地址(企业、组织或个人的地址path) |
**repo** | **string**| 仓库路径(path) | **repo** | **string**| 仓库路径(path) |
**number** | **string**| Issue 编号(区分大小写,无需添加 # 号) | **number** | **string**| Issue 编号(区分大小写,无需添加 # 号) |
**body** | **string**| The contents of the comment. | **body** | [**IssueCommentPostParam**](IssueCommentPostParam.md)| Issue comment内容 |
**optional** | ***PostV5ReposOwnerRepoIssuesNumberCommentsOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a PostV5ReposOwnerRepoIssuesNumberCommentsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**accessToken** | **optional.String**| 用户授权码 |
### Return type ### Return type
......
...@@ -2158,18 +2158,11 @@ IssuesApiService 创建某个Issue评论 ...@@ -2158,18 +2158,11 @@ IssuesApiService 创建某个Issue评论
* @param owner 仓库所属空间地址(企业、组织或个人的地址path) * @param owner 仓库所属空间地址(企业、组织或个人的地址path)
* @param repo 仓库路径(path) * @param repo 仓库路径(path)
* @param number Issue 编号(区分大小写,无需添加 # 号) * @param number Issue 编号(区分大小写,无需添加 # 号)
* @param body The contents of the comment. * @param body Issue comment内容
* @param optional nil or *PostV5ReposOwnerRepoIssuesNumberCommentsOpts - Optional Parameters:
* @param "AccessToken" (optional.String) - 用户授权码
@return Note @return Note
*/ */
func (a *IssuesApiService) PostV5ReposOwnerRepoIssuesNumberComments(ctx context.Context, owner string, repo string, number string, body IssueCommentPostParam) (Note, *http.Response, error) {
type PostV5ReposOwnerRepoIssuesNumberCommentsOpts struct {
AccessToken optional.String
}
func (a *IssuesApiService) PostV5ReposOwnerRepoIssuesNumberComments(ctx context.Context, owner string, repo string, number string, body string, localVarOptionals *PostV5ReposOwnerRepoIssuesNumberCommentsOpts) (Note, *http.Response, error) {
var ( var (
localVarHttpMethod = strings.ToUpper("Post") localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{} localVarPostBody interface{}
...@@ -2205,10 +2198,8 @@ func (a *IssuesApiService) PostV5ReposOwnerRepoIssuesNumberComments(ctx context. ...@@ -2205,10 +2198,8 @@ func (a *IssuesApiService) PostV5ReposOwnerRepoIssuesNumberComments(ctx context.
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("body", parameterToString(body, ""))
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
type IssueCommentPostParam struct {
// 用户授权码
AccessToken string `json:"access_token,omitempty"`
// The contents of the comment
Body string `json:"body,omitempty"`
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册