Skip to content

[Docs] Fix swagger description of reaction API #9617

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions routers/api/v1/repo/issue_reaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import (
api "code.gitea.io/gitea/modules/structs"
)

// GetIssueCommentReactions list reactions of a issue comment
// GetIssueCommentReactions list reactions of a comment from an issue
func GetIssueCommentReactions(ctx *context.APIContext) {
// swagger:operation GET /repos/{owner}/{repo}/issues/comments/{id}/reactions issue issueGetCommentReactions
// ---
// summary: Get a list reactions of a issue comment
// summary: Get a list of reactions from a comment of an issue
// consumes:
// - application/json
// produces:
Expand Down Expand Up @@ -83,11 +83,11 @@ func GetIssueCommentReactions(ctx *context.APIContext) {
ctx.JSON(http.StatusOK, result)
}

// PostIssueCommentReaction add a reaction to a comment of a issue
// PostIssueCommentReaction add a reaction to a comment of an issue
func PostIssueCommentReaction(ctx *context.APIContext, form api.EditReactionOption) {
// swagger:operation POST /repos/{owner}/{repo}/issues/comments/{id}/reactions issue issuePostCommentReaction
// ---
// summary: Add a reaction to a comment of a issue comment
// summary: Add a reaction to a comment of an issue
// consumes:
// - application/json
// produces:
Expand Down Expand Up @@ -124,11 +124,11 @@ func PostIssueCommentReaction(ctx *context.APIContext, form api.EditReactionOpti
changeIssueCommentReaction(ctx, form, true)
}

// DeleteIssueCommentReaction list reactions of a issue comment
// DeleteIssueCommentReaction remove a reaction from a comment of an issue
func DeleteIssueCommentReaction(ctx *context.APIContext, form api.EditReactionOption) {
// swagger:operation DELETE /repos/{owner}/{repo}/issues/comments/{id}/reactions issue issueDeleteCommentReaction
// ---
// summary: Remove a reaction from a comment of a issue comment
// summary: Remove a reaction from a comment of an issue
// consumes:
// - application/json
// produces:
Expand Down Expand Up @@ -219,11 +219,11 @@ func changeIssueCommentReaction(ctx *context.APIContext, form api.EditReactionOp
}
}

// GetIssueReactions list reactions of a issue comment
// GetIssueReactions list reactions of an issue
func GetIssueReactions(ctx *context.APIContext) {
// swagger:operation GET /repos/{owner}/{repo}/issues/{index}/reactions issue issueGetIssueReactions
// ---
// summary: Get a list reactions of a issue
// summary: Get a list reactions of an issue
// consumes:
// - application/json
// produces:
Expand Down Expand Up @@ -289,11 +289,11 @@ func GetIssueReactions(ctx *context.APIContext) {
ctx.JSON(http.StatusOK, result)
}

// PostIssueReaction add a reaction to a comment of a issue
// PostIssueReaction add a reaction to an issue
func PostIssueReaction(ctx *context.APIContext, form api.EditReactionOption) {
// swagger:operation POST /repos/{owner}/{repo}/issues/{index}/reactions issue issuePostIssueReaction
// ---
// summary: Add a reaction to a comment of a issue
// summary: Add a reaction to an issue
// consumes:
// - application/json
// produces:
Expand Down Expand Up @@ -330,11 +330,11 @@ func PostIssueReaction(ctx *context.APIContext, form api.EditReactionOption) {
changeIssueReaction(ctx, form, true)
}

// DeleteIssueReaction list reactions of a issue comment
// DeleteIssueReaction remove a reaction from an issue
func DeleteIssueReaction(ctx *context.APIContext, form api.EditReactionOption) {
// swagger:operation DELETE /repos/{owner}/{repo}/issues/{index}/reactions issue issueDeleteIssueReaction
// ---
// summary: Remove a reaction from a comment of a issue
// summary: Remove a reaction from an issue
// consumes:
// - application/json
// produces:
Expand Down
12 changes: 6 additions & 6 deletions templates/swagger/v1_json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3102,7 +3102,7 @@
"tags": [
"issue"
],
"summary": "Get a list reactions of a issue comment",
"summary": "Get a list of reactions from a comment of an issue",
"operationId": "issueGetCommentReactions",
"parameters": [
{
Expand Down Expand Up @@ -3147,7 +3147,7 @@
"tags": [
"issue"
],
"summary": "Add a reaction to a comment of a issue comment",
"summary": "Add a reaction to a comment of an issue",
"operationId": "issuePostCommentReaction",
"parameters": [
{
Expand Down Expand Up @@ -3202,7 +3202,7 @@
"tags": [
"issue"
],
"summary": "Remove a reaction from a comment of a issue comment",
"summary": "Remove a reaction from a comment of an issue",
"operationId": "issueDeleteCommentReaction",
"parameters": [
{
Expand Down Expand Up @@ -3871,7 +3871,7 @@
"tags": [
"issue"
],
"summary": "Get a list reactions of a issue",
"summary": "Get a list reactions of an issue",
"operationId": "issueGetIssueReactions",
"parameters": [
{
Expand Down Expand Up @@ -3916,7 +3916,7 @@
"tags": [
"issue"
],
"summary": "Add a reaction to a comment of a issue",
"summary": "Add a reaction to an issue",
"operationId": "issuePostIssueReaction",
"parameters": [
{
Expand Down Expand Up @@ -3971,7 +3971,7 @@
"tags": [
"issue"
],
"summary": "Remove a reaction from a comment of a issue",
"summary": "Remove a reaction from an issue",
"operationId": "issueDeleteIssueReaction",
"parameters": [
{
Expand Down