Skip to content

Commit 89ccfc7

Browse files
committed
fix: openapi spec
1 parent 1f9382c commit 89ccfc7

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

api/session.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ type SessionAPI struct {
5454
// description: Unauthorized
5555
// schema:
5656
// $ref: "#/definitions/Error"
57+
// 403:
58+
// description: Forbidden
59+
// schema:
60+
// $ref: "#/definitions/Error"
5761
func (a *SessionAPI) Login(ctx *gin.Context) {
5862
if !a.LocalAuthEnabled {
5963
ctx.AbortWithError(403, errors.New("local authentication is disabled"))

docs/spec.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,12 @@
720720
"schema": {
721721
"$ref": "#/definitions/Error"
722722
}
723+
},
724+
"403": {
725+
"description": "Forbidden",
726+
"schema": {
727+
"$ref": "#/definitions/Error"
728+
}
723729
}
724730
}
725731
}
@@ -3539,4 +3545,4 @@
35393545
"in": "query"
35403546
}
35413547
}
3542-
}
3548+
}

0 commit comments

Comments
 (0)