Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-22 09:54:24 +01:00

[GITEA] Document correct status code for creating Tag

- When there's a succesful POST operation, it should return a 201 status
code (which is the status code for succesful created) and additionally
the created object.
- Currently for the `POST /repos/{owner}/{repo}/tags` endpoint an 200
status code was documented in the OpenAPI specification, while an 201
status code was actually being returned. In this case the code is
correct and the documented status code needs to be adjusted.
- Resolves #2200

(cherry picked from commit a2939116f5)
(cherry picked from commit 22cff41585)
This commit is contained in:
Gusted 2024-01-21 23:53:43 +01:00 committed by Earl Warren
parent 6d2df72825
commit b23a7f27bb
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 2 additions and 2 deletions

View file

@ -176,7 +176,7 @@ func CreateTag(ctx *context.APIContext) {
// schema:
// "$ref": "#/definitions/CreateTagOption"
// responses:
// "200":
// "201":
// "$ref": "#/responses/Tag"
// "404":
// "$ref": "#/responses/notFound"

View file

@ -13349,7 +13349,7 @@
}
],
"responses": {
"200": {
"201": {
"$ref": "#/responses/Tag"
},
"404": {