modify add issue comment api

上级 17f9ce85
......@@ -271,6 +271,7 @@ Class | Method | HTTP request | Description
- [GroupMember](docs/GroupMember.md)
- [Hook](docs/Hook.md)
- [Issue](docs/Issue.md)
- [IssueCommentPostParam](docs/IssueCommentPostParam.md)
- [IssueUpdateParam](docs/IssueUpdateParam.md)
- [Label](docs/Label.md)
- [Milestone](docs/Milestone.md)
......
......@@ -2931,13 +2931,6 @@ paths:
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)"
......@@ -2956,11 +2949,12 @@ paths:
required: true
type: "string"
x-exportParamName: "Number"
- name: "body"
in: "formData"
description: "The contents of the comment."
- in: "body"
name: "body"
description: "Issue comment内容"
required: true
type: "string"
schema:
$ref: "#/definitions/IssueCommentPostParam"
x-exportParamName: "Body"
responses:
201:
......@@ -16007,3 +16001,19 @@ definitions:
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"
# 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
[[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**
> Note PostV5ReposOwnerRepoIssuesNumberComments(ctx, owner, repo, number, body, optional)
> Note PostV5ReposOwnerRepoIssuesNumberComments(ctx, owner, repo, number, body)
创建某个Issue评论
创建某个Issue评论
......@@ -779,19 +779,7 @@ Name | Type | Description | Notes
**owner** | **string**| 仓库所属空间地址(企业、组织或个人的地址path) |
**repo** | **string**| 仓库路径(path) |
**number** | **string**| Issue 编号(区分大小写,无需添加 # 号) |
**body** | **string**| The contents of the 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**| 用户授权码 |
**body** | [**IssueCommentPostParam**](IssueCommentPostParam.md)| Issue comment内容 |
### Return type
......
......@@ -2158,18 +2158,11 @@ IssuesApiService 创建某个Issue评论
* @param owner 仓库所属空间地址(企业、组织或个人的地址path)
* @param repo 仓库路径(path)
* @param number Issue 编号(区分大小写,无需添加 # 号)
* @param body The contents of the comment.
* @param optional nil or *PostV5ReposOwnerRepoIssuesNumberCommentsOpts - Optional Parameters:
* @param "AccessToken" (optional.String) - 用户授权码
* @param body Issue comment内容
@return Note
*/
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) {
func (a *IssuesApiService) PostV5ReposOwnerRepoIssuesNumberComments(ctx context.Context, owner string, repo string, number string, body IssueCommentPostParam) (Note, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{}
......@@ -2205,10 +2198,8 @@ func (a *IssuesApiService) PostV5ReposOwnerRepoIssuesNumberComments(ctx context.
if localVarHttpHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
}
if localVarOptionals != nil && localVarOptionals.AccessToken.IsSet() {
localVarFormParams.Add("access_token", parameterToString(localVarOptionals.AccessToken.Value(), ""))
}
localVarFormParams.Add("body", parameterToString(body, ""))
// body params
localVarPostBody = &body
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
if err != nil {
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.
先完成此消息的编辑!
想要评论请 注册