diff options
author | 6543 <6543@obermui.de> | 2019-12-31 09:21:21 +0100 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2019-12-31 03:21:21 -0500 |
commit | 9600c27085df3f895b2128f1b77aa0ce0b57e7f2 (patch) | |
tree | 9dfbbf44126e7c39b77558ec943c8a2b9a717b10 /templates | |
parent | 655aea13a5ad5dd51bcaafd1b96ecce2673f0312 (diff) | |
download | gitea-9600c27085df3f895b2128f1b77aa0ce0b57e7f2.tar.gz gitea-9600c27085df3f895b2128f1b77aa0ce0b57e7f2.zip |
[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>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/swagger/v1_json.tmpl | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 77def7aeab..f31b37cc45 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -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": { |