mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-15 22:16:04 +00:00
docs(api): document 401/403 responses for user key endpoints (#38711)
This commit is contained in:
@@ -91,6 +91,10 @@ func ListMyGPGKeys(ctx *context.APIContext) {
|
||||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/GPGKeyList"
|
||||
// "401":
|
||||
// "$ref": "#/responses/unauthorized"
|
||||
// "403":
|
||||
// "$ref": "#/responses/forbidden"
|
||||
|
||||
listGPGKeys(ctx, ctx.Doer.ID, utils.GetListOptions(ctx))
|
||||
}
|
||||
@@ -112,6 +116,10 @@ func GetGPGKey(ctx *context.APIContext) {
|
||||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/GPGKey"
|
||||
// "401":
|
||||
// "$ref": "#/responses/unauthorized"
|
||||
// "403":
|
||||
// "$ref": "#/responses/forbidden"
|
||||
// "404":
|
||||
// "$ref": "#/responses/notFound"
|
||||
|
||||
@@ -163,6 +171,10 @@ func GetVerificationToken(ctx *context.APIContext) {
|
||||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/string"
|
||||
// "401":
|
||||
// "$ref": "#/responses/unauthorized"
|
||||
// "403":
|
||||
// "$ref": "#/responses/forbidden"
|
||||
// "404":
|
||||
// "$ref": "#/responses/notFound"
|
||||
|
||||
@@ -182,6 +194,10 @@ func VerifyUserGPGKey(ctx *context.APIContext) {
|
||||
// responses:
|
||||
// "201":
|
||||
// "$ref": "#/responses/GPGKey"
|
||||
// "401":
|
||||
// "$ref": "#/responses/unauthorized"
|
||||
// "403":
|
||||
// "$ref": "#/responses/forbidden"
|
||||
// "404":
|
||||
// "$ref": "#/responses/notFound"
|
||||
// "422":
|
||||
@@ -243,6 +259,10 @@ func CreateGPGKey(ctx *context.APIContext) {
|
||||
// responses:
|
||||
// "201":
|
||||
// "$ref": "#/responses/GPGKey"
|
||||
// "401":
|
||||
// "$ref": "#/responses/unauthorized"
|
||||
// "403":
|
||||
// "$ref": "#/responses/forbidden"
|
||||
// "404":
|
||||
// "$ref": "#/responses/notFound"
|
||||
// "422":
|
||||
@@ -269,6 +289,8 @@ func DeleteGPGKey(ctx *context.APIContext) {
|
||||
// responses:
|
||||
// "204":
|
||||
// "$ref": "#/responses/empty"
|
||||
// "401":
|
||||
// "$ref": "#/responses/unauthorized"
|
||||
// "403":
|
||||
// "$ref": "#/responses/forbidden"
|
||||
// "404":
|
||||
|
||||
@@ -121,6 +121,10 @@ func ListMyPublicKeys(ctx *context.APIContext) {
|
||||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/PublicKeyList"
|
||||
// "401":
|
||||
// "$ref": "#/responses/unauthorized"
|
||||
// "403":
|
||||
// "$ref": "#/responses/forbidden"
|
||||
|
||||
listPublicKeys(ctx, ctx.Doer)
|
||||
}
|
||||
@@ -176,6 +180,10 @@ func GetPublicKey(ctx *context.APIContext) {
|
||||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/PublicKey"
|
||||
// "401":
|
||||
// "$ref": "#/responses/unauthorized"
|
||||
// "403":
|
||||
// "$ref": "#/responses/forbidden"
|
||||
// "404":
|
||||
// "$ref": "#/responses/notFound"
|
||||
|
||||
@@ -240,6 +248,10 @@ func CreatePublicKey(ctx *context.APIContext) {
|
||||
// responses:
|
||||
// "201":
|
||||
// "$ref": "#/responses/PublicKey"
|
||||
// "401":
|
||||
// "$ref": "#/responses/unauthorized"
|
||||
// "403":
|
||||
// "$ref": "#/responses/forbidden"
|
||||
// "422":
|
||||
// "$ref": "#/responses/validationError"
|
||||
|
||||
@@ -264,6 +276,8 @@ func DeletePublicKey(ctx *context.APIContext) {
|
||||
// responses:
|
||||
// "204":
|
||||
// "$ref": "#/responses/empty"
|
||||
// "401":
|
||||
// "$ref": "#/responses/unauthorized"
|
||||
// "403":
|
||||
// "$ref": "#/responses/forbidden"
|
||||
// "404":
|
||||
|
||||
Reference in New Issue
Block a user