Improve Swagger documentation for user endpoints

This commit is contained in:
JakobDev 2024-11-23 10:33:55 +01:00
parent 1316f4d338
commit b074e08f34
No known key found for this signature in database
GPG key ID: 39DEF62C3ED6DC4C
23 changed files with 703 additions and 2 deletions

View file

@ -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":