mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
[API] Fix 9544 | return 200 when reaction already exist (#9550)
* add ErrReactionAlreadyExist * extend CreateReaction * reaction already exist = 200 * extend FindReactionsOptions * refactor swagger options/definitions * fix swagger-validate * Update models/error.go Co-Authored-By: zeripath <art27@cantab.net> * fix test PART1 * extend FindReactionsOptions with UserID option * catch error on test * fix test PART2 * format ... Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <matti@mdranta.net>
This commit is contained in:
@@ -3130,7 +3130,7 @@
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/ReactionResponseList"
|
||||
"$ref": "#/responses/ReactionList"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/responses/forbidden"
|
||||
@@ -3181,8 +3181,11 @@
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/Reaction"
|
||||
},
|
||||
"201": {
|
||||
"$ref": "#/responses/ReactionResponse"
|
||||
"$ref": "#/responses/Reaction"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/responses/forbidden"
|
||||
@@ -3896,7 +3899,7 @@
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/ReactionResponseList"
|
||||
"$ref": "#/responses/ReactionList"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/responses/forbidden"
|
||||
@@ -3947,8 +3950,11 @@
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/Reaction"
|
||||
},
|
||||
"201": {
|
||||
"$ref": "#/responses/ReactionResponse"
|
||||
"$ref": "#/responses/Reaction"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/responses/forbidden"
|
||||
@@ -10822,8 +10828,8 @@
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
},
|
||||
"ReactionResponse": {
|
||||
"description": "ReactionResponse contain one reaction",
|
||||
"Reaction": {
|
||||
"description": "Reaction contain one reaction",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content": {
|
||||
@@ -11735,12 +11741,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"EditReactionOption": {
|
||||
"description": "EditReactionOption",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/EditReactionOption"
|
||||
}
|
||||
},
|
||||
"EmailList": {
|
||||
"description": "EmailList",
|
||||
"schema": {
|
||||
@@ -11927,18 +11927,18 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"ReactionResponse": {
|
||||
"description": "ReactionResponse",
|
||||
"Reaction": {
|
||||
"description": "Reaction",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ReactionResponse"
|
||||
"$ref": "#/definitions/Reaction"
|
||||
}
|
||||
},
|
||||
"ReactionResponseList": {
|
||||
"description": "ReactionResponseList",
|
||||
"ReactionList": {
|
||||
"description": "ReactionList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/ReactionResponse"
|
||||
"$ref": "#/definitions/Reaction"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -12164,7 +12164,7 @@
|
||||
"parameterBodies": {
|
||||
"description": "parameterBodies",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/RepoTopicOptions"
|
||||
"$ref": "#/definitions/EditReactionOption"
|
||||
}
|
||||
},
|
||||
"redirect": {
|
||||
|
Reference in New Issue
Block a user