mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-22 21:49:22 +00: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
)
This commit is contained in:
parent
957990b36a
commit
22cff41585
|
@ -176,7 +176,7 @@ func CreateTag(ctx *context.APIContext) {
|
||||||
// schema:
|
// schema:
|
||||||
// "$ref": "#/definitions/CreateTagOption"
|
// "$ref": "#/definitions/CreateTagOption"
|
||||||
// responses:
|
// responses:
|
||||||
// "200":
|
// "201":
|
||||||
// "$ref": "#/responses/Tag"
|
// "$ref": "#/responses/Tag"
|
||||||
// "404":
|
// "404":
|
||||||
// "$ref": "#/responses/notFound"
|
// "$ref": "#/responses/notFound"
|
||||||
|
|
2
templates/swagger/v1_json.tmpl
generated
2
templates/swagger/v1_json.tmpl
generated
|
@ -13349,7 +13349,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"201": {
|
||||||
"$ref": "#/responses/Tag"
|
"$ref": "#/responses/Tag"
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
|
|
Loading…
Reference in a new issue