mirror of
https://github.com/h44z/wg-portal.git
synced 2025-11-18 14:56:17 +00:00
correct enum for User-Source in api doc (#562)
This commit is contained in:
@@ -512,6 +512,8 @@ definitions:
|
|||||||
description: The source of the user. This field is optional.
|
description: The source of the user. This field is optional.
|
||||||
enum:
|
enum:
|
||||||
- db
|
- db
|
||||||
|
- ldap
|
||||||
|
- oauth
|
||||||
example: db
|
example: db
|
||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
|
|||||||
@@ -2216,7 +2216,9 @@
|
|||||||
"description": "The source of the user. This field is optional.",
|
"description": "The source of the user. This field is optional.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
"db"
|
"db",
|
||||||
|
"ldap",
|
||||||
|
"oauth"
|
||||||
],
|
],
|
||||||
"example": "db"
|
"example": "db"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -561,6 +561,8 @@ definitions:
|
|||||||
description: The source of the user. This field is optional.
|
description: The source of the user. This field is optional.
|
||||||
enum:
|
enum:
|
||||||
- db
|
- db
|
||||||
|
- ldap
|
||||||
|
- oauth
|
||||||
example: db
|
example: db
|
||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ type User struct {
|
|||||||
// The email address of the user. This field is optional.
|
// The email address of the user. This field is optional.
|
||||||
Email string `json:"Email" binding:"omitempty,email" example:"test@test.com"`
|
Email string `json:"Email" binding:"omitempty,email" example:"test@test.com"`
|
||||||
// The source of the user. This field is optional.
|
// The source of the user. This field is optional.
|
||||||
Source string `json:"Source" binding:"oneof=db" example:"db"`
|
Source string `json:"Source" binding:"oneof=db ldap oauth" example:"db"`
|
||||||
// The name of the authentication provider. This field is read-only.
|
// The name of the authentication provider. This field is read-only.
|
||||||
ProviderName string `json:"ProviderName,omitempty" readonly:"true" example:""`
|
ProviderName string `json:"ProviderName,omitempty" readonly:"true" example:""`
|
||||||
// If this field is set, the user is an admin.
|
// If this field is set, the user is an admin.
|
||||||
|
|||||||
Reference in New Issue
Block a user